Skip to content

Commit

Permalink
chore(api): use monotonic counter for task metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
ymgyt committed Mar 31, 2024
1 parent 17b6288 commit e095b07
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/synd_api/src/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,27 @@ impl Monitors {

// Tasks poll metrics
metric!(
counter.task.graphql.mean_poll_duration =
monotonic_counter.task.graphql.mean_poll_duration =
gql_metrics.mean_poll_duration().as_secs_f64()
);
metric!(
counter.task.graphql.mean_slow_poll_duration =
monotonic_counter.task.graphql.mean_slow_poll_duration =
gql_metrics.mean_slow_poll_duration().as_secs_f64()
);

// Tasks schedule metrics
metric!(
counter.task.graphql.mean_first_poll_delay =
monotonic_counter.task.graphql.mean_first_poll_delay =
gql_metrics.mean_first_poll_delay().as_secs_f64(),
);
metric!(
counter.task.graphql.mean_scheduled_duration =
monotonic_counter.task.graphql.mean_scheduled_duration =
gql_metrics.mean_scheduled_duration().as_secs_f64(),
);

// Tasks idle metrics
metric!(
counter.task.graphql.mean_idle_duration =
monotonic_counter.task.graphql.mean_idle_duration =
gql_metrics.mean_idle_duration().as_secs_f64(),
);

Expand Down

0 comments on commit e095b07

Please sign in to comment.