-
Notifications
You must be signed in to change notification settings - Fork 388
Slow instrumentation for a large project #777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
How you can get this numbers?Have you ran |
I used
Is that an MSBuild flag? I'm using the NUnit test runner as the coverlet target, not
Just instrumentation phase. The actual tests only take a few seconds longer to run with coverage, surprisingly enough. |
Can you use it and
Yes it's strange we had issues with log test runtime due to instumentation of loops and consequent more code to run, but never had issue with |
Here it is: out.txt It looks like there was an exception while generating the coverage report, but it does show that the run took 98 minutes and only 25 seconds were spent running the tests. |
Thank's for artifact, I'll take a look asap. |
@katiekloss one question, in your sample do you get output report file?Because on you output I see an exception very similar to #775 that I'm investingation, also I cannot see coverlet expected tasks. Can you run a sample wiht msbuild command so we can see real timing of tasks?
Here as you can see I found tasks https://github.com/tonerdo/coverlet/blob/master/src/coverlet.msbuild.tasks/coverlet.msbuild.targets |
Using the MSBuild package instead of the collector, I do get coverage results. The performance summary is attached; it appears that instrumentation and results take 110 minutes and 30 seconds, respectively. |
Ok now we've task numbers
First time we have this kind of issue, I mean a very slow instrumentation time, we had in past issue with slow test run due to instrumentation and with At the moment the only way to lowering time is exclude assemblies, I know it's not a solution but at the moment I don't have nothing more that that 😞, I apologize. Thank you very much for help on investigation! |
For me Instrumentation of a relatively small Orleans Project takes a few minutes and consumes 1 CPU |
For me the slowness was solved by excluding generated code: Is there any reason why code with GeneratedCodeAttribute is not excluded by default from code coverage ? |
@Alexander-Bartosh Did you have to do anything special to get code coverage on Orleans to work? In my case (self hosted silo using generic host) the grains are reporting to have 0% coverage, while for other classes in the project (outside of the Orleans-stuff) are reported as being covered. |
@kwaazaar nothing special: dotnet test /testprojectpath/ /p:Configuration=Debug --no-build --results-directory /tmp/resutls --logger trx --collect "XPlat Code coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.ExcludeByAttribute=GeneratedCodeAttribute I do collect test coverage from Integration tests |
This issue is stale because it has been open for 3 months with no activity. |
This issue was created for global tool V1.7.0 and is meanwhile outdated. The actual version is 6.0.2. |
I'm setting up coverage for a project with about 1.2 million lines of VB.NET code, which compiles to a 24 MB assembly and 48 MB PDB in debug mode. It takes the global tool (version 1.7.0) about 75 minutes to instrument the assembly, which is understandable but not ideal for our build process.
Are there any options I can try to improve instrumentation performance, or is this to be expected from trying to instrument that much IL?
The text was updated successfully, but these errors were encountered: