Skip to content

Commit

Permalink
Overload monitor add monitored_scope (MystenLabs#17866)
Browse files Browse the repository at this point in the history
## Description 

Says by the title

## Test plan 

How did you test the new or updated feature?

---

## 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
halfprice authored May 22, 2024
1 parent 19374e0 commit b9b4f7b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/sui-core/src/overload_monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0

use crate::authority::AuthorityState;
use mysten_metrics::monitored_scope;
use std::cmp::{max, min};
use std::hash::Hasher;
use std::sync::atomic::{AtomicBool, AtomicU32, Ordering};
Expand Down Expand Up @@ -76,6 +77,7 @@ fn check_authority_overload(
authority_state: &Weak<AuthorityState>,
config: &AuthorityOverloadConfig,
) -> bool {
let _scope = monitored_scope("OverloadMonitor::check_authority_overload");
let authority_arc = authority_state.upgrade();
if authority_arc.is_none() {
// `authority_state` doesn't exist anymore.
Expand Down

0 comments on commit b9b4f7b

Please sign in to comment.