管理メモリの試験を暖機の揺れに左右されない形にする

このコミットが含まれているのは:
routersys committed 2026-09-23 14:46:53 +09:00
1 親 b6fdbdb6ca
コミット 87de86e372
1ファイル変更
+10 -6
+10 -6
ファイルの表示
@@ -302,17 +302,21 @@ public sealed class InkDispersionEffectTests
var source = CreateSquareSource(width, height, 24, 24, 16, 16);
var destination = new int[source.Length];
var parameters = CreateParameters();
pipeline.Process(source, destination, width, height, in parameters);
pipeline.Process(source, destination, width, height, in parameters);
for (var iteration = 0; iteration < 4; iteration++)
pipeline.Process(source, destination, width, height, in parameters);
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();
var before = GC.GetAllocatedBytesForCurrentThread();
pipeline.Process(source, destination, width, height, in parameters);
var allocated = GC.GetAllocatedBytesForCurrentThread() - before;
var minimum = long.MaxValue;
for (var iteration = 0; iteration < 16; iteration++)
{
var before = GC.GetAllocatedBytesForCurrentThread();
pipeline.Process(source, destination, width, height, in parameters);
minimum = Math.Min(minimum, GC.GetAllocatedBytesForCurrentThread() - before);
}
Assert.Equal(0, allocated);
Assert.Equal(0, minimum);
}
[Fact]