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

Notification

Icon
Error

Build assemblies not optimiezed
SeriousM
#1 Posted : Tuesday, October 11, 2016 9:15:25 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 4/2/2012(UTC)
Posts: 40
Location: Vienna

Thanks: 9 times
Was thanked: 3 time(s) in 3 post(s)
Hi!

When I debug a test it seems that the assembly is build with optimization turned on so that some of the symbols aren't available (inspection not available).
When I debug with resharper I can inspect all the symbols no problem.

Is there a flag where I can tell ncrunch to include/exclude optimization or debug with optimization turned off?

Thanks
Remco
#2 Posted : Tuesday, October 11, 2016 10:50:36 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting!

NCrunch deliberately turns optimisations off when it builds your project, as the optimisations prevent it from accurately instrumenting the output assembly.

It's possible there may be another reason why your debug evaluations are not working.

Are you seeing code coverage data for this project? Does this affect just one solution, or all of them?
SeriousM
#3 Posted : Tuesday, October 11, 2016 2:30:06 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 4/2/2012(UTC)
Posts: 40
Location: Vienna

Thanks: 9 times
Was thanked: 3 time(s) in 3 post(s)
I do see code coverage without any problems.
I had/have the this particular problem with multiple project setups over the last couple of years and today I decided to ask you if there is a way to fix it :)
The problem affects bigger solutions with multiple projects. Maybe thats the problem that the dependencies build with optimizing on?

Oh and another short question: my ram-disk (4 gb) with the ncrunch temp files is constantly running full and I have to reset ncrunch 4-5 times a day to clean it up. Is there a way to tell ncrunch to cleanup old artifacts from time to time?
Remco
#4 Posted : Tuesday, October 11, 2016 10:45:51 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
If the code coverage is working correctly, then this is probably related to the debugger (or PDB data) rather than optimisations. Is there a pattern around which values can be evaluated when you are in a debug session? Does the debug session correctly stop at breakpoints?

Regarding the RAM disk, the best advise I can give here is to increase the size of your RAM disk. Workspace consumption works similar to memory consumption in an application; it is possible (with serious effort) to limit it, but there will be a serious performance cost attached to this. NCrunch will already clean up workspaces religiously, so there shouldn't be a need to do this manually. Reducing the 'Max number of processing threads' will mean you won't get so many workspaces, but this will then make NCrunch run slower. When the goal of using a RAM disk is to improve performance, this would seem slightly self-defeating :)
SeriousM
#5 Posted : Wednesday, October 12, 2016 11:57:03 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 4/2/2012(UTC)
Posts: 40
Location: Vienna

Thanks: 9 times
Was thanked: 3 time(s) in 3 post(s)
I didn't found a pattern yet, but I will pay attention to that from now on.
Will report back once I've found it.

@ramdisk: it's already 4 gb, that should be enough for 4 running threads, right?
Remco
#6 Posted : Wednesday, October 12, 2016 5:05:41 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
SeriousM;9277 wrote:

@ramdisk: it's already 4 gb, that should be enough for 4 running threads, right?


It really depends upon the solution.

NCrunch can make several workspaces for each project in your solution, depending on your change patterns and the number of workspaces needed in parallel.

Because the workspaces are direct copies of the source of each project, large projects can consume quite a bit of space. If you're running out of space on the disk regularly, 4GB isn't enough for this solution.
SeriousM
#7 Posted : Thursday, November 10, 2016 12:55:15 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 4/2/2012(UTC)
Posts: 40
Location: Vienna

Thanks: 9 times
Was thanked: 3 time(s) in 3 post(s)
Remco;9278 wrote:
SeriousM;9277 wrote:

@ramdisk: it's already 4 gb, that should be enough for 4 running threads, right?


It really depends upon the solution.

NCrunch can make several workspaces for each project in your solution, depending on your change patterns and the number of workspaces needed in parallel.

Because the workspaces are direct copies of the source of each project, large projects can consume quite a bit of space. If you're running out of space on the disk regularly, 4GB isn't enough for this solution.


I guess I found the problem: Once I hack on a non buildable solution state (incomplete statement somewhere) the RamDisk is running out of space if I just continue generating non buildable attempts.
Remco
#8 Posted : Thursday, November 10, 2016 10:30:26 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
SeriousM;9388 wrote:

I guess I found the problem: Once I hack on a non buildable solution state (incomplete statement somewhere) the RamDisk is running out of space if I just continue generating non buildable attempts.


Workspaces are always created to service build tasks. For this reason, it is unlikely for additional workspace space to be consumed at any time outside of NCrunch starting up builds (expect for tests that generate data on disk, but this is quite rare).

There really isn't anything that NCrunch can feasibly do here to limit its disk consumption. You either need to reduce the amount of concurrency through your settings, or you need to reduce the size of your projects on disk.
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.046 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download