diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-29 09:42:17 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-29 09:42:17 +0800 |
| commit | f01aa1a9a8d19db5ab908ddbb30b0467be8aa092 (patch) | |
| tree | 2385fd0b75b3b35f5a29ac9b5c02d9b9e5aea13b /src/LivingVillage.Kernel.Tests/P70PerformanceBaselineTests.fs | |
| parent | 54732d906a68d89ee1446ddb82ae639a016925be (diff) | |
| download | living-village-f01aa1a9a8d19db5ab908ddbb30b0467be8aa092.tar.gz | |
p70: 启动帧率与渲染基准(真实可复跑数据)
- scripts/bench-p70.sh:两档基准——Kernel --performance-baseline(6000 tick ×3)
+ Desktop xvfb 60s 真实帧循环;scripts/analyze-p70.py 汇总裁决
- Game.fs:LV_FRAME_LOG=1 逐帧日志(墙钟帧间隔 + GC 线程分配增量 + tick/panel),
仅新增日志,不改渲染/更新逻辑
- P70PerformanceBaselineTests:Pin --performance-baseline final_digest=953775FA…(防漂移)
- 实测:Kernel tps mean=466679 alloc=3032184 gen0/1/2=0/0/0 determinism=PASS;
Desktop 60s frames=8788 fps=139.3 mean=7.179ms max=33.919ms 掉帧>33.3ms=2
每帧分配 mean=231KB p95=297KB;dotnet-counters 缺席已如实标注
- Desktop 338/338、Kernel 120/120;Kernel/Sim/渲染口径/字形表未动
Diffstat (limited to 'src/LivingVillage.Kernel.Tests/P70PerformanceBaselineTests.fs')
| -rw-r--r-- | src/LivingVillage.Kernel.Tests/P70PerformanceBaselineTests.fs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/LivingVillage.Kernel.Tests/P70PerformanceBaselineTests.fs b/src/LivingVillage.Kernel.Tests/P70PerformanceBaselineTests.fs new file mode 100644 index 0000000..ea98f34 --- /dev/null +++ b/src/LivingVillage.Kernel.Tests/P70PerformanceBaselineTests.fs @@ -0,0 +1,18 @@ +namespace LivingVillage.Kernel.Tests + +open Microsoft.VisualStudio.TestTools.UnitTesting +open LivingVillage.Headless + +/// P70:把 Headless `--performance-baseline`(defaultConfiguration)的最终 digest 钉住, +/// 作为 Kernel/Sim 数值路径漂移的护栏。与 scripts/bench-p70.sh 的 Kernel 档同一输入。 +[<TestClass>] +type P70PerformanceBaselineTests () = + + [<TestMethod>] + member _.PerformanceBaselineDigestIsPinned () = + let world = PerformanceProbe.runSteps PerformanceProbe.defaultConfiguration + let digest = PerformanceProbe.worldDigest world + printfn "P70 performance baseline digest=%s" digest + Assert.AreEqual<string>( + "953775FAEB2FDDE97289491AA260BD8D390C571E48A7A13AD2CB6FB7124F7F6C", + digest) |
