pub struct EvolutionEditRiskFile {
pub path: String,
pub commits: usize,
pub max_complexity: usize,
pub bus_factor: usize,
pub has_nearby_tests: bool,
pub risk_score: f64,
}Expand description
Composite edit-risk score per file. Combines four signals already present elsewhere in the report:
risk = commits * max_complexity * bus_inverse * test_gap_factor
where bus_inverse = 1.0 + 1.0 / max(bus_factor, 1) (so a single
owner doubles the score, two owners give 1.5x, five give 1.2x), and
test_gap_factor = 1.5 when the file has no nearby tests, else 1.0.
Files unchanged in the sampled history naturally score 0 and are
dropped, since the metric is about which files the next edit is
most likely to break.
Fields§
§path: String§commits: usize§max_complexity: usize§bus_factor: usize§has_nearby_tests: bool§risk_score: f64Trait Implementations§
Source§impl Clone for EvolutionEditRiskFile
impl Clone for EvolutionEditRiskFile
Source§fn clone(&self) -> EvolutionEditRiskFile
fn clone(&self) -> EvolutionEditRiskFile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EvolutionEditRiskFile
impl Debug for EvolutionEditRiskFile
Source§impl<'de> Deserialize<'de> for EvolutionEditRiskFile
impl<'de> Deserialize<'de> for EvolutionEditRiskFile
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EvolutionEditRiskFile
impl RefUnwindSafe for EvolutionEditRiskFile
impl Send for EvolutionEditRiskFile
impl Sync for EvolutionEditRiskFile
impl Unpin for EvolutionEditRiskFile
impl UnsafeUnpin for EvolutionEditRiskFile
impl UnwindSafe for EvolutionEditRiskFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more