feat(runner): use atomic reload snapshots#195
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 59 minutes and 20 seconds.Comment |
Additional context from comment filesThese notes were split from the local markdown comment files and attached here because they describe this PR's change. Change 5: per-worker Crypto-PAn cacheFile: Why this was a bottleneck
The mutex profile attributed roughly 8–12 % of total block time to What we changed
The hot path now does: Tradeoff
Expected payoffRemoves Change 7: atomic.Pointer for ignore-set lookupsFile: Why this was a bottleneckThe hot path called What we changed
Tradeoff
Expected payoffThe two RWMutexes leave the hot path. In mutex profiles the Change 8: WKD tracker — split read snapshot from map mutationFile: Why this was a bottleneck
What we changedThe struct gains: type wkdSnapshot struct {
dawgFinder dawg.Finder
dawgModTime time.Time
}
type wellKnownDomainsTracker struct {
snap atomic.Pointer[wkdSnapshot]
m map[int]*histogramData // single-writer (dataCollector)
...
}
snap := wkd.snap.Load()
dawgIndex, suffixMatch := getDawgIndex(snap.dawgFinder, name)
return dawgIndex, suffixMatch, snap.dawgModTimeNo lock. The Tradeoff
Expected payoffRemoves another RWMutex from every frame. The |
Summary
Tests