quantrs2_device/unified_benchmarking/
events.rs

1//! Event handling for the unified benchmarking system
2
3use std::collections::HashMap;
4use std::time::SystemTime;
5
6use super::results::{PlatformBenchmarkResult, UnifiedBenchmarkResult};
7use super::types::QuantumPlatform;
8
9/// Benchmark events for real-time monitoring
10#[derive(Debug, Clone)]
11pub enum BenchmarkEvent {
12    BenchmarkStarted {
13        execution_id: String,
14        platforms: Vec<QuantumPlatform>,
15        timestamp: SystemTime,
16    },
17    PlatformBenchmarkCompleted {
18        execution_id: String,
19        platform: QuantumPlatform,
20        result: PlatformBenchmarkResult,
21        timestamp: SystemTime,
22    },
23    BenchmarkCompleted {
24        execution_id: String,
25        result: UnifiedBenchmarkResult,
26        timestamp: SystemTime,
27    },
28    BenchmarkFailed {
29        execution_id: String,
30        error: String,
31        timestamp: SystemTime,
32    },
33    PerformanceAlert {
34        metric: String,
35        current_value: f64,
36        threshold: f64,
37        timestamp: SystemTime,
38    },
39    OptimizationCompleted {
40        execution_id: String,
41        improvements: HashMap<String, f64>,
42        timestamp: SystemTime,
43    },
44}