mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-21 13:44:03 +00:00
tests: use multi-sample CLI startup baselines
This commit is contained in:
@@ -26,6 +26,7 @@ type SummaryStats = {
|
||||
};
|
||||
|
||||
type CaseSummary = {
|
||||
sampleCount: number;
|
||||
durationMs: SummaryStats;
|
||||
maxRssMb: SummaryStats | null;
|
||||
exitSummary: string;
|
||||
@@ -216,6 +217,7 @@ function summarizeSamples(samples: Sample[]): CaseSummary {
|
||||
.map((sample) => sample.maxRssMb)
|
||||
.filter((value): value is number => typeof value === "number" && Number.isFinite(value));
|
||||
return {
|
||||
sampleCount: samples.length,
|
||||
durationMs: durations,
|
||||
maxRssMb: rssValues.length > 0 ? summarizeNumbers(rssValues) : null,
|
||||
exitSummary: collectExitSummary(samples),
|
||||
|
||||
@@ -13,8 +13,8 @@ if (process.argv.slice(2).includes("--help")) {
|
||||
" --out <path> Output path (default: test/fixtures/cli-startup-bench.json)",
|
||||
" --entry <path> CLI entry to benchmark (default: openclaw.mjs)",
|
||||
" --preset <name> startup | real | all (default: all)",
|
||||
" --runs <n> Measured runs per case (default: 1)",
|
||||
" --warmup <n> Warmup runs per case (default: 0)",
|
||||
" --runs <n> Measured runs per case (default: 5)",
|
||||
" --warmup <n> Warmup runs per case (default: 1)",
|
||||
" --timeout-ms <ms> Per-run timeout (default: 30000)",
|
||||
" --help Show this help text",
|
||||
"",
|
||||
@@ -31,8 +31,8 @@ const opts = parseFlagArgs(
|
||||
out: cliStartupBenchManifestPath,
|
||||
entry: "openclaw.mjs",
|
||||
preset: "all",
|
||||
runs: 1,
|
||||
warmup: 0,
|
||||
runs: 5,
|
||||
warmup: 1,
|
||||
timeoutMs: 30_000,
|
||||
},
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user