You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -434,12 +434,39 @@ These steps must be followed before you attempt to open the solution in an IDE (
434
434
435
435
### Performance testing
436
436
437
-
There is a performance testforthe hit counting instrumentationin the test project `coverlet.core.performancetest`. Build the project with the msbuild step above and then run:
437
+
There is a simple performance testforthe hit counting instrumentationin the test project `coverlet.core.performancetest`. Build the project with the msbuild step above and then run:
438
438
439
439
dotnet test /p:CollectCoverage=true test/coverlet.core.performancetest/
440
440
441
441
The duration of the test can be tweaked by changing the number of iterations in the `[InlineData]`in the `PerformanceTest` class.
442
442
443
+
For more realistic testing it is recommended to try out any changes to the hit counting code paths on large, realistic projects. If you don't have any handy https://github.com/dotnet/corefx is an excellent candidate. [This page](https://github.com/dotnet/corefx/blob/master/Documentation/building/code-coverage.md) describes how to run code coverage tests for both the full solution and for individual projects with coverlet from nuget. Suitable projects (listed in order of escalating test durations):
444
+
445
+
* System.Collections.Concurrent.Tests
446
+
* System.Collections.Tests
447
+
* System.Reflection.Metadata.Tests
448
+
* System.Xml.Linq.Events.Tests
449
+
* System.Runtime.Serialization.Formatters.Tests
450
+
451
+
Change to the directory of the library and run the msbuild code coverage command:
452
+
453
+
dotnet msbuild /t:BuildAndTest /p:Coverage=true
454
+
455
+
Look for a line like this:
456
+
457
+
----- start 18:13:36,59 =============== To repro directly: =====================================================
458
+
459
+
It is followed by a `pushd` command into the artefact directory, and a command to run coverlet. Run these to get to see the coverlet output and especially the test duration. E.g.:
0 commit comments