/** * Performance Testing Helper for Load and Timing Tests - TypeScript Implementation * * This class focuses solely on performance measurement and testing concerns. * It provides standardized performance measurement across test suites. */ interface TimingMeasurement { result: any; duration: number; durationNs: number; timestamp: Date; } interface ConcurrencyResult { index: number; result?: any; error?: string; duration: number; success: boolean; } interface ConcurrencyTestResult { results: ConcurrencyResult[]; totalDuration: number; successCount: number; errorCount: number; averageDuration: number; maxDuration: number; minDuration: number; } /** * Performance Testing Helper for Load and Timing Tests * * This class provides standardized performance measurement across test suites * with timing assertions and concurrency testing capabilities. */ declare class PerformanceTestHelper { /** * Measures execution time of async operations with high precision */ static measureTime(operation: () => Promise): Promise; /** * Asserts operation completes within time limit */ static assertTimingConstraint(operation: () => Promise, maxDuration: number): Promise; /** * Tests concurrent operations for race conditions and performance */ static testConcurrency(operations: Array<() => Promise>): Promise; /** * Measures memory usage during operation execution */ static measureMemory(operation: () => Promise): Promise<{ result: any; memoryUsage: NodeJS.MemoryUsage; }>; /** * Runs load testing with specified concurrent users */ static loadTest(operation: () => Promise, concurrentUsers: number, iterations: number): Promise; /** * Creates a performance benchmark suite */ static createBenchmarkSuite(operations: Record Promise>): any; } export { PerformanceTestHelper }; //# sourceMappingURL=performanceTestHelper.d.ts.map