import type { PerformanceEntry } from 'node:perf_hooks';
/**
 * Starts a performance measurement that can be disposed later to record the elapsed time.
 * @param name - The name of the performance measurement. This should be unique for each measurement.
 * @returns A Disposable object that, when disposed, will end and record the performance measurement.
 */
export declare function measureUntilDisposed(name: string): Disposable;
/**
 * Measures the execution time of a Promise-returning function.
 * @param name - The name of the performance measurement. This should be unique for each measurement.
 * @param fn - A function that returns a Promise. This function will be executed, and its execution time will be measured.
 * @returns A Promise that resolves with the result of the function.
 */
export declare function measureAsyncFn<T>(name: string, fn: () => Promise<T>): Promise<T>;
/**
 * Measures the execution time of a synchronous function.
 * @param name - The name of the performance measurement. This should be unique for each measurement.
 * @param fn - A function that returns a value. This function will be executed, and its execution time will be measured.
 * @returns The result of the function.
 */
export declare function measureFn<T>(name: string, fn: () => T): T;
/**
 * Collects performance measurements that were created after a specified start time.
 * @param startTime - The start time in milliseconds from which to collect performance measurements.
 * @returns An array of `PerformanceEntry` objects with start times greater than or equal to the specified start time.
 */
export declare function collectPerformanceEntries(startTime: number): PerformanceEntry[];
//# sourceMappingURL=performance.d.ts.map