Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Test duration inconsistency
DevMentor Kft
#1 Posted : Wednesday, May 14, 2014 8:04:50 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/14/2014(UTC)
Posts: 2
Location: Hungary

Was thanked: 1 time(s) in 1 post(s)
Hello,
please check the image below. The test run duration of vs tester and resharper is consistent, but ncrunch reports an order of magnitude higher duration.

Test Durations by different test runners


Thanks,
Zsolt
Remco
#2 Posted : Wednesday, May 14, 2014 10:31:27 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi,

Thanks for sharing this.

Without being able to see the code for this test, it's difficult to know why the execution time is higher, but if you have a number of loops executing in managed code then it's quite possible that this is caused by the weight of NCrunch's instrumentation.

As with any other profiler, there is a CPU cost associated with tracking code coverage and performance data - see http://www.ncrunch.net/documentation/considerations-and-constraints_heavily-executed-code-under-test for more details.

Do you notice any difference if you disable the 'Instrument output assembly' configuration setting?
DevMentor Kft
#3 Posted : Wednesday, May 14, 2014 3:32:41 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/14/2014(UTC)
Posts: 2
Location: Hungary

Was thanked: 1 time(s) in 1 post(s)
Thanks for the quick feedback.

The test runs a code which is very cpu intensive, I've uploaded it to here.

On my machine, it takes 50ms to run it using the VS tester and using Resharper.

NCrunch shows about 400ms.
Analyze line execution times false: 170ms
Instrument output assembly false: 125ms

So, your suggestion is right, the profiler code causes the overhead. I will use the ncrunch: no coverage comments to exclude the most heavy paths.
Or, I'll turn off execution time indication for some more intense TDD sessions.

Thanks for your help and for the excellent product - I love it and I have advocated it on all of my TDD courses for my students.
Zsolt




1 user thanked DevMentor Kft for this useful post.
Remco on 5/14/2014(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.027 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download