From 399a3852b13832cd51bb708d91f16a172f1252ed Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Sat, 4 Aug 2018 19:32:15 -0700 Subject: [PATCH] Add sigverify_stage-total_verify_time datapoint --- src/sigverify_stage.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/sigverify_stage.rs b/src/sigverify_stage.rs index e965a82b56..d64543b6fc 100644 --- a/src/sigverify_stage.rs +++ b/src/sigverify_stage.rs @@ -5,6 +5,8 @@ //! transaction. All processing is done on the CPU by default and on a GPU //! if the `cuda` feature is enabled with `--features=cuda`. +use influx_db_client as influxdb; +use metrics; use packet::SharedPackets; use rand::{thread_rng, Rng}; use result::{Error, Result}; @@ -79,6 +81,18 @@ impl SigVerifyStage { len, (len as f32 / total_time_s) ); + + metrics::submit( + influxdb::Point::new("sigverify_stage-total_verify_time") + .add_field("batch_len", influxdb::Value::Integer(batch_len as i64)) + .add_field("len", influxdb::Value::Integer(len as i64)) + .add_field( + "total_time_ms", + influxdb::Value::Integer(total_time_ms as i64), + ) + .to_owned(), + ); + Ok(()) }