SixLabors / ImageSharp.Drawing

:pen: Extensions to ImageSharp containing a cross-platform 2D polygon manipulation API and drawing operations.
https://sixlabors.com/products/imagesharp-drawing/
Other
285 stars 38 forks source link

Track memory allocations in tests #216

Closed tocsoft closed 2 years ago

tocsoft commented 2 years ago

Prerequisites

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 commented 2 years ago

Like with https://github.com/SixLabors/ImageSharp/pull/2082 this is mostly about adding in the framework with a single case being fixed to validate the framework works

BaileyMillerSSI commented 2 years ago

When will this version bump be available on nuget?

JimBobSquarePants commented 2 years ago

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

BaileyMillerSSI commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@tocsoft Created at https://github.com/SixLabors/ImageSharp/issues/2100