Add Metrics/Dashboards tracking block production (#9342)

* Add metric tracking blocks/dropped blocks

Co-authored-by: Carl <carl@solana.com>
This commit is contained in:
carllin
2020-04-08 14:35:24 -07:00
committed by GitHub
parent 36e73cada4
commit 4522e85ac4
6 changed files with 903 additions and 667 deletions

View File

@@ -566,9 +566,9 @@ pub mod test {
.expect("parent bank must exist")
.clone();
info!("parent of {} is {}", missing_slot, parent_bank.slot(),);
progress
.entry(missing_slot)
.or_insert_with(|| ForkProgress::new(parent_bank.last_blockhash(), None, None));
progress.entry(missing_slot).or_insert_with(|| {
ForkProgress::new(parent_bank.last_blockhash(), None, None, 0, 0)
});
// Create the missing bank
let new_bank =
@@ -719,7 +719,10 @@ pub mod test {
bank0.freeze();
let mut progress = ProgressMap::default();
progress.insert(0, ForkProgress::new(bank0.last_blockhash(), None, None));
progress.insert(
0,
ForkProgress::new(bank0.last_blockhash(), None, None, 0, 0),
);
(BankForks::new(0, bank0), progress)
}