Skip to content
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

Merged
merged 1 commit into from Aug 6, 2018
Merged

Conversation

pjanotti
Copy link
Contributor

Fixes #163.

Assuming that users typically won't be using both, if they do exclude filter takes precedence. Notice the defaults:

  • Default exclude: nothing is excluded
  • Default include: everything is included

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.

@tonerdo
Copy link
Collaborator

tonerdo commented Aug 1, 2018

Thanks for the contribution @pjanotti, will take a look later today

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.

I'm definitely open to whatever perf optimizations you have in mind

Copy link
Collaborator

@tonerdo tonerdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this

@tonerdo tonerdo merged commit e03c2e2 into coverlet-coverage:master Aug 6, 2018
@pjanotti
Copy link
Contributor Author

pjanotti commented Aug 7, 2018

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.

@pjanotti pjanotti deleted the include.option branch August 15, 2018 01:51
NorekZ pushed a commit to NorekZ/coverlet that referenced this pull request Nov 8, 2018
Elanis pushed a commit to Elanis/portfolio that referenced this pull request Dec 13, 2022
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>
Elanis pushed a commit to Elanis/portfolio that referenced this pull request Dec 13, 2022
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>
Elanis pushed a commit to Dysnomia-Studio/dysnomia-website that referenced this pull request Jul 14, 2023
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>
Elanis added a commit to Dysnomia-Studio/dysnomia-website that referenced this pull request Jul 14, 2023
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants