Skip to content

meta: Runtime metrics stabilization #4073

@carllerche

Description

@carllerche

Tracks the stabilization of runtime statistics.

RFC: #3845
PRs: #4043

Roadmap

  • Release current implementation as unstable to crates.io (chore: prepare Tokio v1.11.0 #4083)
  • Polish docs (remove TODO)
  • Add more counters
  • Write tokio-metrics providing a higher level api to be consumed that is easier to understand.
  • Resolve open questions.
  • Validate design by evaluating users' experience reports.

Open questions

  • Naming: Should the type be named Metrics, Stats, or PerfCounters.
  • Should RuntimeStats::workers() return &[WorkerStats] or an iterator.
  • Should there be a feature flag to enable stats explicitly?
    • Should there be a runtime Builder option to enable / disable stats.
  • Builder API for more complex configurations, like histograms (rt: instrument task poll times with a histogram #5685).
  • inc_budget_forced_yield_count should become a per-worker metric.
  • Should some current counters be lowered to internal counters?
    • steal_count
    • steal_operations
    • overflow_count

Additional counters

  • Duration between last two polls.
    • There are open questions related to how this should be used.
  • Worker queue depth
    • It is unclear how this should be tracked.

Metadata

Metadata

Assignees

Labels

A-tokioArea: The main tokio crateC-enhancementCategory: A PR with an enhancement or bugfix.M-metricsModule: tokio/runtime/metrics

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions