(name: string, outcome: string, durationMs: number)
| 72 | // for one server-side Sim tool dispatch (executor=sim). outcome is the bounded |
| 73 | // tool outcome (success/error/…). Pure telemetry. |
| 74 | export function recordSimToolMetric(name: string, outcome: string, durationMs: number): void { |
| 75 | const { toolDuration, toolCalls } = instruments() |
| 76 | const attrs = { |
| 77 | [TraceAttr.ToolName]: cappedToolName(name), |
| 78 | [TraceAttr.ToolExecutor]: 'sim', |
| 79 | [TraceAttr.ToolOutcome]: outcome, |
| 80 | } |
| 81 | toolCalls.add(1, attrs) |
| 82 | if (durationMs >= 0) toolDuration.record(durationMs, attrs) |
| 83 | } |
| 84 | |
| 85 | // recordVfsMaterialize records VFS materialization time. Call once per phase |
| 86 | // with that phase's duration and once with phase="total" for the whole op, so |
no test coverage detected