Add a benchmark for device networking (#12619)

This commit is contained in:
Julian Giebel
2022-12-07 00:22:57 +01:00
committed by GitHub
parent 21906f45bf
commit cc8b90dc44
2 changed files with 138 additions and 0 deletions

View File

@@ -19,6 +19,11 @@ namespace Content.IntegrationTests.Tests.DeviceNetwork
SubscribeLocalEvent<DeviceNetworkComponent, DeviceNetworkPacketEvent>(OnPacketReceived);
}
public void SendBaselineTestEvent(EntityUid uid)
{
RaiseLocalEvent(uid, new DeviceNetworkPacketEvent(0, "", 0, "", uid, new NetworkPayload()));
}
private void OnPacketReceived(EntityUid uid, DeviceNetworkComponent component, DeviceNetworkPacketEvent args)
{
LastPayload = args.Data;