Clean up the benchmark a little bit.
This commit is contained in:
parent
a2769cd65e
commit
d405cdeaf2
|
@ -202,20 +202,12 @@ fn main() {
|
|||
.unwrap()
|
||||
.into_measurements()
|
||||
.iter()
|
||||
.fold(0, |mut acc, m| {
|
||||
match m {
|
||||
TypedMeasurement::Counter(key, value) => {
|
||||
println!("got counter {} -> {}", key, value);
|
||||
acc += *value;
|
||||
.fold(0, |acc, m| {
|
||||
acc + match m {
|
||||
TypedMeasurement::Counter(_key, value) => *value,
|
||||
TypedMeasurement::Gauge(_key, value) => *value as u64,
|
||||
_ => 0,
|
||||
}
|
||||
TypedMeasurement::Gauge(key, value) => {
|
||||
println!("got counter {} -> {}", key, value);
|
||||
acc += *value as u64;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
acc
|
||||
});
|
||||
|
||||
let turn_delta = turn_total - total;
|
||||
|
|
Loading…
Reference in New Issue