Fix sig verify counters to be unique and tweak perf counters (#1056)

print events and add current events to old value to report
This commit is contained in:
sakridge
2018-08-24 16:05:32 -07:00
committed by GitHub
parent d4554c6b78
commit de379ed915
2 changed files with 6 additions and 5 deletions

View File

@ -74,11 +74,12 @@ impl Counter {
if times % lograte == 0 && times > 0 { if times % lograte == 0 && times > 0 {
let lastlog = self.lastlog.load(Ordering::Relaxed); let lastlog = self.lastlog.load(Ordering::Relaxed);
info!( info!(
"COUNTER:{{\"name\": \"{}\", \"counts\": {}, \"samples\": {}, \"now\": {}}}", "COUNTER:{{\"name\": \"{}\", \"counts\": {}, \"samples\": {}, \"now\": {}, \"events\": {}}}",
self.name, self.name,
counts, counts + events,
times, times,
timing::timestamp(), timing::timestamp(),
events,
); );
metrics::submit( metrics::submit(
influxdb::Point::new(&format!("counter-{}", self.name)) influxdb::Point::new(&format!("counter-{}", self.name))

View File

@ -98,7 +98,7 @@ pub fn ed25519_verify_cpu(batches: &[SharedPackets]) -> Vec<Vec<u8>> {
.collect() .collect()
}) })
.collect(); .collect();
inc_new_counter_info!("ed25519_verify", count); inc_new_counter_info!("ed25519_verify_cpu", count);
rv rv
} }
@ -117,7 +117,7 @@ pub fn ed25519_verify_disabled(batches: &[SharedPackets]) -> Vec<Vec<u8>> {
.collect() .collect()
}) })
.collect(); .collect();
inc_new_counter_info!("ed25519_verify", count); inc_new_counter_info!("ed25519_verify_disabled", count);
rv rv
} }
@ -204,7 +204,7 @@ pub fn ed25519_verify(batches: &[SharedPackets]) -> Vec<Vec<u8>> {
num += 1; num += 1;
} }
} }
inc_new_counter_info!("ed25519_verify", count); inc_new_counter_info!("ed25519_verify_gpu", count);
rvs rvs
} }