import * as BatchedLogger from "./BatchedLogger"; declare const MetricTypeList: readonly ["count", "gauge", "time"]; export type MetricType = typeof MetricTypeList[number]; export interface MetricsLog extends BatchedLogger.LogData { type: MetricType; } export declare class Metrics { /** * Count the number of times something has happened. * * Metrics.increment("page.load"); * Metrics.increment("page.load"); * Metrics.increment("apps.created", 4); * Metrics.increment("apps.created", 2); */ static increment(key: string, count?: number): void; /** * Record the current value of something that changes over time. * * Metrics.gauge("cpu.load", 67); * Metrics.gauge("cpu.load", 32); */ static gauge(key: string, value: number): void; /** * Time how long it takes to perform a task. * * Metrics.time("some.calculation", () => { calculateThings(); }); * Metrics.time("long.running", longRunningTask); */ static time(key: string, fn: () => any): Promise; /** * Record the time it took to perform a task. * * const duration = taskComplete - taskStart; * Metrics.timing("task.processing_time", duration); */ static timing(key: string, value: number): void; static log(metricType: MetricType, key: string, value: number): void; } export {};