Skip to content

Commit

Permalink
metrics: Fix worker_total_busy_duration() example
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwe committed Dec 31, 2022
1 parent c6552c5 commit bae3d52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tokio/src/runtime/metrics/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ impl RuntimeMetrics {
/// async fn main() {
/// let metrics = Handle::current().metrics();
///
/// let n = metrics.worker_poll_count(0);
/// println!("worker 0 has polled {} tasks", n);
/// let n = metrics.worker_total_busy_duration(0);
/// println!("worker 0 was busy for a total of {:?}", n);
/// }
/// ```
pub fn worker_total_busy_duration(&self, worker: usize) -> Duration {
Expand Down

0 comments on commit bae3d52

Please sign in to comment.