MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / total_fraction

Method total_fraction

nodedb/src/config/engine.rs:107–109  ·  view source on GitHub ↗

Sum of all engine fractions. Must be `<= 1.0`.

(&self)

Source from the content-addressed store, hash-verified

105
106 /// Sum of all engine fractions. Must be `<= 1.0`.
107 pub fn total_fraction(&self) -> f64 {
108 EngineId::ALL.iter().map(|&e| self.fraction_for(e)).sum()
109 }
110
111 /// Validate that every fraction is positive and finite and that they
112 /// sum to no more than the whole.

Callers 1

validateMethod · 0.80

Calls 3

sumMethod · 0.80
fraction_forMethod · 0.80
iterMethod · 0.45

Tested by

no test coverage detected