repowisetokio-rs/tokio

Code health of tokio-rs/tokio

Repowise scores tokio-rs/tokio at 9.1 out of 10 for code health, which reads as excellent, alongside maintainability 9.7 and static performance 9.9 on the same scale. There are 699 open findings across the three pillars, and the lowest-scoring file is batch_semaphore.rs at 3.8. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.

Findings by severity

62 critical, 114 high, 199 medium, 324 low.

Hotspots

36 files are flagged as hotspots. The top 5:

  • tokio/src/runtime/blocking/pool.rs: 10 commits in the last 90 days from 35 contributors with 1 recent bug fix
  • tokio/src/runtime/scheduler/multi_thread/worker.rs: 10 commits in the last 90 days from 42 contributors with 1 recent bug fix
  • tokio/src/runtime/builder.rs: 7 commits in the last 90 days from 46 contributors with 1 recent bug fix
  • tokio/src/runtime/io/driver/uring.rs: 6 commits in the last 90 days from 9 contributors with 2 recent bug fixes
  • tokio/src/process/unix/mod.rs: 4 commits in the last 90 days from 15 contributors

Lowest-scoring files

  • tokio/src/sync/batch_semaphore.rs: 3.8 out of 10
  • tokio/src/runtime/scheduler/multi_thread/worker.rs: 3.8 out of 10 with 1 bug fix in the last 180 days
  • tokio/src/runtime/tests/task_combinations.rs: 4.8 out of 10
  • tokio-macros/src/entry.rs: 5.1 out of 10
  • tokio/src/sync/notify.rs: 5.2 out of 10

Checked against bug fixes

Of the 20 files Repowise scores lowest, 4 had a bug fix in the last 180 days. Across all 816 scored files, 3.5% had a bug fix in that window.

Dead code and refactoring

11 refactoring targets across 11 files would raise the score.

More on tokio: summary and FAQ, codebase overview, architecture.

Related guide: Best dead code detection tools by language