Function
write
(name: string, durationMs: number, fields?: Record<string, string | number | boolean | undefined>)
Source from the content-addressed store, hash-verified
| 30 | } |
| 31 | |
| 32 | function 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 | |
| 42 | export * as ACPProfile from "./profile" |
Tested by
no test coverage detected