Remove PoolSettings.ExtraPrototypes option (#18678)

This commit is contained in:
Leon Friedrich
2023-08-05 16:16:48 +12:00
committed by GitHub
parent c2beaff3ac
commit d58786faf4
51 changed files with 463 additions and 399 deletions

View File

@@ -26,10 +26,12 @@ public class DeviceNetworkingBenchmark
private NetworkPayload _payload = default!;
[TestPrototypes]
private const string Prototypes = @"
- type: entity
name: DummyNetworkDevice
id: DummyNetworkDevice
name: DummyNetworkDevicePrivate
id: DummyNetworkDevicePrivate
components:
- type: DeviceNetwork
transmitFrequency: 100
@@ -56,7 +58,7 @@ public class DeviceNetworkingBenchmark
public async Task SetupAsync()
{
ProgramShared.PathOffset = "../../../../";
_pair = await PoolManager.GetServerClient(new PoolSettings { NoClient = true, ExtraPrototypes = Prototypes });
_pair = await PoolManager.GetServerClient(new PoolSettings { NoClient = true });
var server = _pair.Pair.Server;
await server.WaitPost(() =>
@@ -73,17 +75,23 @@ public class DeviceNetworkingBenchmark
["testbool"] = true
};
_sourceEntity = entityManager.SpawnEntity("DummyNetworkDevice", MapCoordinates.Nullspace);
_sourceEntity = entityManager.SpawnEntity("DummyNetworkDevicePrivate", MapCoordinates.Nullspace);
_sourceWirelessEntity = entityManager.SpawnEntity("DummyWirelessNetworkDevice", MapCoordinates.Nullspace);
for (var i = 0; i < EntityCount; i++)
{
_targetEntities.Add(entityManager.SpawnEntity("DummyNetworkDevice", MapCoordinates.Nullspace));
_targetEntities.Add(entityManager.SpawnEntity("DummyNetworkDevicePrivate", MapCoordinates.Nullspace));
_targetWirelessEntities.Add(entityManager.SpawnEntity("DummyWirelessNetworkDevice", MapCoordinates.Nullspace));
}
});
}
[GlobalCleanup]
public async Task Cleanup()
{
await _pair.DisposeAsync();
}
[Benchmark(Baseline = true, Description = "Entity Events")]
public async Task EventSentBaseline()
{