import type { FlameNode, HotFrame, V8CpuProfile } from './types.js';
interface Aggregated {
    tree: FlameNode;
    durationMs: number;
    sampleCount: number;
    hot: HotFrame[];
}
/**
 * Aggregates a raw V8 CPU profile into a flamegraph frame tree with self/total
 * time in milliseconds. Pure and deterministic — no inspector dependency, so it
 * is trivially unit-testable and runs OUTSIDE any hot path (only when a capture
 * actually completes).
 *
 * Method: each sample's `timeDelta` (microseconds) is charged to the SELF time
 * of the node it landed on. Total time is then the sum of a node's self time and
 * its descendants', computed by a single post-order walk. The flame tree mirrors
 * V8's `children` call-graph so callers nest exactly as they did at runtime.
 */
export declare function aggregateCpuProfile(profile: V8CpuProfile): Aggregated;
export {};
//# sourceMappingURL=aggregate-profile.d.ts.map