MCPcopy Create free account
hub / github.com/BillyDM/Firewheel / new

Method new

crates/firewheel-graph/src/processor/profiling.rs:91–113  ·  view source on GitHub ↗
(node_capacity: usize, triple_buf_allocations: bool)

Source from the content-addressed store, hash-verified

89
90impl ProfilerHeapData {
91 pub fn new(node_capacity: usize, triple_buf_allocations: bool) -> Self {
92 #[cfg(not(feature = "node_profiling"))]
93 let _ = node_capacity;
94 #[cfg(not(feature = "node_profiling"))]
95 let _ = triple_buf_allocations;
96
97 Self {
98 #[cfg(feature = "node_profiling")]
99 nodes: Vec::with_capacity(node_capacity),
100 #[cfg(feature = "node_profiling")]
101 node_cpu_sums: Vec::with_capacity(node_capacity),
102 #[cfg(feature = "node_profiling")]
103 triple_buf_allocations: if triple_buf_allocations {
104 [
105 Vec::with_capacity(node_capacity),
106 Vec::with_capacity(node_capacity),
107 Vec::with_capacity(node_capacity),
108 ]
109 } else {
110 [Vec::new(), Vec::new(), Vec::new()]
111 },
112 }
113 }
114}
115
116impl ProfilerTx {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected