Add graphs for each function name (#4214)

This commit is contained in:
Marcio Diaz
2019-11-26 20:06:32 +01:00
committed by GitHub
parent b362be3ff3
commit b2aab98e69
4 changed files with 14 additions and 13 deletions
@@ -36,7 +36,7 @@ mod networking;
pub use server::run_server;
pub use util::now_millis;
type Metrics = HashMap<&'static str, Vec<(f32, i64)>>;
type Metrics = HashMap<String, Vec<(f32, i64)>>;
lazy_static! {
/// The `RwLock` wrapping the metrics. Not intended to be used directly.
@@ -26,8 +26,8 @@ async fn randomness() {
let random = rand::thread_rng().gen_range(0.0, 1000.0);
record_metrics!(
"random data" => random,
"random^2" => random * random
"random data".to_owned() => random,
"random^2".to_owned() => random * random
);
}
}