Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Assets/NetworkAssets.asset
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ MonoBehaviour:
- {fileID: 11400000, guid: 3f5b5dff67a942289a9defa416b206f3, type: 2}
- {fileID: 11400000, guid: d9e68ba3f8528bc4cbfd099ae712789c, type: 2}
- {fileID: 11400000, guid: 03336e7833763664bb617f0c6b1f1e44, type: 2}
- {fileID: 11400000, guid: 93afd3489a7fc45419d11b759e9d4ec8, type: 2}
_availableTypeNames:
- UnityEngine.ScriptableObject, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
Expand Down Expand Up @@ -429,7 +430,8 @@ MonoBehaviour:
- 3f5b5dff67a942289a9defa416b206f3
- d9e68ba3f8528bc4cbfd099ae712789c
- 03336e7833763664bb617f0c6b1f1e44
_bakedIds: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f0000005000000051000000
- 93afd3489a7fc45419d11b759e9d4ec8
_bakedIds: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000
_bakedAssets:
- {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
- {fileID: 1120369429361536294, guid: 052faaac586de48259a63d0c4782560b, type: 3}
Expand Down Expand Up @@ -513,6 +515,7 @@ MonoBehaviour:
- {fileID: 11400000, guid: 3f5b5dff67a942289a9defa416b206f3, type: 2}
- {fileID: 11400000, guid: d9e68ba3f8528bc4cbfd099ae712789c, type: 2}
- {fileID: 11400000, guid: 03336e7833763664bb617f0c6b1f1e44, type: 2}
- {fileID: 11400000, guid: 93afd3489a7fc45419d11b759e9d4ec8, type: 2}
_bakedPersistentIds:
- 052faaac586de48259a63d0c4782560b
- 052faaac586de48259a63d0c4782560b_1120369429361536294
Expand Down Expand Up @@ -596,3 +599,4 @@ MonoBehaviour:
- 3f5b5dff67a942289a9defa416b206f3
- d9e68ba3f8528bc4cbfd099ae712789c
- 03336e7833763664bb617f0c6b1f1e44
- 93afd3489a7fc45419d11b759e9d4ec8
18 changes: 17 additions & 1 deletion Assets/PredictionTests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,29 @@ Optional args: `-port`, `-serverHost`, `-connectTimeout`. Exit code is non-zero
Policy regression scenarios are included in the normal suite. Pass `-policyRegressionScenariosOnly`
to run just the bootstrap and the three focused policy scenarios.

## Interest management scenario

Pass `-interestScenariosOnly` to run the bootstrap plus `InterestManagementScenario`. This focused
scenario requires a pure server and exactly two clients. It creates one player-owned
`PredictedTransform` anchor per client, two distant deterministic roots, and reciprocal owned
keyed-input movers. It verifies culling, both sides of the LOD hysteresis band, dormant
simulation/view behavior, hierarchy retention, deterministic and input-driven absolute-state
convergence on reentry, and a per-recipient packed-frame byte reduction while culled.

```
PurrDictionTests -batchmode -nographics -role server -count 2 -interestScenariosOnly -results server.json -logFile server.log
PurrDictionTests -batchmode -nographics -role client -count 2 -interestScenariosOnly -results client-1.json -logFile client-1.log
PurrDictionTests -batchmode -nographics -role client -count 2 -interestScenariosOnly -results client-2.json -logFile client-2.log
```

## Server load benchmark

Pass `-serverLoadBenchmark` to run only the bootstrap plus `ServerLoadBenchmarkScenario`: a
`BenchDriver` spawns `-benchObjects` (default 200) input-driven `BenchMover` identities, then the
server samples the `WriteFrameOnServer` sub-markers (`WriteInputHistory`, `WriteStateDeltas`,
`WriteFullFrame`, `WriteEventHandles`, `SendFrame`) plus client ack lag for `-benchSeconds`
(default 20) and reports them in the scenario result message. Use
(default 20), records frame payload bytes per recipient through `TickBandwidthProfiler`, and
reports the normalized `bytesPerClientTick` in the scenario result message. Use
`Tools/PurrDiction/Analysis/Run Server Load Latency Sweep` (or
`-executeMethod PurrNet.Prediction.Benchmarks.Editor.ServerLoadBenchmarkRunner.RunFromCommandLine`)
to build the player and sweep several simulated latencies (`-slbLatencies "0,50,100,200"`,
Expand Down
11 changes: 11 additions & 0 deletions Assets/PredictionTests/Scripts/PredictionBootstrap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ private void Awake()
return;
}

if (CommandLineUtils.HasFlag("-interestScenariosOnly"))
{
_scenarios = new Scenario[]
{
this,
gameObject.AddComponent<InterestManagementScenario>()
};
_results = new ScenarioDetails?[_scenarios.Length];
return;
}

if (CommandLineUtils.HasFlag("-includeHistoryStressScenario"))
gameObject.AddComponent<HistoryStressScenario>();

Expand Down
Loading
Loading