v0.34.0_4

This commit is contained in:
Mateusz Gruszczyński committed 2026-10-18 07:00:34 +02:00
1 parent f20c8da718
commit 5910e6e901
21 files changed
+377 -51

No files matched your search

+3 -3
View File
@@ -5,7 +5,7 @@ impl Cache {
.lock()
.unwrap_or_else(|e| e.into_inner())
.clone();
let mut store = self.store.lock().unwrap_or_else(|e| e.into_inner());
let store = self.store.lock().unwrap_or_else(|e| e.into_inner());
let n = |value: &AtomicU64| value.load(Ordering::Relaxed);
let hits = n(&self.counters.hits);
let misses = n(&self.counters.misses);
@@ -243,7 +243,7 @@ impl Cache {
count
}
pub fn scope_view(&self, scope: &str) -> ScopeView {
let mut store = self.store.lock().unwrap_or_else(|e| e.into_inner());
let store = self.store.lock().unwrap_or_else(|e| e.into_inner());
let mut view = ScopeView {
entries: 0,
resident_bytes: 0,
@@ -269,7 +269,7 @@ impl Cache {
self.domain_stats.record_reason(scope, domain, reason);
}
pub fn dashboard(&self, scope: Option<&str>, offset: usize, limit: usize) -> Dashboard {
let mut store = self.store.lock().unwrap_or_else(|e| e.into_inner());
let store = self.store.lock().unwrap_or_else(|e| e.into_inner());
let revision = store.revision;
let mut groups: BTreeMap<(String, String), DomainView> = self
.domain_stats
+4
View File
@@ -58,6 +58,10 @@ impl DomainStats {
fn record_reason(&self, reason: &'static str) {
// Cache OFF is the highest-volume case; avoid reason map lookup and
// any shared lock/allocator activity for its dashboard reason.
if reason == "cache_disabled" {
self.fast_reasons[0].fetch_add(1, Ordering::Relaxed);
return;
}
if let Some(index) = FAST_REASONS.iter().position(|label| *label == reason) {
self.fast_reasons[index].fetch_add(1, Ordering::Relaxed);
return;