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

ben-manes / caffeine / #5399
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: v3.dev
DEFAULT BRANCH: master
Ran 22 Apr 2026 03:16AM UTC
Jobs 1
Files 78
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

22 Apr 2026 02:42AM UTC coverage: 100.0%. Remained the same
#5399

push

github

ben-manes
Skip timestamp writes within tolerance on the read path.

Every getIfPresent on an expireAfterAccess cache wrote Node.accessTime
opaquely, and every read on an Expiry cache CAS'd Node.variableTime via
tryExpireAfterRead. Under concurrent reads of the same hot entry, every
write transitioned the Node's cache line from S to M in MESI,
invalidating the line on all other cores and forcing a refetch on the
next read. Opaque and CAS modes avoid the writer's fence but not the
coherence traffic.

Guard setAccessTime and tryExpireAfterRead with a tolerance check: skip
the store if the new value is within EXPIRE_TOLERANCE (1s) of the stored
one. Math.abs is used so the async-completion path (timestamps set to
now + ASYNC_EXPIRY during in-flight loads) still fires when the sentinel
is replaced. Tolerance is bypassed when the configured or per-entry
duration is <= tolerance so sub-second expiration windows still behave
exactly. Trade-off matches the pre-existing writeTime tolerance: entries
may expire up to 1s earlier than the configured duration, never later.

Renamed EXPIRE_WRITE_TOLERANCE to EXPIRE_TOLERANCE to reflect the
broader scope.

HotEntryBenchmark pins every thread to the same key. On Linux x86
(GHA, 4 threads, JDK 25) expireAccess_hot rises from 18.6M to 49.7M
ops/s (2.67x) after the change, matching expireAccess_spread. The
cache-line true-sharing cost is eliminated. ARM shows the same pattern.

3922 of 3928 branches covered (99.85%)

10 of 10 new or added lines in 1 file covered. (100.0%)

8014 of 8014 relevant lines covered (100.0%)

1.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #5399.1 22 Apr 2026 03:16AM UTC 78
100.0
Source Files on build #5399
  • Tree
  • List 78
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 2e945e09 on github
  • Prev Build on v3.dev
  • Next Build on v3.dev
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