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

Function duration

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

Source from the content-addressed store, hash-verified

7}
8
9export function duration(
10 name: string,
11 startedAt: number,
12 fields?: Record<string, string | number | boolean | undefined>,
13) {
14 if (!enabled) return
15 write(name, performance.now() - startedAt, fields)
16}
17
18export async function measure<T>(
19 name: string,

Callers

nothing calls this directly

Calls 1

writeFunction · 0.70

Tested by

no test coverage detected