The new instrumentation system shouldn't have much effect on the actual running times of your tests ... but builds and discovery will be much faster :)
Yes, I read that in your extensive blog post as well.
I did some timings, and it seems that the build times, at least for those large F# projects, don't really increase, nor decrease. Discovery is, however, indeed faster. The following timings were taken with a stopwatch and are not very precise. Obviously, there are many circumstances that can influence these numbers. I ran the timings a few times, but a better test would be some way to run it from a command-line and find the timings of each step, I don't know if that is (easily) possible.
Legacy:
Reload, indexing: 0:59
Build (until building msg disappears): 5.44
Start tests: 6:05
Finished: 7:40
Only (re)running all tests in existing threads: 1:12
Optimized
Reload, indexing: 0:58
Build (until building msg disappears): 4:37
Start tests: 4:45
Finished: 6:52
Only (re)running all tests in existing threads: 1:12
Reset, Rebuild & run all (optimized)
Reload, indexing: 0:54
Build (until building msg disappears): 4:31
Start tests: 4:43
Finished: 6:32
Only (re)running all tests in existing threads: 1:09
There are some peculiarities in this solution that may influence these timings:
- When I remove instrumentation, the two biggest projects go from ~4 min to ~1 min, matching build times of VS
- When I change something in the big Common F# prj (the one I sent you), build time is around 2 min, rebuild w/o change between 80-90sec
- This sln has about 7500 tests, each logging about 1-2kb, which probably influences test times (and seems to slow down VS as well, but not sure that's due to logging or something else)
- I noticed that a lot of non-user code gets instrumented. F# projects typically have a large number of very small methods (like fun a -> a + 10) that get inlined by JIT (if under 16 IL bytes or so), and the result of adding instrumentation to those methods has a detrimental effect to compile+instrument times, and to running times. A suggestion would be to not instrument tiny methods. This would have an advantage outside of F# as well: these timings won't add up anyway and it may (significantly) speed up instrumenting. Downside is that it will also limit code-coverage of such (tiny) methods, but perhaps timings can be removed, and coverage markers remain?