chore: update ablation and clean configs
This commit is contained in:
50
src/metrics/ablation.rs
Normal file
50
src/metrics/ablation.rs
Normal file
@@ -0,0 +1,50 @@
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::metrics::Summary;
|
||||
use crate::replay::ReplayEvictPolicy;
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub struct AblationRow {
|
||||
pub router: String,
|
||||
pub evict_policy: String,
|
||||
pub placement_source: String,
|
||||
pub num_requests: u64,
|
||||
pub total_blocks: u64,
|
||||
pub ttft_mean: f64,
|
||||
pub ttft_p50: f64,
|
||||
pub ttft_p95: f64,
|
||||
pub ttft_p99: f64,
|
||||
pub hit_rate_l0: f64,
|
||||
pub hit_rate_l1: f64,
|
||||
pub hit_rate_remote: f64,
|
||||
pub miss_rate: f64,
|
||||
pub total_rdma_bytes: u64,
|
||||
pub total_pcie_bytes: u64,
|
||||
}
|
||||
|
||||
impl AblationRow {
|
||||
pub fn from_summary(
|
||||
router: &str,
|
||||
policy: ReplayEvictPolicy,
|
||||
placement_source: &str,
|
||||
summary: &Summary,
|
||||
) -> Self {
|
||||
Self {
|
||||
router: router.to_string(),
|
||||
evict_policy: policy.as_str().to_string(),
|
||||
placement_source: placement_source.to_string(),
|
||||
num_requests: summary.num_requests,
|
||||
total_blocks: summary.total_blocks,
|
||||
ttft_mean: summary.ttft_mean,
|
||||
ttft_p50: summary.ttft_p50,
|
||||
ttft_p95: summary.ttft_p95,
|
||||
ttft_p99: summary.ttft_p99,
|
||||
hit_rate_l0: summary.hit_rate_l0,
|
||||
hit_rate_l1: summary.hit_rate_l1,
|
||||
hit_rate_remote: summary.hit_rate_remote,
|
||||
miss_rate: summary.miss_rate,
|
||||
total_rdma_bytes: summary.total_rdma_bytes,
|
||||
total_pcie_bytes: summary.total_pcie_bytes,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
pub mod ablation;
|
||||
pub mod per_request;
|
||||
pub mod routing_log;
|
||||
pub mod summary;
|
||||
pub mod timeseries;
|
||||
|
||||
pub use ablation::AblationRow;
|
||||
pub use per_request::PerRequestRow;
|
||||
pub use summary::Summary;
|
||||
|
||||
Reference in New Issue
Block a user