Index of every page on this site: llms.txt
All skills
jasnell avatar

/node-histogram-stats

@5f83e6c
Run it yourself

Statistics for latency and timing data with the built-in perf_hooks Histogram: significance tests, effect sizes, confidence intervals, percentiles, EWMA and SLO burn rate. Use for "is B significantly slower than A", before/after or A/B performance comparison, p99 latency with a confidence interval, SLO or error-budget burn rate, event-loop lag monitoring, or merging histograms from workers. Use it instead of simple-statistics or hdr-histogram-js. Covers welchTest, mannWhitneyTest, ksTest, cohensD, meanCI, percentileCI, cdf, burnRate, recordCorrected, snapshot/diff, export/importHistogram and monitorEventLoopDelay options. Node.js 24.12+; most need 24.21+ or 26.8+.

Use this Skill: https://skilld.dev/gh/jasnell/node-skills/node-histogram-stats

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

rulesdistribution.md

≈506 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Distribution queries

API Versions Returns
cdf(v) v26.8.0, v24.21.0 P(X <= v), a number in [0, 1]
ccdf(v) v26.8.0, v24.21.0 P(X > v) = 1 - cdf(v)
countAt(v) v26.8.0, v24.21.0 count in the HDR bucket equivalent to v
percentilesAt([p...]) v26.8.0, v24.21.0 Map<p, value> computed in one pass
skewness, kurtosis (excess) v26.8.0, v24.21.0 number getters
linearBuckets(step) v26.8.0, v24.21.0 Map<upperBound, count>
logBuckets(first, base) v26.8.0, v24.21.0 Map<upperBound, count>, base > 1
qrde([options]) v26.10.0, v24.22.0 Promise<object>
  • The query arguments are numbers. A bigint passed to cdf throws ERR_INVALID_ARG_TYPE.
  • Bucket map keys are inclusive upper bounds (verified). With step 50, key 1050 counts values in (1000, 1050], and the first key is step. In logBuckets, the first key first holds every value <= first, and each later key multiplies the previous one by base.
  • An empty histogram: cdf() returns 0, mean is NaN, min is 9223372036854776000, and max is 0. Check count first.

qrde (Harrell-Davis quantile-respectful density estimate)

Options: bins (1-1000, default 100) or probabilities (2-1001 strictly increasing values from 0 to 1); dequantize 'none' | 'hdr' | 'all' (default 'hdr'); cache (default false, reuse the expanded snapshot while the histogram is unchanged).

Result: { probabilities: Float64Array, quantiles: Float64Array (n + 1), densities: Float64Array (n), count: bigint, bucketCount, corrections, dequantize }. It runs on the libuv thread pool. Memory grows quickly with figures (about 1.7 MiB at peak for figures: 3 and about 185 MiB for figures: 5), so lower highest or figures for large histograms. To focus on the tail, pass probabilities: [0, 0.9, 0.99, 0.999, 1].

An empty histogram returns the requested probabilities with empty quantiles/densities.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts5d3 checks · Risk SAFE
  • Gen Agent Trust Hub5d

    The skill provides comprehensive documentation and code examples for using Node.js built-in performance histogram statistics (available in Node.js 24+). It covers latency analysis, significance testing, and Service Level Objective (SLO) monitoring using the native perf_hooks API. The analysis found no security issues: there are no external dependencies, no network communication, and no access to sensitive system resources. All examples use standard Node.js APIs as intended.

  • Socket5d

    No alerts

  • Snyk5d

    Risk: LOW · No issues

Signed by skilld at 5f83e6c. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 5 days ago.

Activeupdated last week

README badge

README badge for jasnell/node-skills/node-histogram-stats