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

Notification

Icon
Error

When is ncrunch cleaning its working directory?
GreenMoose
#1 Posted : Tuesday, June 11, 2013 8:17:26 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 507

Thanks: 145 times
Was thanked: 66 time(s) in 64 post(s)
I am using NCrunch on a ramdisk so space available is limited.

When I peek to my ncrunch folder it looks something like this:

Code:

Directory of n:\NCrunch\6208
2013-06-10  12:44    <DIR>          2
2013-06-10  12:44    <DIR>          1
2013-06-10  12:44    <DIR>          5
2013-06-10  12:44    <DIR>          3
2013-06-10  12:44    <DIR>          4
...
2013-06-11  10:03    <DIR>          78
              0 File(s)              0 bytes
             62 Dir(s)      39 030 784 bytes free


Does this means NCrunch is actually using binaries from directory "1" even though it has an old modified date?
If this is a "bug" or "by design" to not clean directories unless vstudio is restarted, can I somehow make assumptions on which directories are safe to remove on regular basis? (e.g. only keep the last 20 or similar)

Thanks.
Remco
#2 Posted : Tuesday, June 11, 2013 9:52:27 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
NCrunch will clean out directories in the following situations:

- When a project within the solution is changed (must be a .proj file, not just one of the code files in the project, and all workspaces related to this project will be removed and replaced as needed)
- When a project is removed from the solution
- When NCrunch is disabled/reset
- About 10 seconds after VS is shutdown (you'll notice a small NCrunch .exe running after shutdown to perform this action cleanly when it can be sure nothing is touching the files)
- After initialisation of VS - in the event that VS wasn't shut down correctly and derelict workspaces may be present

NCrunch will build workspaces as it needs them. Basically, when the engine needs to perform a task, it will check for an existing workspace that has been pre-created for the applicable project. If the workspace doesn't exist or all existing workspaces are in use (for example, if tests or builds are still running against them), then a new workspace is built. In this way, you'll notice that the number of workspaces will steadily increase over time until it reaches a maximum optimal level that is determined by your NCrunch configuration.

It is not safe to delete any workspaces while the engine is running, as each workspace is individually tracked and may be reused at any time.

If you're experiencing problems with disk space consumption, you can reduce the number of workspaces needed by NCrunch by adjusting the engine to perform less work concurrently. This can be done by adjusting the Max number of processing threads and Max test runners to pool configuration settings.
GreenMoose
#3 Posted : Tuesday, June 11, 2013 10:21:58 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 507

Thanks: 145 times
Was thanked: 66 time(s) in 64 post(s)
Remco;4238 wrote:
...
NCrunch will build workspaces as it needs them. Basically, when the engine needs to perform a task, it will check for an existing workspace that has been pre-created for the applicable project. If the workspace doesn't exist or all existing workspaces are in use (for example, if tests or builds are still running against them), then a new workspace is built. In this way, you'll notice that the number of workspaces will steadily increase over time until it reaches a maximum optimal level that is determined by your NCrunch configuration.
...


Hrm then maybe some sort of option "max disk space used" that would make NCrunch automatically to perform some cleanup can be considered?

(I have set my RamDisk to be 1.2GB, after executing "resynchronize" NCrunch I get 850MB available. So in 2 days NCrunch has eat up these 850MB. So instead of having to resynchronize manually when I see disk space is running low I would appreciate if NCrunch took care of it).

Thanks.
1 user thanked GreenMoose for this useful post.
Remco on 6/11/2013(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.034 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download