updated skills
This commit is contained in:
@@ -66,4 +66,3 @@ await exporter.export(exporter.convertEntries(profiler.getEntries()));
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
|
||||
@@ -45,9 +45,9 @@ await writeFile("flame.json", JSON.stringify(json));
|
||||
|
||||
- `class FlameGraphGenerator` — no constructor args (stateless).
|
||||
- Methods:
|
||||
- `generate(entries: readonly ProfileEntry[]): FlameNode`
|
||||
- `toD3Format(node: FlameNode): { name, value, children }`
|
||||
- `collapseRecursive(node: FlameNode): FlameNode`
|
||||
- `generate(entries: readonly ProfileEntry[]): FlameNode`
|
||||
- `toD3Format(node: FlameNode): { name, value, children }`
|
||||
- `collapseRecursive(node: FlameNode): FlameNode`
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
|
||||
@@ -12,11 +12,11 @@ Owns the OpenTelemetry meter, counters, and histograms emitted by `@suaveplan/pr
|
||||
|
||||
- Lazy-bound meter via `metrics.getMeter("@suaveplan/profiler")` — resolves to a no-op meter when no `MeterProvider` is registered, so importing the module is free in production code paths that opt out of telemetry.
|
||||
- Five instruments:
|
||||
- `profiler_entries_total` (counter, tagged by `category` when present)
|
||||
- `profiler_marks_total` (counter)
|
||||
- `profiler_samples_total` (counter)
|
||||
- `profiler_memory_snapshots_total` (counter)
|
||||
- `profiler_measure_duration_ms` (histogram, unit `ms`)
|
||||
- `profiler_entries_total` (counter, tagged by `category` when present)
|
||||
- `profiler_marks_total` (counter)
|
||||
- `profiler_samples_total` (counter)
|
||||
- `profiler_memory_snapshots_total` (counter)
|
||||
- `profiler_measure_duration_ms` (histogram, unit `ms`)
|
||||
- Pure record helpers (`recordEntry` / `recordMark` / `recordMeasureDuration` / `recordSample` / `recordMemorySnapshot`) so call sites stay readable.
|
||||
|
||||
## Usage: Basic
|
||||
|
||||
Reference in New Issue
Block a user