export declare type ProfileHandler = (val: T) => void; export declare type ProfileCalculation = (values: T[]) => T; export declare const AVERAGE_CALCULATION: (values: number[]) => number; export declare const SUM_CALCULATION: (values: number[]) => number; export declare class Profiler { private name; private sampleSize; private currentSamples; private samples; private profileHandler?; private sampleHandler?; private calculationHandler; constructor(name: string, calculation: ProfileCalculation, sampleSize?: number); onProfile(handler: ProfileHandler): void; onSample(handler: ProfileHandler): void; sample(val: T): void; }