(context: Context.Context<never>)
| 3063 | * @since 4.0.0 |
| 3064 | */ |
| 3065 | export const snapshotUnsafe = (context: Context.Context<never>): ReadonlyArray<Metric.Snapshot> => { |
| 3066 | const registry = Context.get(context, MetricRegistry) |
| 3067 | return Array.from(registry.values()).map(({ hooks, ...meta }) => ({ |
| 3068 | ...meta, |
| 3069 | state: hooks.get(context) |
| 3070 | })) |
| 3071 | } |
| 3072 | |
| 3073 | const renderName = (metric: Metric.Snapshot, padTo: number): string => `name=${metric.id.padEnd(padTo, " ")}` |
| 3074 |