Launcher measurements: a session performance log and horizon-launcher benchmark
Each session rewrites benchmarks/launcher-<time>-session.json in the data folder (report format v1): start to first frame, release list fetch, install/update and prepare durations, Play to the game's first frame (the game now logs its first frame), RSS, UI frame times, binary size. horizon-launcher benchmark starts the launcher N times (cold, then warm), switches pages, measures idle CPU and memory and the release list fetch, and writes one report with means and 95% CIs. Nothing is uploaded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -118,6 +118,13 @@ enum Cmd {
|
||||
},
|
||||
/// Serve the Model Context Protocol on stdin and stdout, for AI agents
|
||||
Mcp,
|
||||
/// Measure the launcher: starts (the first is the cold one), page switching, idle CPU and
|
||||
/// memory, the release list fetch; writes a benchmark report to benchmarks/ in its data folder
|
||||
Benchmark {
|
||||
/// How many times to start it
|
||||
#[arg(long, default_value_t = 5)]
|
||||
repeats: usize,
|
||||
},
|
||||
}
|
||||
|
||||
/// Runs a subcommand and returns the exit code, or None when the window should open.
|
||||
@@ -292,6 +299,14 @@ fn execute(command: Cmd, as_json: bool) -> Result<(), String> {
|
||||
}
|
||||
}
|
||||
Cmd::Account { action } => account_command(action.unwrap_or(AccountCmd::List), as_json)?,
|
||||
Cmd::Benchmark { repeats } => {
|
||||
let path = crate::perf::benchmark(repeats.max(1))?;
|
||||
if as_json {
|
||||
json(serde_json::json!({ "report": path }));
|
||||
} else {
|
||||
println!("{}", path.display());
|
||||
}
|
||||
}
|
||||
Cmd::Links => {
|
||||
let links = backend::links();
|
||||
if as_json {
|
||||
|
||||
Reference in New Issue
Block a user