管理メモリの試験を暖機の揺れに左右されない形にする
このコミットが含まれているのは:
1ファイル変更
+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]
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする