Skip to content

Commit

Permalink
Fix formatting and remove brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen-CH-Leung committed Oct 11, 2024
1 parent b6974ba commit 86f019f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tokio/src/runtime/metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ cfg_unstable_metrics! {
cfg_not_unstable_metrics! {
mod mock;

pub(crate) use mock::{SchedulerMetrics};
pub(crate) use mock::SchedulerMetrics;
}
15 changes: 7 additions & 8 deletions tokio/src/runtime/metrics/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ cfg_64bit_metrics! {
cfg_unstable_metrics! {
use std::ops::Range;
use std::thread::ThreadId;
// use std::time::Duration;
}

/// Handle to the runtime's metrics.
Expand Down Expand Up @@ -137,13 +136,13 @@ impl RuntimeMetrics {
/// }
/// ```
pub fn worker_total_busy_duration(&self, worker: usize) -> Duration {
let nanos = self
.handle
.inner
.worker_metrics(worker)
.busy_duration_total
.load(Relaxed);
Duration::from_nanos(nanos)
let nanos = self
.handle
.inner
.worker_metrics(worker)
.busy_duration_total
.load(Relaxed);
Duration::from_nanos(nanos)
}
}

Expand Down
4 changes: 2 additions & 2 deletions tokio/src/runtime/scheduler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cfg_rt! {

use crate::runtime::TaskHooks;

use crate::runtime::{WorkerMetrics};
use crate::runtime::WorkerMetrics;
}

cfg_rt_multi_thread! {
Expand Down Expand Up @@ -203,7 +203,7 @@ cfg_rt! {
}

cfg_unstable_metrics! {
use crate::runtime::{SchedulerMetrics};
use crate::runtime::SchedulerMetrics;

impl Handle {
cfg_64bit_metrics! {
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/runtime/scheduler/multi_thread/handle/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use super::Handle;
use crate::runtime::WorkerMetrics;

cfg_unstable_metrics! {
use crate::runtime::{SchedulerMetrics};
use crate::runtime::SchedulerMetrics;
}

impl Handle {
Expand Down

0 comments on commit 86f019f

Please sign in to comment.