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
|
|
@ -465,12 +465,10 @@ public sealed class DirectionalShadowCasterFrameTests
|
|||
frame.Build(in query);
|
||||
int copies = source.IndexCopies;
|
||||
|
||||
long before = GC.GetAllocatedBytesForCurrentThread();
|
||||
for (int iteration = 0; iteration < 256; iteration++)
|
||||
frame.Build(in query);
|
||||
long allocated = GC.GetAllocatedBytesForCurrentThread() - before;
|
||||
|
||||
Assert.Equal(0, allocated);
|
||||
ZeroAllocationProbe.AssertAllocatesNothing(
|
||||
"DirectionalShadowCasterFrame.Build stable frame",
|
||||
() => frame.Build(in query),
|
||||
batchSize: 256);
|
||||
Assert.Equal(1ul, frame.BuildSequence);
|
||||
Assert.Equal(copies, source.IndexCopies);
|
||||
Assert.Equal(0, frame.Stats.Classifications);
|
||||
|
|
@ -508,16 +506,16 @@ public sealed class DirectionalShadowCasterFrameTests
|
|||
frame.Build(in query);
|
||||
}
|
||||
|
||||
long before = GC.GetAllocatedBytesForCurrentThread();
|
||||
for (int iteration = 0; iteration < 64; iteration++)
|
||||
void RefreshDenseFrame()
|
||||
{
|
||||
for (int index = 0; index < 75; index++)
|
||||
source.PublishTransformChanges(dynamics[index].Id, 1);
|
||||
frame.Build(in query);
|
||||
}
|
||||
long allocated = GC.GetAllocatedBytesForCurrentThread() - before;
|
||||
|
||||
Assert.Equal(0, allocated);
|
||||
ZeroAllocationProbe.AssertAllocatesNothing(
|
||||
"DirectionalShadowCasterFrame.Build dense changed frame",
|
||||
RefreshDenseFrame,
|
||||
batchSize: 64);
|
||||
Assert.True(frame.Stats.DensityBulkRefresh);
|
||||
Assert.Equal(75, frame.Stats.DynamicTransformRefreshes);
|
||||
Assert.Equal(0, source.ProjectionReads);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue