Struct GraphMetrics
pub struct GraphMetrics {
pub n: usize,
pub ccd: f64,
pub propagation_cost: f64,
pub cycle_count: u32,
pub largest_cycle: u32,
pub cyclic_nodes: u32,
}Expand description
Repo-level structural metrics derived from one SCC + reachability
pass. The single source of truth shared by architecture-metrics
(HEAD) and architecture-trend (sampled history) so the two can
never disagree on propagation cost or cycle structure.
Fields§
§n: usizeNode count — every live Tier-1 source file (plus any resolved-edge endpoint), so isolated files are included.
ccd: f64Cumulative Component Dependency = Σ visibility-fan-out (each file’s transitive dependency set incl. self). Feeds Lakos ACD/NCCD.
propagation_cost: f64Density of the visibility matrix = ccd / n² — “a change to a
random file reaches this fraction of the system”.
cycle_count: u32Non-trivial dependency cycles (SCCs of size ≥ 2).
largest_cycle: u32Size of the largest cycle (0 if acyclic).
cyclic_nodes: u32Total nodes that sit in some cycle (for core-periphery dominance).
Auto Trait Implementations§
impl Freeze for GraphMetrics
impl RefUnwindSafe for GraphMetrics
impl Send for GraphMetrics
impl Sync for GraphMetrics
impl Unpin for GraphMetrics
impl UnsafeUnpin for GraphMetrics
impl UnwindSafe for GraphMetrics
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> 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