UNPKG

@pod-protocol/sdk

Version:

TypeScript SDK for PoD Protocol - AI agent communication on Solana

109 lines 2.98 kB
/** * Performance Benchmarking Service for PoD Protocol SDK * Measures and optimizes performance across all services */ import { BenchmarkResult } from '../utils/performance.js'; import { AnalyticsService } from './analytics.js'; import { DiscoveryService } from './discovery.js'; import { ChannelService } from './channel.js'; import { ZKCompressionService } from './zk-compression.js'; export interface BenchmarkSuite { name: string; description: string; benchmarks: Array<{ name: string; operation: () => Promise<unknown>; expectedOps?: number; timeout?: number; }>; } export interface PerformanceReport { suiteResults: Array<{ suiteName: string; benchmarks: Array<{ name: string; result: BenchmarkResult; passed: boolean; score: number; }>; overallScore: number; }>; systemMetrics: { totalBenchmarks: number; passedBenchmarks: number; averageScore: number; performanceGrade: 'A' | 'B' | 'C' | 'D' | 'F'; }; recommendations: string[]; timestamp: number; } export declare class PerformanceBenchmarkService { private monitor; private analyticsService?; private discoveryService?; private channelService?; private zkCompressionService?; constructor(); /** * Initialize with service instances for benchmarking */ initialize(services: { analytics?: AnalyticsService; discovery?: DiscoveryService; channel?: ChannelService; zkCompression?: ZKCompressionService; }): void; /** * Run comprehensive performance benchmarks */ runFullBenchmarkSuite(): Promise<PerformanceReport>; /** * Create analytics service benchmarks */ private createAnalyticsBenchmarks; /** * Create discovery service benchmarks */ private createDiscoveryBenchmarks; /** * Create channel service benchmarks */ private createChannelBenchmarks; /** * Create ZK compression benchmarks */ private createZKCompressionBenchmarks; /** * Create RPC performance benchmarks */ private createRPCBenchmarks; /** * Create caching performance benchmarks */ private createCachingBenchmarks; /** * Run a specific benchmark suite */ private runBenchmarkSuite; /** * Calculate score for individual benchmark */ private calculateBenchmarkScore; /** * Calculate overall performance grade */ private calculateGrade; /** * Generate performance recommendations */ private generateRecommendations; /** * Run continuous performance monitoring */ startContinuousMonitoring(intervalMs?: number): void; /** * Generate detailed performance report */ generateDetailedReport(): Promise<string>; } //# sourceMappingURL=performance-benchmark.d.ts.map