Skip to content

Commit

Permalink
address feedback by Greg
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Pyattaev committed Jan 17, 2025
1 parent 6df862a commit 0e9c9ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions memory-management/src/jemalloc_monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ impl MemPoolStats {
.unwrap_or_else(|_| panic!("Prefix can not be over {} bytes long", NAME_LEN));

self.data.push((key, Counters::default()));
// keep data sorted with longest prefixes first (this avoids short-circuiting)
// no need for this to be efficient since we do not run time in a tight loop and vec is typically short
self.data.sort_unstable_by(|a, b| b.0.len().cmp(&a.0.len()));
}
}

Expand Down
1 change: 0 additions & 1 deletion memory-management/src/jemalloc_monitor_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ pub fn setup_watch_memory_usage() {
"solQuicTpu",
"solQuicTpuFwd",
"solRepairQuic",
"solGossipQuic",
"solTurbineQuic",
] {
mps.add(thread);
Expand Down

0 comments on commit 0e9c9ab

Please sign in to comment.