-
Notifications
You must be signed in to change notification settings - Fork 387
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
Add include option #164
Add include option #164
Conversation
Thanks for the contribution @pjanotti, will take a look later today
I'm definitely open to whatever perf optimizations you have in mind |
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.
Merging this
Thanks @tonerdo. The bit about the optimization is a bit "premature" in the sense that I see that we could avoid some allocations but that shouldn't be the issue with better ROI. Hopefully I will have some time to find better targets by collecting some performance profiles. |
Add include option
Bumps [coverlet.collector](https://github.com/coverlet-coverage/coverlet) from 3.0.3 to 3.1.0. <details> <summary>Release notes</summary> *Sourced from [coverlet.collector's releases](https://github.com/coverlet-coverage/coverlet/releases).* > ## v3.1.0 > * 141 adds performance improvements to coverage tracker for multi-threaded scenarios > * a189fc26ea35b8ad77bd3be2bceac5c2996149a8 replaces Jil with JSON.NET for JSON serialization > * [#147](coverlet-coverage/coverlet#147) adds support for instrumenting constructors > * 4efea75e7c92e01652eb6c1c465ae1bcf9e56e6b ensures output filenames have extensions if non is specified > * [#154](coverlet-coverage/coverlet#154) makes enumeration based MSBuild properties case insensitive > * [#164](coverlet-coverage/coverlet#164) adds support for specifying include filters > * [#169](coverlet-coverage/coverlet#169) adds slight improvement for coverage tracking performance </details> <details> <summary>Commits</summary> - See full diff in [compare view](https://github.com/coverlet-coverage/coverlet/commits/v3.1.0) </details> <br /> Reviewed-on: https://gitea.dysnomia.studio/elanis/portfolio/pulls/11 Co-authored-by: elanis <elanis@noreply.example.org> Co-committed-by: elanis <elanis@noreply.example.org>
Bumps [coverlet.msbuild](https://github.com/coverlet-coverage/coverlet) from 3.0.3 to 3.1.0. <details> <summary>Release notes</summary> *Sourced from [coverlet.msbuild's releases](https://github.com/coverlet-coverage/coverlet/releases).* > ## v3.1.0 > * 141 adds performance improvements to coverage tracker for multi-threaded scenarios > * a189fc26ea35b8ad77bd3be2bceac5c2996149a8 replaces Jil with JSON.NET for JSON serialization > * [#147](coverlet-coverage/coverlet#147) adds support for instrumenting constructors > * 4efea75e7c92e01652eb6c1c465ae1bcf9e56e6b ensures output filenames have extensions if non is specified > * [#154](coverlet-coverage/coverlet#154) makes enumeration based MSBuild properties case insensitive > * [#164](coverlet-coverage/coverlet#164) adds support for specifying include filters > * [#169](coverlet-coverage/coverlet#169) adds slight improvement for coverage tracking performance </details> <details> <summary>Commits</summary> - See full diff in [compare view](https://github.com/coverlet-coverage/coverlet/commits/v3.1.0) </details> <br /> Reviewed-on: https://gitea.dysnomia.studio/elanis/portfolio/pulls/7 Co-authored-by: elanis <elanis@noreply.example.org> Co-committed-by: elanis <elanis@noreply.example.org>
Bumps [coverlet.collector](https://github.com/coverlet-coverage/coverlet) from 3.0.3 to 3.1.0. <details> <summary>Release notes</summary> *Sourced from [coverlet.collector's releases](https://github.com/coverlet-coverage/coverlet/releases).* > ## v3.1.0 > * 141 adds performance improvements to coverage tracker for multi-threaded scenarios > * a189fc26ea35b8ad77bd3be2bceac5c2996149a8 replaces Jil with JSON.NET for JSON serialization > * [#147](coverlet-coverage/coverlet#147) adds support for instrumenting constructors > * 4efea75e7c92e01652eb6c1c465ae1bcf9e56e6b ensures output filenames have extensions if non is specified > * [#154](coverlet-coverage/coverlet#154) makes enumeration based MSBuild properties case insensitive > * [#164](coverlet-coverage/coverlet#164) adds support for specifying include filters > * [#169](coverlet-coverage/coverlet#169) adds slight improvement for coverage tracking performance </details> <details> <summary>Commits</summary> - See full diff in [compare view](https://github.com/coverlet-coverage/coverlet/commits/v3.1.0) </details> <br /> Reviewed-on: https://gitea.dysnomia.studio/elanis/dysnomia-website/pulls/14 Co-authored-by: elanis <elanis@noreply.example.org> Co-committed-by: elanis <elanis@noreply.example.org>
Bumps [coverlet.msbuild](https://github.com/coverlet-coverage/coverlet) from 3.0.3 to 3.1.0. <details> <summary>Release notes</summary> *Sourced from [coverlet.msbuild's releases](https://github.com/coverlet-coverage/coverlet/releases).* > ## v3.1.0 > * 141 adds performance improvements to coverage tracker for multi-threaded scenarios > * a189fc26ea35b8ad77bd3be2bceac5c2996149a8 replaces Jil with JSON.NET for JSON serialization > * [#147](coverlet-coverage/coverlet#147) adds support for instrumenting constructors > * 4efea75e7c92e01652eb6c1c465ae1bcf9e56e6b ensures output filenames have extensions if non is specified > * [#154](coverlet-coverage/coverlet#154) makes enumeration based MSBuild properties case insensitive > * [#164](coverlet-coverage/coverlet#164) adds support for specifying include filters > * [#169](coverlet-coverage/coverlet#169) adds slight improvement for coverage tracking performance </details> <details> <summary>Commits</summary> - See full diff in [compare view](https://github.com/coverlet-coverage/coverlet/commits/v3.1.0) </details> <br /> Co-authored-by: Elanis <elanis@hotmail.com> Reviewed-on: https://gitea.dysnomia.studio/elanis/dysnomia-website/pulls/10 Co-authored-by: elanis <elanis@noreply.example.org> Co-committed-by: elanis <elanis@noreply.example.org>
Fixes #163.
Assuming that users typically won't be using both, if they do exclude filter takes precedence. Notice the defaults:
I felt tempted to avoid some allocations on the filters but opted to keep the code clear as it is, e.g.: I could have avoid some string allocations by batching the creation of substrings etc. Perhaps we can look at this later as separate optimization.
For the tests the include filters are almost symmetrical to the exclude ones so I put some of them under the same test method.