agentic-qe
Version:
Agentic Quality Engineering Fleet System - AI-driven quality management platform
84 lines • 1.95 kB
TypeScript
/**
* Profile Command
* Profiles test performance with CPU and memory profiling
*/
export interface ProfileOptions {
testFile: string;
profileCPU?: boolean;
profileMemory?: boolean;
heapSnapshot?: boolean;
detectLeaks?: boolean;
export?: 'v8' | 'chrome-devtools' | 'json';
outputDir?: string;
flamegraph?: boolean;
allocationProfile?: boolean;
identifyHotFunctions?: boolean;
compareWith?: Profile;
}
export interface CPUProfile {
samples: CPUSample[];
totalTime: number;
samplingInterval: number;
}
export interface CPUSample {
timestamp: number;
functionName: string;
scriptId: number;
lineNumber: number;
columnNumber: number;
}
export interface MemoryProfile {
heapUsed: number;
heapTotal: number;
external: number;
rss: number;
heapSnapshot?: any;
leaks?: MemoryLeak[];
allocations?: Allocation[];
}
export interface MemoryLeak {
object: string;
size: number;
retainedSize: number;
location: string;
}
export interface Allocation {
size: number;
count: number;
stackTrace: string;
}
export interface HotFunction {
name: string;
file: string;
line: number;
selfTime: number;
totalTime: number;
calls: number;
percentage: number;
}
export interface Profile {
testFile: string;
timestamp: number;
cpu: CPUProfile;
memory: MemoryProfile;
hotFunctions?: HotFunction[];
}
export interface ProfileComparison {
cpuDiff: number;
memoryDiff: number;
improvementPercentage: number;
details: string[];
}
export interface ProfileResult {
success: boolean;
profile: Profile;
exportPath?: string;
flamegraphPath?: string;
comparison?: ProfileComparison;
error?: string;
}
/**
* Profile test performance
*/
export declare function profilePerformance(options: ProfileOptions): Promise<ProfileResult>;
//# sourceMappingURL=profile.d.ts.map