pub struct HotspotEntry {Show 13 fields
pub path: PathBuf,
pub score: f64,
pub commits: u32,
pub weighted_commits: f64,
pub lines_added: u32,
pub lines_deleted: u32,
pub complexity_density: f64,
pub fan_in: usize,
pub trend: ChurnTrend,
pub median_files_per_commit: Option<f64>,
pub median_lines_per_commit: Option<f64>,
pub ownership: Option<OwnershipMetrics>,
pub is_test_path: bool,
}Expand description
A hotspot: a file that is both complex and frequently changing.
Fields§
§path: PathBufFile path relative to the project root.
score: f64Churn-times-complexity hotspot score; higher is riskier.
commits: u32Commits touching the file in the analysis window.
weighted_commits: f64Recency-weighted commit count.
lines_added: u32Lines added to the file in the analysis window.
lines_deleted: u32Lines deleted from the file in the analysis window.
complexity_density: f64Total cyclomatic complexity per line of code.
fan_in: usizeModules importing this file.
trend: ChurnTrendWhether churn is rising, falling, or steady over the window.
median_files_per_commit: Option<f64>Change dispersion: the median number of analyzed files in the commits that changed this file, over the change coupling history window. Bulk commits above the coupling file cap are not counted. Absent when the history has no commit ids (for example imported churn without them).
median_lines_per_commit: Option<f64>Change dispersion: the median number of changed lines (added plus
deleted, analyzed files only) in the commits that changed this file.
Same window and rules as median_files_per_commit.
ownership: Option<OwnershipMetrics>Ownership metrics, when ownership analysis ran.
is_test_path: boolTrue for files matched by test-path patterns; omitted when false.
Trait Implementations§
Source§impl Clone for HotspotEntry
impl Clone for HotspotEntry
Source§impl Debug for HotspotEntry
impl Debug for HotspotEntry
Source§impl<'de> Deserialize<'de> for HotspotEntry
impl<'de> Deserialize<'de> for HotspotEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<HotspotEntry> for HotspotFinding
impl From<HotspotEntry> for HotspotFinding
Source§fn from(entry: HotspotEntry) -> Self
fn from(entry: HotspotEntry) -> Self
Convenience conversion: wrap a hotspot entry with an empty
actions list. Used by tests and fixture builders. Production
code should call HotspotFinding::with_actions so the wire
shape carries the typed actions.