diff --git a/examples/hist-interval.rs b/examples/hist-interval.rs index e7fc0fe..80164b4 100644 --- a/examples/hist-interval.rs +++ b/examples/hist-interval.rs @@ -6,11 +6,11 @@ use std::thread; use logging::hist::{Entry, HistLog, nanos}; -const N_SECS: u64 = 300; +const N_SECS: u64 = 60 * 60; fn main() { let start = Instant::now(); - let mut a = HistLog::new("test", "a", Duration::from_millis(100)); + let mut a = HistLog::new("test", "a", Duration::from_millis(1000)); let mut b = a.clone_with_tag("b"); let mut c = b.clone_with_tag("c"); @@ -30,7 +30,8 @@ fn main() { if loop_time - start > Duration::from_secs(N_SECS) { break } i += 1; - if i % 100 == 0 { thread::sleep(Duration::new(0, 0)); } + //if i % 100 == 0 { thread::sleep(Duration::new(0, 0)); } + thread::sleep(Duration::new(0, 0)); } }); @@ -49,7 +50,8 @@ fn main() { i += 1; //if i % 1_000 == 0 { thread::sleep(Duration::new(0, 0)); } - if i % 100 == 0 { thread::sleep(Duration::new(0, 0)); } + //if i % 100 == 0 { thread::sleep(Duration::new(0, 0)); } + thread::sleep(Duration::new(0, 0)); } }); @@ -67,7 +69,8 @@ fn main() { i += 1; //if i % 100_000 == 0 { thread::sleep(Duration::from_millis(10)); } - if i % 100 == 0 { thread::sleep(Duration::new(0, 0)); } + //if i % 100 == 0 { thread::sleep(Duration::new(0, 0)); } + thread::sleep(Duration::new(0, 0)); } }