diff --git a/simlib/blendnet-sims/scripts/monitor.py b/simlib/blendnet-sims/scripts/monitor.py index a9b6341..de6bae3 100644 --- a/simlib/blendnet-sims/scripts/monitor.py +++ b/simlib/blendnet-sims/scripts/monitor.py @@ -15,6 +15,9 @@ def analyze_monitors(input_stream: Iterable[str]) -> None: "min": df["min"].min(), "avg": (df["num_conns"] * df["avg"]).sum() / df["num_conns"].sum(), "max": df["max"].max(), + "std_min": df["std"].min(), + "std_avg": df["std"].mean(), + "std_max": df["std"].max(), } print(result) diff --git a/simlib/blendnet-sims/src/node/mix/mod.rs b/simlib/blendnet-sims/src/node/mix/mod.rs index 6fa099b..a053a41 100644 --- a/simlib/blendnet-sims/src/node/mix/mod.rs +++ b/simlib/blendnet-sims/src/node/mix/mod.rs @@ -333,6 +333,7 @@ impl MixNode { avg: effective_messages_series.mean().unwrap(), median: effective_messages_series.median().unwrap(), max: effective_messages_series.max().unwrap().unwrap(), + std: effective_messages_series.std(0).unwrap(), }; tracing::info!("Monitor: {}", serde_json::to_string(&log).unwrap()); } @@ -474,4 +475,5 @@ struct MonitorsLog { avg: f64, median: f64, max: u64, + std: f64, }