From ebb612ab4e4fd438fed89bb62a0b58ffee4ed0bf Mon Sep 17 00:00:00 2001 From: sakridge Date: Sat, 6 Jun 2020 11:47:11 -0700 Subject: [PATCH] Enable and add tick rate to metrics (#10430) --- core/src/poh_service.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/poh_service.rs b/core/src/poh_service.rs index 740a7ca6f4..656933d035 100644 --- a/core/src/poh_service.rs +++ b/core/src/poh_service.rs @@ -89,18 +89,22 @@ impl PohService { let poh = poh_recorder.lock().unwrap().poh.clone(); let mut now = Instant::now(); let mut num_ticks = 0; + let mut num_hashes = 0; loop { + num_hashes += NUM_HASHES_PER_BATCH; if poh.lock().unwrap().hash(NUM_HASHES_PER_BATCH) { // Lock PohRecorder only for the final hash... poh_recorder.lock().unwrap().tick(); num_ticks += 1; if num_ticks >= DEFAULT_TICKS_PER_SLOT * 2 { - datapoint_debug!( + datapoint_info!( "poh-service", ("ticks", num_ticks as i64, i64), + ("hashes", num_hashes as i64, i64), ("elapsed_ms", now.elapsed().as_millis() as i64, i64), ); num_ticks = 0; + num_hashes = 0; now = Instant::now(); } if poh_exit.load(Ordering::Relaxed) {