mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 05:11:09 +00:00
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:
@@ -25,10 +25,14 @@ async fn randomness() {
|
||||
|
||||
let random = rand::thread_rng().gen_range(0.0, 1000.0);
|
||||
|
||||
record_metrics!(
|
||||
"random data".to_owned() => random,
|
||||
"random^2".to_owned() => random * random
|
||||
let result = record_metrics!(
|
||||
"random data" => random,
|
||||
"random^2" => random * random,
|
||||
);
|
||||
|
||||
if let Err(error) = result {
|
||||
eprintln!("{}", error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user