test(ci): harden scheduling and allocation gates
This commit is contained in:
parent
c4608b1127
commit
d123c4b67c
11 changed files with 101 additions and 87 deletions
|
|
@ -45,7 +45,6 @@ public sealed class AtmosphericGpuTimerSamplingTests
|
|||
frameSerial: 1);
|
||||
|
||||
int measured = 0;
|
||||
long before = GC.GetAllocatedBytesForCurrentThread();
|
||||
for (long frame = 1; frame <= 10_000; frame++)
|
||||
{
|
||||
if (AtmosphericGpuTimerSampling.ShouldMeasure(
|
||||
|
|
@ -55,9 +54,12 @@ public sealed class AtmosphericGpuTimerSamplingTests
|
|||
measured++;
|
||||
}
|
||||
}
|
||||
long allocated = GC.GetAllocatedBytesForCurrentThread() - before;
|
||||
|
||||
Assert.Equal(2_500, measured);
|
||||
Assert.Equal(0, allocated);
|
||||
ZeroAllocationProbe.AssertAllocatesNothing(
|
||||
"AtmosphericGpuTimerSampling.ShouldMeasure",
|
||||
() => _ = AtmosphericGpuTimerSampling.ShouldMeasure(
|
||||
RenderQualitySemantic.Low,
|
||||
frameSerial: 4),
|
||||
batchSize: 10_000);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue