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

Notification

Icon
Error

Massive performance difference when using ncrunch
Sakari
#1 Posted : Wednesday, December 25, 2013 1:29:50 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/25/2013(UTC)
Posts: 3
Location: Belgium

Thanks: 1 times
I used to use the Regular visual studio test explorer with the NUnit adapter.
With this, my tests run in usually around 100ms-1sec.
Most tests have a 2 to 10 second builtin timeout when waiting for messages.
So far so good, it all works fine.

I've been evaluating NCrunch, and, after fixing a number of actual problems with my code that NCrunch helped me find (by virtue of working quite differently from the visual studio test runner)
I'm stumbling on something weird, some tests are running for over 15 seconds instead of the old 1 second.
Pretty much all those tests involve my SRP implementation, which is used to implement a secure handshake.

It seems that NCrunch has a lot of trouble getting through some BigInteger maths in unit tests in a timely fashion, if I remove all the timeouts, the tests actually run fine, but take 20-30 seconds to run instead of their usual time.

Is there anything in NCrunch that might slow down things so massively ?

Edit, after some checking it seems almost all of the extra time is spent in the following loop:
https://bitbucket.org/pa...ger.cs?at=master#cl-2042
Remco
#2 Posted : Wednesday, December 25, 2013 11:08:00 PM(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 posting!

This is probably being caused by the added weight of NCrunch's instrumentation. There are several ways you can solve this, although they all involve making some trade off. This documentation page may help you here.

Cheers,

Remco
1 user thanked Remco for this useful post.
Sakari on 12/26/2013(UTC)
Sakari
#3 Posted : Thursday, December 26, 2013 3:57:31 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/25/2013(UTC)
Posts: 3
Location: Belgium

Thanks: 1 times
Thank you, removing instrumentation for the Crypto related assembly indeed fixed the issue :)
Remco
#4 Posted : Friday, December 27, 2013 5:43:06 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)
Great stuff! Thanks for letting me know, and I wish you a great new year :)

Cheers,

Remco
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.030 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download