Use timestamp deltas in grafana-data-store (#4199)

* Optimize grafana storage slightly

* Test on grafana test binary

* Cast to f32

* Silence record_metrics warning

* Add source for error

* More changes

* Fix record_metrics_slice

* Test Database

* Docs

* Update client/grafana-data-source/src/lib.rs

Co-Authored-By: Niklas Adolfsson <niklasadolfsson1@gmail.com>

* Fix macro

* Update server.rs
This commit is contained in:
Ashley
2019-12-04 18:49:12 +01:00
committed by GitHub
parent a58e8a6e45
commit 925b23a3cd
7 changed files with 247 additions and 138 deletions
+10 -10
View File
@@ -954,16 +954,16 @@ ServiceBuilder<
"bandwidth_upload" => bandwidth_upload,
"used_state_cache_size" => used_state_cache_size,
);
record_metrics!(
"peers".to_owned() => num_peers,
"height".to_owned() => best_number,
"txcount".to_owned() => txpool_status.ready,
"cpu".to_owned() => cpu_usage,
"memory".to_owned() => memory,
"finalized_height".to_owned() => finalized_number,
"bandwidth_download".to_owned() => bandwidth_download,
"bandwidth_upload".to_owned() => bandwidth_upload,
"used_state_cache_size".to_owned() => used_state_cache_size
let _ = record_metrics!(
"peers" => num_peers,
"height" => best_number,
"txcount" => txpool_status.ready,
"cpu" => cpu_usage,
"memory" => memory,
"finalized_height" => finalized_number,
"bandwidth_download" => bandwidth_download,
"bandwidth_upload" => bandwidth_upload,
"used_state_cache_size" => used_state_cache_size,
);
Ok(())