testgenius-ai
Version:
🚀 TestGenius AI - The Ultimate E2E Testing Framework for Everyone | No Coding Required • AI-Powered Automation • Beautiful Reports • Zero Complexity
48 lines • 1.32 kB
TypeScript
import { TokenUsage, CostMetrics, TestCostData, CostOptimizationReport, FrameworkConfig } from '../../types';
export declare class CostTracker {
private config;
private costDataFile;
private costHistoryFile;
constructor(config: FrameworkConfig);
/**
* Calculate cost for token usage
*/
calculateCost(tokenUsage: TokenUsage): CostMetrics;
/**
* Track cost for a test execution
*/
trackTestCost(testCostData: TestCostData): Promise<void>;
/**
* Update cost history for trend analysis
*/
private updateCostHistory;
/**
* Generate cost optimization report
*/
generateCostReport(): Promise<CostOptimizationReport>;
/**
* Calculate potential cost savings
*/
private calculateCostSavings;
/**
* Estimate cost with a different model
*/
private estimateCostWithModel;
/**
* Generate optimization recommendations
*/
private generateOptimizationRecommendations;
/**
* Calculate cost by category
*/
private calculateCostByCategory;
/**
* Get total cost from all tracked tests
*/
getTotalCost(): Promise<number>;
/**
* Check budget limits and send alerts
*/
checkBudgetLimits(): Promise<void>;
}
//# sourceMappingURL=CostTracker.d.ts.map