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 Jan 27, 2023
1 parent a18b364 commit 440ea2d
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 440ea2d

Please sign in to comment.