• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

databendlabs / openraft / 20501284637
88%

Build:
DEFAULT BRANCH: main
Ran 25 Dec 2025 07:36AM UTC
Jobs 1
Files 251
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Dec 2025 07:23AM UTC coverage: 88.537% (-0.1%) from 88.642%
20501284637

push

github

drmingdrmer
change: add `new()` and `block_on()` methods to `AsyncRuntime` trait

Refactor `AsyncRuntime` to support creating runtime instances and running
futures to completion. This consolidates runtime types by merging instance
types into the main runtime types.

Changes:
- Add `new(threads: usize) -> Self` method for creating runtime instances
- Add `block_on(&mut self, future)` instance method for running futures
- Add `run(future)` static convenience method (creates temp runtime with 8 threads)
- Remove `Default`, `PartialEq`, `Eq` trait bounds from `AsyncRuntime`

Upgrade tip:

If you implement `AsyncRuntime`, add these methods:
- `fn new(threads: usize) -> Self` - create runtime instance
- `fn block_on<F, T>(&mut self, future: F) -> T` - run future to completion

The `threads` parameter can be ignored for single-threaded runtimes.
Remove `Default`, `PartialEq`, `Eq` derives if they were only for trait bounds.

Usage patterns:
- `TokioRuntime::run(future)` - one-shot execution
- `let mut rt = TokioRuntime::new(4); rt.block_on(future)` - reusable runtime

233 of 240 new or added lines in 7 files covered. (97.08%)

25 existing lines in 9 files now uncovered.

15494 of 17500 relevant lines covered (88.54%)

162181.1 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
99.17
0.06% openraft/src/core/io_flush_tracking/watch_progress.rs
1
0.0
0.0% rt/src/testing.rs
2
98.94
-1.06% openraft/src/metrics/wait_test.rs
3
86.67
-13.33% rt-tokio/src/lib.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
90.79
0.0% openraft/src/core/tick.rs
1
83.33
0.0% openraft/src/metrics/serde_instant.rs
2
79.17
-8.33% openraft/src/core/sm/handle.rs
2
93.33
-1.67% openraft/src/replication/stream_state.rs
3
82.8
-3.23% openraft/src/replication/snapshot_transmitter.rs
3
86.67
-13.33% rt-tokio/src/lib.rs
3
85.71
-10.29% rt-tokio/src/mpsc.rs
4
96.43
0.0% stores/memstore/src/lib.rs
6
71.43
-28.57% rt-tokio/src/instant.rs
Jobs
ID Job ID Ran Files Coverage
1 20501284637.1 25 Dec 2025 07:36AM UTC 251
88.54
GitHub Action Run
Source Files on build 20501284637
  • Tree
  • List 251
  • Changed 14
  • Source Changed 8
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #20501284637
  • af54d69a on github
  • Prev Build on main (#20498073946)
  • Next Build on main (#20506776674)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc