summarizely-cli
Version:
YouTube summarizer that respects your existing subscriptions. No API keys required.
37 lines • 1.68 kB
TypeScript
export interface ProfileResult {
name: string;
duration: number;
startTime: number;
endTime: number;
metadata?: Record<string, any>;
}
export declare class PerformanceProfiler {
private static enabled;
private static profiles;
private static marks;
private static initialize;
static start(name: string, metadata?: Record<string, any>): void;
static end(name: string): ProfileResult | null;
static measure<T>(name: string, fn: () => T): T;
static measureAsync<T>(name: string, fn: () => Promise<T>): Promise<T>;
static getProfile(name: string): ProfileResult | undefined;
static getAllProfiles(): ProfileResult[];
static clear(): void;
static report(): string;
static setEnabled(enabled: boolean): void;
static isEnabled(): boolean;
}
export declare function profile<T>(name: string, fn: () => T): T;
export declare function profileAsync<T>(name: string, fn: () => Promise<T>): Promise<T>;
export declare function startProfile(name: string, metadata?: Record<string, any>): void;
export declare function endProfile(name: string): ProfileResult | null;
export declare function Profiled(name?: string): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
export declare const profileOps: {
fetchCaptions: (url: string) => void;
summarize: (provider: string, model?: string) => void;
writeFile: (path: string, size: number) => void;
cacheOperation: (operation: string, key: string) => void;
batchItem: (index: number, total: number, url: string) => void;
};
export declare function enableAutoProfile(): void;
//# sourceMappingURL=performance.d.ts.map