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

databendlabs / openraft / 23290677096
86%

Build:
DEFAULT BRANCH: main
Ran 19 Mar 2026 10:35AM UTC
Jobs 1
Files 260
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

19 Mar 2026 10:24AM UTC coverage: 86.113% (-0.7%) from 86.764%
23290677096

push

github

drmingdrmer
feat: add DeterministicRng to make a runtime deterministic

Replaces the global AtomicU64 seed with per-instance seed stored in
task-local storage. Each DeterministicRng instance owns its seed counter,
set via set_seed() and propagated into block_on() via sync_scope.

Seed derivation uses two SplitMix64 bijective mixers with different
additive constants (golden ratio vs sqrt(2)) to prevent collisions
in the spawn tree: child.seed = f(parent.seed), parent.seed = g(parent.seed).
This ensures parent, child, and sibling tasks all get independent
deterministic RNG sequences.

Suite::test_all() is now sync — creates its own runtime internally,
simplifying callers to just Suite::<Rt>::test_all().

Changes:
- Add DeterministicRng<RT> with per-instance Cell<u64> seed
- Add splitmix64() mixer, derive_spawn_seed(), advance_seed()
- spawn() wraps child future in DETSIM_SEED.scope() with derived seed
- Add DetsimSuite with 4 determinism tests (self-contained block_on)
- Change Suite::test_all() from async to sync
- Change ThreadLocalRng bound from RngCore to Rng

- Part of: #639

0 of 192 new or added lines in 2 files covered. (0.0%)

2 existing lines in 2 files now uncovered.

15936 of 18506 relevant lines covered (86.11%)

144011.07 hits per line

Uncovered Changes

Lines Coverage ∆ File
114
0.0
0.0% rt/src/testing.rs
78
0.0
rt/src/deterministic_rng.rs

Coverage Regressions

Lines Coverage ∆ File
1
83.33
0.0% openraft/src/metrics/serde_instant.rs
1
0.0
0.0% rt/src/testing.rs
Jobs
ID Job ID Ran Files Coverage
1 23290677096.1 19 Mar 2026 10:35AM UTC 260
86.11
GitHub Action Run
Source Files on build 23290677096
  • Tree
  • List 260
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23290677096
  • 83737aab on github
  • Prev Build on main (#23239123615)
  • Next Build on main (#23351530562)
  • 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