import { type SegmentSemantics, type SemanticSourceStatus } from './criticalPathSemantics';
import { type WakerHop } from './criticalPathWakerChain';
import { type CriticalPathQuantification } from './criticalPathQuantify';
import type { TraceProcessorService } from './traceProcessorService';
export interface CriticalPathAnalyzeOptions {
    threadStateId?: number | string;
    utid?: number | string;
    startTs?: number | string;
    dur?: number | string;
    endTs?: number | string;
    maxSegments?: number;
    recursionDepth?: number;
    recursionEnabled?: boolean;
    segmentBudget?: number;
}
export interface CriticalPathTaskInfo {
    threadStateId?: number;
    utid: number;
    tid?: number | null;
    upid?: number | null;
    startTs: number;
    dur: number;
    durationMs: number;
    state?: string | null;
    blockedFunction?: string | null;
    ioWait?: boolean | null;
    cpu?: number | null;
    threadName?: string | null;
    processName?: string | null;
    waker?: {
        threadStateId?: number | null;
        utid?: number | null;
        threadName?: string | null;
        processName?: string | null;
        state?: string | null;
        interruptContext?: boolean | null;
    };
}
export interface CriticalPathSegment {
    startTs: number;
    dur: number;
    startOffsetMs: number;
    durationMs: number;
    utid: number;
    tid?: number | null;
    upid?: number | null;
    processName?: string | null;
    threadName?: string | null;
    state?: string | null;
    blockedFunction?: string | null;
    ioWait?: boolean | null;
    cpu?: number | null;
    slices: string[];
    modules: string[];
    reasons: string[];
    semantics?: SegmentSemantics;
    recursionDepth?: number;
    children?: CriticalPathSegment[];
}
export interface CriticalPathModuleStat {
    module: string;
    durationMs: number;
    percentage: number;
    segmentCount: number;
    examples: string[];
}
export interface CriticalPathAnomaly {
    severity: 'critical' | 'warning' | 'info';
    title: string;
    detail: string;
    evidence: string[];
}
export type SliceKind = 'sleeping' | 'uninterruptible' | 'runnable' | 'running' | 'unknown';
export interface SliceFinding {
    threadStateId: number | null;
    startTs: number;
    endTs: number;
    durationMs: number;
    state: string | null;
    kind: SliceKind;
    cpu: number | null;
    blockedFunction: string | null;
    ioWait: boolean | null;
    skippedReason?: string;
    segmentCount: number;
}
export interface CriticalPathAnalysis {
    available: boolean;
    task: CriticalPathTaskInfo;
    totalMs: number;
    blockingMs: number;
    selfMs: number;
    externalBlockingPercentage: number;
    wakeupChain: CriticalPathSegment[];
    moduleBreakdown: CriticalPathModuleStat[];
    anomalies: CriticalPathAnomaly[];
    summary: string;
    recommendations: string[];
    warnings: string[];
    rawRows: number;
    truncated: boolean;
    slices?: SliceFinding[];
    directWaker?: WakerHop | null;
    quantification?: CriticalPathQuantification;
    semanticSources?: Record<string, SemanticSourceStatus>;
}
export declare function analyzeCriticalPath(traceProcessorService: TraceProcessorService, traceId: string, options?: CriticalPathAnalyzeOptions): Promise<CriticalPathAnalysis>;
//# sourceMappingURL=criticalPathAnalyzer.d.ts.map