Skip to content

Commit

Permalink
Distinguish turbine vs repair insertion metrics (#28980)
Browse files Browse the repository at this point in the history
  • Loading branch information
bw-solana authored Nov 30, 2022
1 parent 2427004 commit 9a6ab5e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
8 changes: 7 additions & 1 deletion ledger/src/blockstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,13 @@ impl Blockstore {
leader_schedule,
shred_source,
) {
Err(InsertDataShredError::Exists) => metrics.num_data_shreds_exists += 1,
Err(InsertDataShredError::Exists) => {
if is_repaired {
metrics.num_repaired_data_shreds_exists += 1;
} else {
metrics.num_turbine_data_shreds_exists += 1;
}
}
Err(InsertDataShredError::InvalidShred) => {
metrics.num_data_shreds_invalid += 1
}
Expand Down
14 changes: 12 additions & 2 deletions ledger/src/blockstore_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ pub struct BlockstoreInsertionMetrics {
pub num_recovered_failed_sig: usize,
pub num_recovered_failed_invalid: usize,
pub num_recovered_exists: usize,
pub num_data_shreds_exists: usize,
pub num_repaired_data_shreds_exists: usize,
pub num_turbine_data_shreds_exists: usize,
pub num_data_shreds_invalid: usize,
pub num_data_shreds_blockstore_error: usize,
pub num_coding_shreds_exists: usize,
Expand Down Expand Up @@ -102,7 +103,16 @@ impl BlockstoreInsertionMetrics {
self.num_recovered_blockstore_error,
i64
),
("num_data_shreds_exists", self.num_data_shreds_exists, i64),
(
"num_repaired_data_shreds_exists",
self.num_repaired_data_shreds_exists,
i64
),
(
"num_turbine_data_shreds_exists",
self.num_turbine_data_shreds_exists,
i64
),
("num_data_shreds_invalid", self.num_data_shreds_invalid, i64),
(
"num_data_shreds_blockstore_error",
Expand Down

0 comments on commit 9a6ab5e

Please sign in to comment.