UNPKG

eslint-rule-benchmark

Version:

Benchmark ESLint rules with detailed performance metrics for CI and plugin development

11 lines (10 loc) 496 B
import { BenchmarkMetrics } from '../../types/benchmark-metrics' /** * Calculates various statistical metrics from an array of numbers. Assumes * input samples are in nanoseconds for time-based metrics. * * @param samples - The array of numbers (e.g., execution times in ns). Should * not be empty. If it might be, the caller should handle that case. * @returns An object containing calculated metrics. */ export declare function calculateStatistics(samples: number[]): BenchmarkMetrics