Cleanup metrics (#4230)

This commit is contained in:
Jack May
2019-05-10 08:33:58 -07:00
committed by GitHub
parent 9881820444
commit f567877d1d
33 changed files with 547 additions and 560 deletions

View File

@@ -3,7 +3,7 @@ use crate::blocktree::Blocktree;
use crate::entry::{Entry, EntrySlice};
use crate::leader_schedule_cache::LeaderScheduleCache;
use rayon::prelude::*;
use solana_metrics::counter::Counter;
use solana_metrics::{datapoint, inc_new_counter_info};
use solana_runtime::bank::Bank;
use solana_runtime::locked_accounts_results::LockedAccountsResults;
use solana_sdk::genesis_block::GenesisBlock;
@@ -43,14 +43,10 @@ fn par_execute_entries(
}
if !Bank::can_commit(&r) {
warn!("Unexpected validator error: {:?}", e);
solana_metrics::submit(
solana_metrics::influxdb::Point::new("validator_process_entry_error")
.add_field(
"error",
solana_metrics::influxdb::Value::String(format!("{:?}", e)),
)
.to_owned(),
)
datapoint!(
"validator_process_entry_error",
("error", format!("{:?}", e), String)
);
}
}
}
@@ -86,16 +82,16 @@ pub fn process_entries(bank: &Bank, entries: &[Entry]) -> Result<()> {
if mt_group.is_empty() {
// An entry has account lock conflicts with itself, which should not happen
// if generated by properly functioning leaders
solana_metrics::submit(
solana_metrics::influxdb::Point::new("validator_process_entry_error")
.add_field(
"error",
solana_metrics::influxdb::Value::String(format!(
"Lock accounts error, entry conflicts with itself, txs: {:?}",
entry.transactions
)),
)
.to_owned(),
datapoint!(
"validator_process_entry_error",
(
"error",
format!(
"Lock accounts error, entry conflicts with itself, txs: {:?}",
entry.transactions
),
String
)
);
first_lock_err?;