@casoon/auditmysite
Version:
Professional website analysis suite with robust accessibility testing, Core Web Vitals performance monitoring, SEO analysis, and content optimization insights. Features isolated browser contexts, retry mechanisms, and comprehensive API endpoints for profe
56 lines • 1.6 kB
TypeScript
/**
* ⚡ Enhanced Performance Metrics Collector
*
* Collects comprehensive performance metrics including:
* - Core Web Vitals (LCP, INP, CLS)
* - Advanced timing metrics (TTFB, FID, TBT)
* - Resource timing analysis
* - Network performance analysis
* - Performance scoring and grading
*/
import { Page } from 'playwright';
import { PerformanceMetrics, QualityAnalysisOptions } from '../types/enhanced-metrics';
export declare class PerformanceCollector {
private options;
private contentAnalyzer;
constructor(options?: QualityAnalysisOptions);
/**
* Collect comprehensive performance metrics for a webpage
*/
collectEnhancedMetrics(page: Page, url: string | {
loc: string;
}): Promise<PerformanceMetrics>;
/**
* Collect Core Web Vitals metrics
*/
private collectCoreWebVitals;
/**
* Collect additional timing metrics
*/
private collectTimingMetrics;
/**
* Fallback LCP measurement using largest image/text element
*/
private fallbackLCPMeasurement;
/**
* Calculate Total Blocking Time
*/
private calculateTotalBlockingTime;
/**
* Calculate Speed Index (simplified)
*/
private calculateSpeedIndex;
/**
* Calculate overall performance score
*/
private calculatePerformanceScore;
/**
* Calculate performance grade from score
*/
private calculatePerformanceGrade;
/**
* Generate performance recommendations
*/
private generatePerformanceRecommendations;
}
//# sourceMappingURL=performance-collector.d.ts.map