From 6f904d6f8528bd13941894af3db16d0bc3b0aeb3 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Sun, 20 Sep 2026 19:32:52 +0800 Subject: perf: add simulation baseline probe --- src/LivingVillage.Headless/Program.fs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/LivingVillage.Headless/Program.fs') diff --git a/src/LivingVillage.Headless/Program.fs b/src/LivingVillage.Headless/Program.fs index e34ecc0..f5f9c5b 100644 --- a/src/LivingVillage.Headless/Program.fs +++ b/src/LivingVillage.Headless/Program.fs @@ -367,8 +367,7 @@ let runBatch (worlds: int) (days: int64) : int = printfn "M3_ACCEPTANCE=%s" (if allPass then "PASS" else "FAIL") if allPass then 0 else 1 -[] -let main argv = +let runExisting (argv: string[]) = let rec parse (i: int) (days: int64 option) @@ -431,5 +430,12 @@ let main argv = if stats.NonFinite > 0L || stats.OutOfBounds > 0L || not replayOk then 1 else 0 | Error msg -> eprintfn $"headless: {msg}" - eprintfn "usage: dotnet run -c Release --project src/LivingVillage.Headless -- --days N --seed S [--npc N] [--dump-relations] [--dump-rumors] [--replay-rumors] | --m5-smoke | --batch K D" + eprintfn "usage: dotnet run -c Release --project src/LivingVillage.Headless -- --days N --seed S [--npc N] [--dump-relations] [--dump-rumors] [--replay-rumors] | --m5-smoke | --batch K D | --performance-baseline" 2 + +[] +let main argv = + if argv.Length = 1 && argv.[0] = "--performance-baseline" then + LivingVillage.Headless.PerformanceProbe.runDefault () + else + runExisting argv -- cgit v1.2.3