/**
* Generic representation of an xctrace exported table.
*
* xctrace's XML uses an id/ref deduplication scheme: a value's first occurrence
* carries `id="N"`, later identical occurrences appear as `
`.
* Our parser resolves all refs so each row is a flat record.
*/
export interface XctraceTable {
schema: string;
columns: string[];
rows: Array>;
}
/**
* A column value. The `fmt` field is what Instruments displays in its UI;
* `raw` is the underlying value (timestamp in ns, duration in ns, etc.).
* `nested` is present when the value contains structured sub-elements
* (e.g. a thread cell containing tid + process + pid).
*
* The `name` field carries the `@_name` attribute used by xctrace for
* `` and `` elements in stack
* backtraces. Without it, time-profile rows lose their symbol metadata.
*/
export interface XctraceValue {
raw?: string;
fmt?: string;
name?: string;
nested?: Record;
}
/**
* Parse a chunk of xctrace XML output (from `xcrun xctrace export --xpath ...`)
* into structured tables.
*/
export declare function parseXctraceXml(xml: string): XctraceTable[];
/** Helper: pull a numeric value from an XctraceValue (raw nanoseconds, ms, etc.). */
export declare function asNumber(v: XctraceValue | undefined): number | undefined;
/** Helper: pull a formatted string from an XctraceValue. */
export declare function asFormatted(v: XctraceValue | undefined): string | undefined;