pub fn flow_distribution_percent(
items_of_type: f64,
total_completed_items: f64,
) -> Option<f64>Expand description
Flow distribution: the percentage share of one flow item type among all completed items.
Flow distribution (chapter 2.3) answers “what kind of work was it” — features, defects, risk, or debt. Report it alongside flow velocity, never alone, so a rising item count that is quietly dominated by defect rework is visible rather than mistaken for accelerating feature delivery.
§Arguments
items_of_type— count of completed items of one flow item type.total_completed_items— count of all completed items in the period.
§Returns
Some(percentage) (e.g. 45.0 for 45%), or None when
total_completed_items is zero.
§Examples
use software_engineering::flow_framework::flow_distribution_percent;
// The vendor's "features" share fell from 70% to 45% while velocity rose.
assert_eq!(flow_distribution_percent(45.0, 100.0), Some(45.0));
assert_eq!(flow_distribution_percent(1.0, 0.0), None);