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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -74,11 +74,12 @@ impl Counter {
if times % lograte == 0 && times > 0 {
let lastlog = self.lastlog.load(Ordering::Relaxed);
info!(
"COUNTER:{{\"name\": \"{}\", \"counts\": {}, \"samples\": {}, \"now\": {}}}",
"COUNTER:{{\"name\": \"{}\", \"counts\": {}, \"samples\": {}, \"now\": {}, \"events\": {}}}",
self.name,
counts,
counts + events,
times,
timing::timestamp(),
events,
);
metrics::submit(
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();
inc_new_counter_info!("ed25519_verify", count);
inc_new_counter_info!("ed25519_verify_cpu", count);
rv
}
@ -117,7 +117,7 @@ pub fn ed25519_verify_disabled(batches: &[SharedPackets]) -> Vec<Vec<u8>> {
.collect()
})
.collect();
inc_new_counter_info!("ed25519_verify", count);
inc_new_counter_info!("ed25519_verify_disabled", count);
rv
}
@ -204,7 +204,7 @@ pub fn ed25519_verify(batches: &[SharedPackets]) -> Vec<Vec<u8>> {
num += 1;
}
}
inc_new_counter_info!("ed25519_verify", count);
inc_new_counter_info!("ed25519_verify_gpu", count);
rvs
}