Use ureq instead of influx_db_client (#5839)

This commit is contained in:
Michael Vines
2019-09-07 12:48:45 -07:00
committed by GitHub
parent affcb5ec43
commit df205f8752
8 changed files with 322 additions and 533 deletions

View File

@@ -1,4 +1,4 @@
use crate::metrics::{submit_counter, CounterPoint};
use crate::metrics::submit_counter;
use log::*;
use solana_sdk::timing;
use std::env;
@@ -19,6 +19,24 @@ pub struct Counter {
pub metricsrate: AtomicU64,
}
#[derive(Clone, Debug)]
pub struct CounterPoint {
pub name: &'static str,
pub count: i64,
pub timestamp: u64,
}
impl CounterPoint {
#[cfg(test)]
pub fn new(name: &'static str) -> Self {
CounterPoint {
name,
count: 0,
timestamp: 0,
}
}
}
#[macro_export]
macro_rules! create_counter {
($name:expr, $lograte:expr, $metricsrate:expr) => {