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

Feature/coverage memory consumption #1035

Merged
merged 4 commits into from Jun 21, 2022
Merged

Conversation

hcoles
Copy link
Owner

@hcoles hcoles commented Jun 16, 2022

Reduces insanely high memory consumption by coverage data structures.

At least partially addressed #1032 and #841

The in memory coverage data store previously held a map entry for each instruction
within the code under test. This was almost unbelievably stupid and
resulted in very high memory consumption.

Coverage is tracked by block, which maps 1:many with instructions. The
reason coverage was being held against instruction seems to be because
the block wasn't being tracked when mutants were combined due code
inlining, so only the instruction could be used for targetting.

This change updates MutationDetails to track mutants affecting multiple
blocks, and changes the interface and internals of the coverage store
to be block driven.

This results in a change of interface to the core MutationDetails class, and a change
in format to the xml output. This commit must therefore be accompanied by a version bump.

For the assertj project this reduces memory consumption from 3G to 1G.
Although a large improvement, this is still too high and will need to be looked at further.

Henry Coles added 3 commits June 16, 2022 14:56
The in memory coverage data store held a map entry for each instruction
within the code under test. This was almost unbelievably stupid and
result in very high memory consumption.

Coverage is tracked by block, which maps 1:many with instructions. The
reason coverage was being held against instruction seems to be because
the block wasn't being tracked when mutants were combined due code
inlining, so only the instruction could be used for targetting.

This change updates MutationDetails to track mutants affecting multiple
blocks, and changes the interface and internals of the coverage store
to be block driven.

For the assertj project this reduces memory consumption from 3G to 1G.
Although a large improvement, this is still too high.
@hcoles hcoles merged commit ae8c498 into master Jun 21, 2022
@vincentkupert
Copy link

Thank you for this improvement!

@hcoles hcoles deleted the feature/coverage_memory_consumption branch July 15, 2022 10:53
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