From f01aa1a9a8d19db5ab908ddbb30b0467be8aa092 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Tue, 29 Sep 2026 09:42:17 +0800 Subject: p70: 启动帧率与渲染基准(真实可复跑数据) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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/渲染口径/字形表未动 --- .../P70PerformanceBaselineTests.fs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/LivingVillage.Kernel.Tests/P70PerformanceBaselineTests.fs (limited to 'src/LivingVillage.Kernel.Tests/P70PerformanceBaselineTests.fs') 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 档同一输入。 +[] +type P70PerformanceBaselineTests () = + + [] + member _.PerformanceBaselineDigestIsPinned () = + let world = PerformanceProbe.runSteps PerformanceProbe.defaultConfiguration + let digest = PerformanceProbe.worldDigest world + printfn "P70 performance baseline digest=%s" digest + Assert.AreEqual( + "953775FAEB2FDDE97289491AA260BD8D390C571E48A7A13AD2CB6FB7124F7F6C", + digest) -- cgit v1.2.3