public void PerformanceTest_EntityDiffer_GetChanges_ForwardChangesOnly_SingleChange(int entityCount) { CreateEntitiesWithMockComponentData(SrcEntityManager, entityCount, typeof(EcsTestData), typeof(EcsTestData2), typeof(EcsTestSharedComp)); var entity = default(Entity); using (var entities = SrcEntityManager.GetAllEntities(Allocator.Temp)) { entity = entities[0]; } using (var differ = new EntityManagerDiffer(SrcEntityManager, Allocator.TempJob)) { // Fast forward the shadow world using (differ.GetChanges(EntityManagerDifferOptions.FastForwardShadowWorld, Allocator.TempJob)) { } var startValue = 99; Measure.Method(() => { SrcEntityManager.SetComponentData(entity, new EcsTestData(startValue++)); // Get changes with all options selected using (differ.GetChanges(EntityManagerDifferOptions.IncludeForwardChangeSet, Allocator.TempJob)) { } }) .Definition("EntityDiffer") .WarmupCount(1) .MeasurementCount(100) .Run(); } }