Build/Test Issues

Test duration inconsistency

Started by DevMentor Kft on 5,182 views

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.

[img=http://soci.hu/images/testduration.png]Test Durations by different test runners[/img]


Thanks,
Zsolt
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?

Edited

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




Post a reply

Log in to reply.