/** * Performance Analyzer Service * * Detects performance anti-patterns in code */ import type { PerformancePattern, PerformanceAnalysisResult, PerformanceConfig } from "../types/performance.js"; /** * Service for detecting performance anti-patterns in code. * * Scans for common performance issues like N+1 queries, memory leaks, * inefficient loops, and provides fix suggestions based on patterns. */ export declare class PerformanceAnalyzer { private projectRoot; private config; private patterns; /** * @param projectRoot - Root directory of the project */ constructor(projectRoot: string); /** * Load configuration from .cortex/performance.json */ loadConfig(): Promise; /** * Save configuration to .cortex/performance.json */ saveConfig(config: Partial): Promise; /** * Analyze files for performance issues */ analyzeFiles(files: string[]): Promise; /** * Analyze a single file */ private analyzeFile; /** * Find pattern matches in file */ private findPatternInFile; /** * Check if pattern appears in specific context */ private checkContext; /** * Check if file matches a pattern (glob-like) */ private matchesPattern; /** * Get built-in performance patterns */ private getBuiltInPatterns; /** * Add custom pattern */ addCustomPattern(pattern: PerformancePattern): Promise; /** * Get all patterns (built-in + custom) */ getPatterns(): PerformancePattern[]; /** * Disable a pattern */ disablePattern(patternName: string): Promise; /** * Enable a pattern */ enablePattern(patternName: string): Promise; } //# sourceMappingURL=performance-analyzer.d.ts.map