|
@@ -1113,12 +1113,13 @@ mod tests { |
|
|
use super::*; |
|
|
use super::*; |
|
|
use test::{black_box, Bencher}; |
|
|
use test::{black_box, Bencher}; |
|
|
|
|
|
|
|
|
|
|
|
#[ignore] |
|
|
#[bench] |
|
|
#[bench] |
|
|
fn write_one_million_rows_to_influx(b: &mut Bencher) { |
|
|
|
|
|
|
|
|
fn measure_ten(b: &mut Bencher) { |
|
|
let influx = InfluxWriter::new("localhost", "test", "log/influx.log", 8192); |
|
|
let influx = InfluxWriter::new("localhost", "test", "log/influx.log", 8192); |
|
|
let mut n = 0; |
|
|
let mut n = 0; |
|
|
b.iter(|| { |
|
|
b.iter(|| { |
|
|
for _ in 0..1_000_000 { |
|
|
|
|
|
|
|
|
for _ in 0..10 { |
|
|
let time = influx.nanos(Utc::now()); |
|
|
let time = influx.nanos(Utc::now()); |
|
|
n += 1; |
|
|
n += 1; |
|
|
measure!(influx, million, i(n), tm(time)); |
|
|
measure!(influx, million, i(n), tm(time)); |
|
|