Remove Aggregated label in stats (#1788)
* Remove Aggregated label in stats * introspection * fix monitor aggregate propagation
This commit is contained in:
parent
b93a5bb414
commit
aaeeead574
@ -521,16 +521,16 @@ where
|
|||||||
// If we are measuring scalability stuff..
|
// If we are measuring scalability stuff..
|
||||||
#[cfg(feature = "scalability_introspection")]
|
#[cfg(feature = "scalability_introspection")]
|
||||||
{
|
{
|
||||||
let imported_with_observer = state.scalability_monitor().testcase_with_observers;
|
let received_with_observer = state.scalability_monitor().testcase_with_observers;
|
||||||
let imported_without_observer = state.scalability_monitor().testcase_without_observers;
|
let received_without_observer = state.scalability_monitor().testcase_without_observers;
|
||||||
|
|
||||||
self.fire(
|
self.fire(
|
||||||
state,
|
state,
|
||||||
Event::UpdateUserStats {
|
Event::UpdateUserStats {
|
||||||
name: "total imported".to_string(),
|
name: "total received".to_string(),
|
||||||
value: UserStats::new(
|
value: UserStats::new(
|
||||||
UserStatsValue::Number(
|
UserStatsValue::Number(
|
||||||
(imported_with_observer + imported_without_observer) as u64,
|
(received_with_observer + received_without_observer) as u64,
|
||||||
),
|
),
|
||||||
AggregatorOps::Avg,
|
AggregatorOps::Avg,
|
||||||
),
|
),
|
||||||
|
@ -48,6 +48,10 @@ where
|
|||||||
self.base.set_start_time(time);
|
self.base.set_start_time(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn aggregate(&mut self, name: &str) {
|
||||||
|
self.base.aggregate(name);
|
||||||
|
}
|
||||||
|
|
||||||
fn display(&mut self, event_msg: String, sender_id: ClientId) {
|
fn display(&mut self, event_msg: String, sender_id: ClientId) {
|
||||||
let cur_time = current_time();
|
let cur_time = current_time();
|
||||||
|
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
//! Monitor to display both cumulative and per-client monitor
|
//! Monitor to display both cumulative and per-client monitor
|
||||||
|
|
||||||
use alloc::{
|
#[cfg(feature = "introspection")]
|
||||||
string::{String, ToString},
|
use alloc::string::ToString;
|
||||||
vec::Vec,
|
use alloc::{string::String, vec::Vec};
|
||||||
};
|
|
||||||
use core::{
|
use core::{
|
||||||
fmt::{Debug, Formatter, Write},
|
fmt::{Debug, Formatter, Write},
|
||||||
time::Duration,
|
time::Duration,
|
||||||
@ -84,11 +83,9 @@ where
|
|||||||
self.total_execs(),
|
self.total_execs(),
|
||||||
self.execs_per_sec_pretty()
|
self.execs_per_sec_pretty()
|
||||||
);
|
);
|
||||||
let mut aggregated_fmt = " (Aggregated):".to_string();
|
|
||||||
for (key, val) in &self.aggregator.aggregated {
|
for (key, val) in &self.aggregator.aggregated {
|
||||||
write!(aggregated_fmt, " {key}: {val}").unwrap();
|
write!(global_fmt, ", {key}: {val}").unwrap();
|
||||||
}
|
}
|
||||||
write!(global_fmt, "{aggregated_fmt}").unwrap();
|
|
||||||
|
|
||||||
(self.print_fn)(global_fmt);
|
(self.print_fn)(global_fmt);
|
||||||
|
|
||||||
|
@ -400,7 +400,6 @@ impl Monitor for TuiMonitor {
|
|||||||
for (key, val) in &client.user_monitor {
|
for (key, val) in &client.user_monitor {
|
||||||
write!(fmt, ", {key}: {val}").unwrap();
|
write!(fmt, ", {key}: {val}").unwrap();
|
||||||
}
|
}
|
||||||
write!(fmt, ", (Aggregated):").unwrap();
|
|
||||||
for (key, val) in &self.aggregator.aggregated {
|
for (key, val) in &self.aggregator.aggregated {
|
||||||
write!(fmt, ", {key}: {val}").unwrap();
|
write!(fmt, ", {key}: {val}").unwrap();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user