-
-
Notifications
You must be signed in to change notification settings - Fork 889
Harden memory-intensive tests, repurpose Sandbox46 #1089
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
Conversation
implement BasicSerializer
run BokehBlurTests in separate process
Codecov Report
@@ Coverage Diff @@
## master #1089 +/- ##
===========================================
- Coverage 83.77% 54.45% -29.33%
===========================================
Files 704 704
Lines 29311 29311
Branches 0 3290 +3290
===========================================
- Hits 24555 15961 -8594
- Misses 4756 12823 +8067
- Partials 0 527 +527
Continue to review full report at Codecov.
|
JimBobSquarePants
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! I didn't know any of this was possible.
Just some minor nitpicks regarding package referencing.
tests/ImageSharp.Tests/Memory/Alocators/ArrayPoolMemoryAllocatorTests.cs
Show resolved
Hide resolved
tests/ImageSharp.Tests.ProfilingSandbox/ImageSharp.Tests.ProfilingSandbox.csproj
Show resolved
Hide resolved
|
I've no idea why the code coverage has dropped so dramatically but I'm going to push a quick change that updates the coverage setting to match Drawing and Web. |
|
@antonfirsov I'm stumped. https://codecov.io/gh/SixLabors/ImageSharp/tree/6f832aa77343e8d112d6ddd08765aa2e4d05519c I tried looking for a spec to the lcov format to see if I could figure out what the various acronyms meant but no luck so far. |
| [InlineData(0, 1, .5F, 1, 0, 0)] | ||
| [InlineData(120, 1, .5F, 0, 1, 0)] | ||
| [InlineData(240, 1, .5F, 0, 0, 1)] | ||
| //[Theory] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this WIP stuff now here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was just added to generate all the required info for coverlet-coverage/coverlet#700
I'll remove it
|
@JimBobSquarePants thanks for fixing the nuget stuff! Personally I can live with those codecov issues. The tool's behavior is too random for me to trust it, I always ignore all it's reports. |
Prerequisites
The problem
To enable experiments on memory stuff like #898, it is necessery to put the testing of memory-intensive code on right track. These tests are important but at the same time threatening the execution with sudden OOM-s, which made us to disable many of them.
Solution
It's possible to sandbox individual test code execution to separate processes with the help of RemoteExecutor which is a tool in the arcade project.
Limitation: The tool can only execute static methods, which can only consume string arguments.
Details
TestPixel<TPixel>JpegDecoderTestsArrayPoolMemoryAllocatorTestsBokehBlurTestsBonus: simplify and repurpose Sandbox46
It's no longer needed to profile tests from Visual Studio, however it can be handy as a separate "profilable" .exe to run individual test blocks in a hard-coded way. This is useful eg. for memory profiling unit tests, since even JetBrains can't do that from IDE UI.
ImageSharp.Tests.csprojinstead of including classes