MCPcopy Create free account
hub / github.com/anomalyco/opencode / write

Function write

packages/opencode/src/acp/profile.ts:32–40  ·  view source on GitHub ↗
(name: string, durationMs: number, fields?: Record<string, string | number | boolean | undefined>)

Source from the content-addressed store, hash-verified

30}
31
32function write(name: string, durationMs: number, fields?: Record<string, string | number | boolean | undefined>) {
33 const extra = fields
34 ? Object.entries(fields)
35 .filter((entry): entry is [string, string | number | boolean] => entry[1] !== undefined)
36 .map(([key, value]) => `${key}=${value}`)
37 .join(" ")
38 : ""
39 console.error(`[acp-profile] ${name} ${Math.round(durationMs)}ms${extra ? ` ${extra}` : ""}`)
40}
41
42export * as ACPProfile from "./profile"

Callers 3

markFunction · 0.70
durationFunction · 0.70
measureFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected