pub fn hotspot_score(churn: f64, complexity: f64) -> f64Expand description
Hotspot score: churn × complexity, the combined ranking signal.
Rank files by this combination, not by either churn or complexity alone — the underlying research consistently associates the combination with elevated defect rates and maintenance cost. A hotspot ranking is a prioritization signal, not an automatic verdict; investigate top-ranked files with human judgement before acting.
§Arguments
churn— a file’s code churn over the analysis window (seecode_churn).complexity— a complexity measure for the same file (chapter 4.1).
§Returns
The hotspot score (higher indicates a stronger hotspot candidate).
§Examples
use software_engineering::code_churn::hotspot_score;
// "rank files by the combination, commonly the product of churn and
// complexity, rather than by either metric alone."
assert_eq!(hotspot_score(420.0, 12.0), 5_040.0);