mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-28 13:02:21 +01:00
Tray targets use strobe's windowless native target; a hidden launch ends on the local API's start line; listening cases with released and open microphone profiles.
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
// Launches (docs/perf.md): process start, fonts, GPU device and pipelines,
|
|
// and the first frames.
|
|
import { bench, native } from "@hona/strobe"
|
|
|
|
const api = { match: "local API started" }
|
|
|
|
export default bench({
|
|
targets: {
|
|
// Needs an unlocked session: it ends on the window's first painted frame.
|
|
window: native("hex", { bridge: false }),
|
|
// A login launch with no window. Runs on a locked session too.
|
|
tray: native("hex", { args: ["--hidden"], window: false, bridge: false }),
|
|
},
|
|
cases: {
|
|
"cold-launch": {
|
|
targets: ["window"],
|
|
primary: "launch.ready",
|
|
metrics: ["launch.settled", "launch.api", "cpu.work", "memory.app.private"],
|
|
launch: {
|
|
until: { window: "painted" },
|
|
// The local API starts on its own thread while the window opens.
|
|
milestones: { api },
|
|
},
|
|
},
|
|
// To the local API answering: the runtime, tray, and overlays are up.
|
|
"hidden-launch": {
|
|
targets: ["tray"],
|
|
primary: "launch.ready",
|
|
metrics: ["cpu.work", "memory.app.private"],
|
|
launch: {
|
|
until: { milestone: "api" },
|
|
milestones: { api },
|
|
},
|
|
},
|
|
},
|
|
})
|