MCPcopy Create free account
hub / github.com/acking-you/static_flow / should_sample

Method should_sample

crates/backend/src/memory_profiler.rs:740–746  ·  view source on GitHub ↗
(&self, sample_rate: u64)

Source from the content-addressed store, hash-verified

738 }
739
740 fn should_sample(&self, sample_rate: u64) -> bool {
741 if sample_rate <= 1 {
742 return true;
743 }
744 let seq = self.allocation_seq.fetch_add(1, Ordering::Relaxed);
745 seq.is_multiple_of(sample_rate)
746 }
747}
748
749pub struct ProfiledMiMalloc {

Callers 1

record_allocationMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected