/// /** * Incrementally updated statistics on a set of values. * @public */ export declare class Statistics { /** The number of decimal places to print in {@link Statistics.toString} */ protected printFixedPrecision: number; /** Number of values observed. */ samples: number; /** The maximum value observed. Initialized to `Number.NEGATIVE_INFINITY`. */ max: number; /** The minimum value observed. Initialized to `Number.POSITIVE_INFINITY`. */ min: number; /** The variance of the values observed. */ variance: number; /** The standard deviation of the values observed. */ stdev: number; /** The mean (average) of the values observed. */ mean: number; /** * Incrementally track mean, stdev, min, max, of a sequence of values. * @param printFixedPrecision - The number of decimal places to print in * {@link Statistics.toString}. */ constructor( /** The number of decimal places to print in {@link Statistics.toString} */ printFixedPrecision?: number); /** @internal */ clone(): Statistics & this; /** * Update statistics with a new value in the sequence. */ update(value: number | undefined): void; /** * Print the mean of the observations seen, with the precision specified in * the constructor. */ toString(): string; } export declare class ExponentiallyDecayingAverageValue { smoothingFactor: number; samples: number; value: number; constructor(smoothingFactor: number); update(n: number): void; toString(): number; } export declare function sleep(ms: number, cancel?: Promise): Promise; export declare function streamToBuffer(s: NodeJS.ReadableStream): Promise; export declare function chomp(s: string): string; export declare const sum: (a: number[]) => number; export declare function objectSize(obj?: { [key: string]: string; }): number; export declare function computeHttpResponseBytes(headers: { [key: string]: string; }, opts?: { httpHeaders: boolean; min: number; }): number; export declare function hasExpired(date: string | number | undefined | null, retentionInDays: number): boolean; export declare function roundTo100ms(n: number): number; export declare const uuidv4Pattern = "[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}"; export declare const GB: number; export declare const MB: number; export declare const KB: number; export declare function f1(n: number): string; export declare function f2(n: number): string; export declare function keysOf(obj: O): Array; export declare function defined(arg: T | undefined | null | void): arg is T; export declare class MaxHeap { protected _heap: number[]; get size(): number; clear(): void; peekMax(): number; insert(value: number): void; extractMax(): number; [Symbol.iterator](): IterableIterator; } export declare class SmallestN { protected _size: number; protected _heap: MaxHeap; protected _map: [number, T][]; constructor(_size: number); update(key: number, value: T): void; protected shrink(): void; [Symbol.iterator](): IterableIterator<[number, T]>; entries(): () => IterableIterator<[number, T]>; keys(): number[]; get size(): number; clear(): void; setSize(newSize: number): void; }