import { z } from "zod"; import type { AnalyzeTraceOptions, DataStatus, SupportStatus } from "../types.js"; export declare const analyzeAllocationsSchema: z.ZodObject<{ tracePath: z.ZodString; topN: z.ZodDefault; minBytes: z.ZodDefault; outputFormat: z.ZodOptional>; }, "strip", z.ZodTypeAny, { tracePath: string; topN: number; minBytes: number; outputFormat?: "markdown" | "json" | "both" | "verify-fix-table" | undefined; }, { tracePath: string; outputFormat?: "markdown" | "json" | "both" | "verify-fix-table" | undefined; topN?: number | undefined; minBytes?: number | undefined; }>; export type AnalyzeAllocationsInput = z.infer; export interface AllocationEntry { category: string; /** Live count at end of trace for this category (when available). */ liveCount?: number; /** Cumulative count over the whole recording. */ cumulativeCount: number; /** Cumulative bytes allocated for this category. */ cumulativeBytes: number; /** Average allocation size in bytes. */ averageBytes: number; /** Lifetime classification heuristic. */ lifecycle: "transient" | "persistent" | "mixed"; } export interface AnalyzeAllocationsResult { ok: boolean; tracePath: string; totals: { rows: number; cumulativeBytes: number; cumulativeAllocations: number; persistentBytes: number; transientBytes: number; }; /** Top categories by cumulative bytes. */ topByBytes: AllocationEntry[]; /** Top categories by allocation count (different signal, small frequent allocations). */ topByCount: AllocationEntry[]; diagnosis: string; /** * Disambiguates empty arrays into "no data in the trace" vs "trace could * not be exported" vs "data was exported partially". See {@link DataStatus}. * * @deprecated v1.14 item I. Use `supportStatus[]` instead. */ status: DataStatus; /** v1.14+. Unified per-area status. See {@link SupportStatus}. */ supportStatus: SupportStatus[]; } /** Pure: turn parsed XML into the analyzed result. */ export declare function analyzeAllocationsFromXml(xml: string, tracePath: string, topN?: number, minBytes?: number): AnalyzeAllocationsResult; export declare function analyzeAllocations(input: AnalyzeAllocationsInput, options?: AnalyzeTraceOptions): Promise;