pulseengine_mcp_monitoring/
metrics.rs1use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct ServerMetrics {
8 pub requests_total: u64,
9 pub requests_per_second: f64,
10 pub average_response_time_ms: f64,
11 pub error_rate: f64,
12 pub active_connections: u64,
13 pub memory_usage_bytes: u64,
14 pub uptime_seconds: u64,
15}
16
17impl Default for ServerMetrics {
18 fn default() -> Self {
19 Self {
20 requests_total: 0,
21 requests_per_second: 0.0,
22 average_response_time_ms: 0.0,
23 error_rate: 0.0,
24 active_connections: 0,
25 memory_usage_bytes: 0,
26 uptime_seconds: 0,
27 }
28 }
29}