Skip to content

Commit

Permalink
[Pruner] add more monitored scopes (MystenLabs#17877)
Browse files Browse the repository at this point in the history
## Description 

Monitored the outer functions to help us understand the utilization of
pruning loops.

## Test plan 

CI
Private testnet

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
  • Loading branch information
mwtian authored May 22, 2024
1 parent 79eda21 commit 5773f75
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/sui-core/src/authority/authority_store_pruner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ impl AuthorityStorePruner {
indirect_objects_threshold: usize,
epoch_duration_ms: u64,
) -> anyhow::Result<()> {
let _scope = monitored_scope("PruneObjectsForEligibleEpochs");
let (mut max_eligible_checkpoint_number, epoch_id) = checkpoint_store
.get_highest_executed_checkpoint()?
.map(|c| (*c.sequence_number(), c.epoch))
Expand Down Expand Up @@ -351,6 +352,7 @@ impl AuthorityStorePruner {
archive_readers: ArchiveReaderBalancer,
epoch_duration_ms: u64,
) -> anyhow::Result<()> {
let _scope = monitored_scope("PruneCheckpointsForEligibleEpochs");
let pruned_checkpoint_number =
checkpoint_store.get_highest_pruned_checkpoint_seq_number()?;
let (last_executed_checkpoint, epoch_id) = checkpoint_store
Expand Down Expand Up @@ -411,6 +413,8 @@ impl AuthorityStorePruner {
metrics: Arc<AuthorityStorePruningMetrics>,
indirect_objects_threshold: usize,
) -> anyhow::Result<()> {
let _scope = monitored_scope("PruneForEligibleEpochs");

let mut checkpoint_number = starting_checkpoint_number;
let current_epoch = checkpoint_store
.get_highest_executed_checkpoint()?
Expand Down

0 comments on commit 5773f75

Please sign in to comment.