Struct FunctionHotspotRow
pub struct FunctionHotspotRow {
pub path: String,
pub function: String,
pub revs: u32,
pub cognitive: f64,
pub cognitive_health: f64,
pub function_hotspot_score: f64,
}Expand description
One HEAD-live function/method, ranked by the hotspots-style score.
Fields§
§path: String§function: StringFunction or method name, as recorded in entities — carries the
{name}@{start_line}-{end_line} disambiguation suffix
facts::ingest::consumer::dedup_entities applies at ingest (same
convention function-xray’s function field uses).
revs: u32Distinct revisions where at least one hunk overlapped this
function’s HEAD span. Gated by --min-revs (a HAVING floor, like
hotspots).
cognitive: f64Cognitive complexity at HEAD (from complexity_metrics). 0.0 when
no complexity row matched (should not happen for a real function —
entities and complexity_metrics are written in lockstep at
ingest — but the join stays defensive).
cognitive_health: f64Inline structural proxy on [60, 100] (higher = healthier) — the
same formula hotspots.cognitive_health uses, computed over the
HEAD-live function population instead of the file population.
function_hotspot_score: f64percentile_rank(revs) × percentile_rank(cognitive) × (100 − cognitive_health) / 4, range [0, 10] — see the module doc.
Trait Implementations§
§impl Clone for FunctionHotspotRow
impl Clone for FunctionHotspotRow
§fn clone(&self) -> FunctionHotspotRow
fn clone(&self) -> FunctionHotspotRow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for FunctionHotspotRow
impl Debug for FunctionHotspotRow
§impl<'de> Deserialize<'de> for FunctionHotspotRow
impl<'de> Deserialize<'de> for FunctionHotspotRow
§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>,
§impl Serialize for FunctionHotspotRow
impl Serialize for FunctionHotspotRow
Auto Trait Implementations§
impl Freeze for FunctionHotspotRow
impl RefUnwindSafe for FunctionHotspotRow
impl Send for FunctionHotspotRow
impl Sync for FunctionHotspotRow
impl Unpin for FunctionHotspotRow
impl UnsafeUnpin for FunctionHotspotRow
impl UnwindSafe for FunctionHotspotRow
Blanket Implementations§
impl<T> Allocation for T
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more