Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Update utils/frame/benchmarking-cli/src/machine/hardware.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Bastian Köcher <git@kchr.de>
  • Loading branch information
Szegoo and bkchr authored Oct 20, 2022
1 parent cbca2c2 commit daefc55
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions utils/frame/benchmarking-cli/src/machine/hardware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,8 @@ fn serialize_throughput<S>(t: &Throughput, serializer: S) -> Result<S::Ok, S::Er
where
S: Serializer,
{
let mut map = serializer.serialize_map(Some(1))?;
let (value, unit) = t.normalize();
let unit_as_str = match unit {
Unit::GiBs => "GiBs",
Unit::MiBs => "MiBs",
Unit::KiBs => "KiBs",
};

map.serialize_entry(&unit_as_str, &value)?;
map.end()
serializer.serialize_str(&format!("{} {}", value, unit))
}

struct ThroughputVisitor;
Expand Down

0 comments on commit daefc55

Please sign in to comment.