Skip to content

Commit

Permalink
rename external schedule count
Browse files Browse the repository at this point in the history
  • Loading branch information
carllerche committed Jan 4, 2022
1 parent 32e2974 commit 26e60bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tokio/src/runtime/stats/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ impl RuntimeStats {
}

/// Increment the number of tasks scheduled externally
pub(crate) fn inc_external_schedule_count(&self) {
pub(crate) fn inc_remote_schedule_count(&self) {
}
}

Expand Down
12 changes: 6 additions & 6 deletions tokio/src/runtime/stats/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use std::time::{Duration, Instant};
#[derive(Debug)]
pub struct RuntimeStats {
/// Number of tasks that are scheduled from outside the runtime.
external_schedule_count: AtomicU64,
remote_schedule_count: AtomicU64,
/// Tracks per-worker performance counters
workers: Box<[WorkerStats]>,
}
Expand Down Expand Up @@ -52,7 +52,7 @@ impl RuntimeStats {
}

Self {
external_schedule_count: AtomicU64::new(0),
remote_schedule_count: AtomicU64::new(0),
workers: workers.into_boxed_slice(),
}
}
Expand All @@ -61,8 +61,8 @@ impl RuntimeStats {
///
/// Tasks scheduled from outside of the runtime go via the runtime's
/// injection queue, which is usually is slower.
pub fn external_schedule_count(&self) -> u64 {
self.external_schedule_count.load(Relaxed)
pub fn remote_schedule_count(&self) -> u64 {
self.remote_schedule_count.load(Relaxed)
}

/// Returns a slice containing the worker stats for each worker thread.
Expand All @@ -71,8 +71,8 @@ impl RuntimeStats {
}

/// Increment the number of tasks scheduled externally
pub(crate) fn inc_external_schedule_count(&self) {
self.external_schedule_count.fetch_add(1, Relaxed);
pub(crate) fn inc_remote_schedule_count(&self) {
self.remote_schedule_count.fetch_add(1, Relaxed);
}
}

Expand Down

0 comments on commit 26e60bd

Please sign in to comment.