Improve ecs query performance;

This commit is contained in:
2025-10-12 19:49:05 +09:00
parent 682200cbf1
commit 6d1b510ac1
27 changed files with 1546 additions and 992 deletions

View File

@@ -2,5 +2,9 @@
public interface ITest
{
public void Setup();
public void Run();
public void Cleanup();
}

View File

@@ -6,6 +6,23 @@ public class TestRunner
where T : ITest, new()
{
var test = new T();
test.Setup();
test.Run();
test.Cleanup();
}
public static void Run<T>(int iteration)
where T : ITest, new()
{
var test = new T();
test.Setup();
iteration = iteration < 1 ? 1 : iteration;
for (var i = 0; i < iteration; i++)
{
test.Run();
}
test.Cleanup();
}
}