Skip to content

Track memory allocations in tests#216

Merged
tocsoft merged 4 commits into
mainfrom
sw/allocation-tracker
Apr 12, 2022
Merged

Track memory allocations in tests#216
tocsoft merged 4 commits into
mainfrom
sw/allocation-tracker

Conversation

@tocsoft

@tocsoft tocsoft commented Apr 10, 2022

Copy link
Copy Markdown
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Like with SixLabors/ImageSharp#2082 this introduces the test helpers for validating Memory allocations tracked by our memory allocator.

This is dependent on the code in SixLabors/ImageSharp#2082 for the required changes to the MemoryDiagnostics class to enable this. Merged

Also fixes #215

@tocsoft tocsoft requested a review from a team April 12, 2022 18:27
@tocsoft tocsoft marked this pull request as ready for review April 12, 2022 18:28
@tocsoft

tocsoft commented Apr 12, 2022

Copy link
Copy Markdown
Member Author

Like with SixLabors/ImageSharp#2082 this is mostly about adding in the framework with a single case being fixed to validate the framework works

@antonfirsov antonfirsov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks!

@tocsoft tocsoft merged commit 1a8dc88 into main Apr 12, 2022
@tocsoft tocsoft deleted the sw/allocation-tracker branch April 12, 2022 19:48
@BaileyMillerSSI

Copy link
Copy Markdown

When will this version bump be available on nuget?

@JimBobSquarePants

Copy link
Copy Markdown
Member

It'll be published on our MyGet feed now. See the readme for details. NuGet won't happen until RC now.

@BaileyMillerSSI

Copy link
Copy Markdown

I am in the process of still documenting what I found but I found another instance of TotalUndisposedAllocationCount increasing. I thought the tests were updated to cover this value increasing? This time it looks to be happening during a resize operation.

@tocsoft

tocsoft commented Apr 19, 2022

Copy link
Copy Markdown
Member Author

no we added a framework to enable us to be able to test such issues but it hasn't been introduced everywhere in the tests suite

FYI when you have your issue ready make sure you report it over on the main ImageSharp repo (this repo is only for the drawing side and resize is not handled over here)

@BaileyMillerSSI

Copy link
Copy Markdown

@tocsoft
Created at SixLabors/ImageSharp#2100

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.

DrawTextProcessor memory leak from TessellatedMultipolygon

4 participants