/**
 * Spark Parser
 *
 * Parses Spark profiler reports for performance metrics.
 *
 * @since v1.70.0
 */
import type { SparkReportData } from './analytics-types.js';
/**
 * Raw Spark API response
 */
interface RawSparkResponse {
    metadata?: {
        platform?: {
            type?: string;
            name?: string;
            version?: string;
            minecraftVersion?: string;
        };
        serverConfigurations?: Record<string, unknown>;
        user?: {
            name?: string;
        };
        startTime?: number;
        endTime?: number;
        interval?: number;
    };
    sampler?: {
        threads?: Array<{
            name: string;
            time: number;
            children?: Array<{
                className?: string;
                methodName?: string;
                time: number;
                children?: unknown[];
            }>;
        }>;
    };
    heap?: {
        totalSize?: number;
        usedSize?: number;
    };
    gc?: {
        collectors?: Array<{
            name: string;
            total: number;
            avgTime: number;
            avgFrequency: number;
        }>;
    };
}
/**
 * Parse result
 */
export interface SparkParseResult {
    success: boolean;
    data?: SparkReportData;
    error?: string;
}
/**
 * Spark parser
 */
export declare class SparkParser {
    /**
     * Extract report ID from Spark URL
     */
    extractReportId(url: string): string | null;
    /**
     * Check if URL is a valid Spark URL
     */
    isValidSparkUrl(url: string): boolean;
    /**
     * Parse raw Spark API response
     */
    parse(raw: RawSparkResponse): SparkParseResult;
    /**
     * Parse from JSON string
     */
    parseJson(json: string): SparkParseResult;
    /**
     * Get API URL for a Spark report
     */
    getApiUrl(reportId: string): string;
    /**
     * Transform raw response to SparkReportData
     */
    private transformResponse;
    private calculateTPS;
    private calculateMSPT;
    private getMemoryInfo;
    private getGCInfo;
    private transformSamplerThreads;
}
/**
 * Create a new Spark parser
 */
export declare function createSparkParser(): SparkParser;
/**
 * Get Spark parser singleton
 */
export declare function getSparkParser(): SparkParser;
/**
 * Reset Spark parser singleton
 */
export declare function resetSparkParser(): void;
export {};
//# sourceMappingURL=spark-parser.d.ts.map