datapilot-cli
Version:
Enterprise-grade streaming multi-format data analysis with comprehensive statistical insights and intelligent relationship detection - supports CSV, JSON, Excel, TSV, Parquet - memory-efficient, cross-platform
95 lines • 2.82 kB
TypeScript
/**
* Performance Manager for DataPilot CLI
* Integrates SmartResourceManager and SectionCacheManager for optimal performance
* Addresses GitHub issue #23: Smart performance defaults and auto-configuration
*/
import type { CLIOptions } from './types';
import { type AutoConfigResult } from '../performance/smart-resource-manager';
import { SectionCacheManager } from '../performance/section-cache-manager';
import { PerformanceMonitor, type PerformanceReport } from './performance-monitor';
export interface PerformanceConfig {
autoConfiguration: AutoConfigResult;
cacheManager: SectionCacheManager;
performanceMonitor: PerformanceMonitor;
optimizedOptions: CLIOptions;
}
export declare class CLIPerformanceManager {
private resourceManager;
private cacheManager?;
private performanceMonitor?;
private currentConfig?;
constructor();
/**
* Initialize performance systems based on CLI options and file characteristics
*/
initialize(filePath: string, options: CLIOptions): Promise<PerformanceConfig>;
/**
* Start performance monitoring
*/
startMonitoring(): void;
/**
* Stop performance monitoring and get report
*/
stopMonitoring(): PerformanceReport | undefined;
/**
* Get section result from cache if available
*/
getCachedResult<T>(filePath: string, section: string): Promise<T | null>;
/**
* Cache section result
*/
setCachedResult<T>(filePath: string, section: string, data: T): Promise<void>;
/**
* Check if caching is enabled
*/
isCachingEnabled(): boolean;
/**
* Clear cache for a specific file
*/
clearFileCache(filePath: string): Promise<void>;
/**
* Get cache statistics
*/
getCacheStats(): Promise<import("../performance/section-cache-manager").CacheStats>;
/**
* Get current performance configuration
*/
getCurrentConfig(): PerformanceConfig | undefined;
/**
* Get recommended CLI options for a file
*/
getRecommendedOptions(filePath: string): Promise<string[]>;
/**
* Check if auto-configuration should be used
*/
private shouldUseAutoConfig;
/**
* Get file size in MB
*/
private getFileSizeMB;
/**
* Create manual configuration from CLI options
*/
private createManualConfig;
/**
* Apply performance preset
*/
private applyPreset;
/**
* Create cache configuration
*/
private createCacheConfig;
/**
* Create optimized CLI options
*/
private createOptimizedOptions;
/**
* Log auto-configuration results
*/
private logAutoConfigResults;
/**
* Show performance dashboard
*/
showDashboard(): void;
}
//# sourceMappingURL=performance-manager.d.ts.map