feat: add startup debug command (#24310)

This commit is contained in:
Dax 2026-04-25 11:08:19 -04:00 committed by GitHub
parent 62ef2a2207
commit 1d728fc627
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View file

@ -9,6 +9,7 @@ import { ScrapCommand } from "./scrap"
import { SkillCommand } from "./skill" import { SkillCommand } from "./skill"
import { SnapshotCommand } from "./snapshot" import { SnapshotCommand } from "./snapshot"
import { AgentCommand } from "./agent" import { AgentCommand } from "./agent"
import { StartupCommand } from "./startup"
export const DebugCommand = cmd({ export const DebugCommand = cmd({
command: "debug", command: "debug",
@ -22,6 +23,7 @@ export const DebugCommand = cmd({
.command(ScrapCommand) .command(ScrapCommand)
.command(SkillCommand) .command(SkillCommand)
.command(SnapshotCommand) .command(SnapshotCommand)
.command(StartupCommand)
.command(AgentCommand) .command(AgentCommand)
.command(PathsCommand) .command(PathsCommand)
.command({ .command({

View file

@ -0,0 +1,11 @@
import { EOL } from "os"
import { cmd } from "../cmd"
export const StartupCommand = cmd({
command: "startup",
describe: "print startup timing",
builder: (yargs) => yargs,
handler() {
process.stdout.write(performance.now().toString() + EOL)
},
})