import { DefaultLogLevels } from "./LogUtils";
type Logger = {
    debug: (...args: any[]) => void;
    warn: (...args: any[]) => void;
};
type Detail = {
    message?: string;
    [key: string]: unknown;
};
export type PerformanceData = {
    task: string;
    duration: number;
    message: string;
    at: string;
    data?: Record<string, unknown>;
};
type ProfilerOptions = {
    logger: Logger;
    at: string;
    logLevel?: DefaultLogLevels;
} & Record<string, unknown>;
export declare class Profiler {
    private marks;
    private at;
    private detail;
    private logger;
    constructor({ logger, at, logLevel, ...detail }: ProfilerOptions);
    warn(data: Parameters<Logger["warn"]>[0]): void;
    logMeasure(data: Omit<PerformanceData, "at">): void;
    start(task: string, detail?: Detail): {
        startTime: number;
        stop: (_detail?: Detail) => number | undefined;
    };
    mark(label: string, detail?: Detail): number;
    measure(task: string, params: {
        from: string;
        to?: string;
    } & Detail): number | undefined;
    measureAsync<T>(pr: Promise<T>, task: string, detail?: Detail): Promise<T>;
    measureSync<T>(fn: () => T, task: string, detail?: Detail): T;
}
export {};
