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

Method with_node_capacity

crates/firewheel-graph/src/processor/profiling.rs:367–386  ·  view source on GitHub ↗
(
        #[cfg(feature = "node_profiling")] node_capacity: usize,
        #[cfg(feature = "node_profiling")] graph_out_id: NodeID,
    )

Source from the content-addressed store, hash-verified

365
366impl ProfilingData {
367 fn with_node_capacity(
368 #[cfg(feature = "node_profiling")] node_capacity: usize,
369 #[cfg(feature = "node_profiling")] graph_out_id: NodeID,
370 ) -> Self {
371 #[cfg(feature = "node_profiling")]
372 let mut nodes = Vec::with_capacity(node_capacity);
373 #[cfg(feature = "node_profiling")]
374 nodes.push(NodeProfileData {
375 node_id: graph_out_id,
376 cpu_usage: 0.0,
377 });
378
379 Self {
380 version: 0,
381 overall_cpu_usage: 0.0,
382 engine_bookkeeping_cpu_usage: None,
383 #[cfg(feature = "node_profiling")]
384 nodes,
385 }
386 }
387}
388
389/// Performance profiling information of a Firewheel audio node.

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected