calculate std
This commit is contained in:
parent
0c03dcde86
commit
d2271a9fde
|
@ -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)
|
||||
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue