Skip to content

Commit 732a6ce

Browse files
thdxrJM-Mendez
authored andcommitted
feat: add startup debug command (anomalyco#24310)
1 parent 410fe04 commit 732a6ce

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

packages/opencode/src/cli/cmd/debug/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { ScrapCommand } from "./scrap"
99
import { SkillCommand } from "./skill"
1010
import { SnapshotCommand } from "./snapshot"
1111
import { AgentCommand } from "./agent"
12+
import { StartupCommand } from "./startup"
1213

1314
export const DebugCommand = cmd({
1415
command: "debug",
@@ -22,6 +23,7 @@ export const DebugCommand = cmd({
2223
.command(ScrapCommand)
2324
.command(SkillCommand)
2425
.command(SnapshotCommand)
26+
.command(StartupCommand)
2527
.command(AgentCommand)
2628
.command(PathsCommand)
2729
.command({
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { EOL } from "os"
2+
import { cmd } from "../cmd"
3+
4+
export const StartupCommand = cmd({
5+
command: "startup",
6+
describe: "print startup timing",
7+
builder: (yargs) => yargs,
8+
handler() {
9+
process.stdout.write(performance.now().toString() + EOL)
10+
},
11+
})

0 commit comments

Comments
 (0)