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

prisma-risk / tsoracle / 26416322904
95%

Build:
DEFAULT BRANCH: main
Ran 25 May 2026 07:28PM UTC
Jobs 1
Files 69
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 May 2026 07:22PM UTC coverage: 96.409% (-0.01%) from 96.423%
26416322904

push

github

web-flow
perf(client): sweep the hint-channel cap only on insert, not every lookup (#435)

* perf(client): sweep the hint-channel cap only on insert, not every lookup

ChannelPool::client_with_cell called enforce_hint_cap on every lookup,
including cache hits, paying an O(n) keys().filter().count() scan under
the synchronous channel-map mutex on the pool's hottest path (the active
leader is dialed on every request and is almost always a cache hit).

The non-configured channel count can only rise on a brand-new insert;
evict_if_current only shrinks the map, and each insert already trims to
<= MAX_HINT_CHANNELS. So on any cache hit the count is within the cap and
the sweep is a guaranteed no-op apart from the wasted scan. Gate the
sweep on a contains_key-detected insert. The last_used recency refresh
stays unconditional, so the active leader remains most-recently-used and
is never evicted (issue #341); LRU semantics are unchanged.

* test(client): pin the cap-sweep insert gate and unconditional recency refresh

The sweep gate is behavior-preserving for the channel map's final state — a
cache-hit sweep is a guaranteed no-op — so map-state assertions cannot witness
it. Add a #[cfg(test)] sweep-invocation counter and two tests:

- cap_sweep_runs_on_insert_not_on_cache_hit asserts the contract directly: a
  genuine insert runs the O(n)-under-lock sweep, a cache hit does not.
- cache_hit_refreshes_recency_without_sweeping guards the load-bearing
  invariant that the last_used refresh stays unconditional even though the
  sweep is gated, so the repeatedly-dialed leader stays most-recently-used and
  is never its own eviction victim (issue #341).

Both were confirmed to fail against the respective regressions (unconditional
sweep; refresh folded under the insert gate). The counter is #[cfg(test)] and
absent from production builds.

66 of 70 new or added lines in 1 file covered. (94.29%)

10740 of 11140 relevant lines covered (96.41%)

532655.66 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
97.35
-0.3% crates/tsoracle-client/src/channel_pool.rs
Jobs
ID Job ID Ran Files Coverage
1 26416322904.1 25 May 2026 07:28PM UTC 69
96.41
GitHub Action Run
Source Files on build 26416322904
  • Tree
  • List 69
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26416322904
  • 7bc5dd7a on github
  • Prev Build on main (#26416197751)
  • Next Build on main (#26416850367)
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