Skip to main content

VitalSigns

Struct VitalSigns 

Source
pub struct VitalSigns {
Show 28 fields pub dead_file_pct: Option<f64>, pub dead_export_pct: Option<f64>, pub avg_cyclomatic: f64, pub critical_complexity_pct: Option<f64>, pub p90_cyclomatic: u32, pub cyclomatic_population: Option<CyclomaticPopulation>, pub duplication_pct: Option<f64>, pub hotspot_count: Option<u32>, pub hotspot_top_pct_count: Option<u32>, pub maintainability_avg: Option<f64>, pub maintainability_low_pct: Option<f64>, pub unused_dep_count: Option<u32>, pub unused_deps_per_k_files: Option<f64>, pub circular_dep_count: Option<u32>, pub circular_deps_per_k_files: Option<f64>, pub counts: Option<VitalSignsCounts>, pub unit_size_profile: Option<RiskProfile>, pub functions_over_60_loc_per_k: Option<f64>, pub unit_interfacing_profile: Option<RiskProfile>, pub p95_fan_in: Option<u32>, pub coupling_high_pct: Option<f64>, pub prop_drilling_chain_count: Option<u32>, pub prop_drilling_max_depth: Option<u32>, pub p95_render_fan_in: Option<u32>, pub render_fan_in_high_pct: Option<f64>, pub max_render_fan_in: Option<u32>, pub top_render_fan_in: Vec<RenderFanInTopComponent>, pub total_loc: u64,
}
Expand description

Project-wide vital signs: a fixed set of metrics for trend tracking.

Metrics are Option when the data source was not available in the current run (e.g., duplication_pct is None unless the duplication pipeline was run, hotspot_count is None without git history).

Fields§

§dead_file_pct: Option<f64>

Percentage of files not reachable from any entry point.

§dead_export_pct: Option<f64>

Percentage of exports never imported by other modules.

§avg_cyclomatic: f64

Average cyclomatic complexity across authored functions, module-scope units, and template units. See cyclomatic_population for the denominator.

§critical_complexity_pct: Option<f64>

Percentage of complexity units at or above the critical cyclomatic threshold. Used by the scale-invariant health score.

§p90_cyclomatic: u32

90th percentile cyclomatic complexity across the same unit population.

§cyclomatic_population: Option<CyclomaticPopulation>

Population behind the cyclomatic mean, percentile, and critical share. Present on current analyses; absent on older saved snapshots.

§duplication_pct: Option<f64>

Code duplication percentage (None if duplication pipeline was not run).

§hotspot_count: Option<u32>

Number of hotspot files (score >= 50). None if git history unavailable.

§hotspot_top_pct_count: Option<u32>

Number of files in the top 1% of the within-project hotspot ranking.

§maintainability_avg: Option<f64>

Average maintainability index across all scored files (0-100).

§maintainability_low_pct: Option<f64>

Percentage of scored files with maintainability index below 70. Null if file scores were not computed.

§unused_dep_count: Option<u32>

Number of unused dependencies (dependencies + devDependencies + optional).

§unused_deps_per_k_files: Option<f64>

Unused dependencies per 1,000 files. Null if dead code analysis did not run.

§circular_dep_count: Option<u32>

Number of circular dependency chains.

§circular_deps_per_k_files: Option<f64>

Circular dependency chains per 1,000 files. Null if dead code analysis did not run.

§counts: Option<VitalSignsCounts>

Raw counts backing the percentages (for orientation header display).

§unit_size_profile: Option<RiskProfile>

Function size risk profile: percentage of functions in each size bin.

§functions_over_60_loc_per_k: Option<f64>

Functions above 60 LOC per 1,000 functions. Null if no functions analyzed.

§unit_interfacing_profile: Option<RiskProfile>

Parameter count risk profile: percentage of functions in each param bin.

§p95_fan_in: Option<u32>

95th percentile fan-in across all files. Null if file scores not computed.

§coupling_high_pct: Option<f64>

Percentage of files with fan-in above the project’s p95 threshold.

§prop_drilling_chain_count: Option<u32>

Number of located prop-drilling chains (React/Preact props forwarded unchanged through 3+ pass-through components). None unless the opt-in prop-drilling rule is enabled (it defaults to off), so the small capped penalty and the hotspot surface are dormant by default.

§prop_drilling_max_depth: Option<u32>

The deepest located prop-drilling chain’s depth (forwarding hops). None when no chains were found or the rule is off. Descriptive context only.

§p95_render_fan_in: Option<u32>

95th-percentile DISTINCT-PARENTS render fan-in across React/Preact components (the component-graph analogue of p95_fan_in, which percentiles per-FILE module fan-in). None on non-React runs. Descriptive blast-radius context, NOT a gate. Mirrors compute_coupling_concentration.

§render_fan_in_high_pct: Option<f64>

Percentage of components whose render fan-in exceeds the project’s max(p95, 10) threshold (reuses the coupling-concentration floor; NO new tunable constant). None on non-React runs. Mirrors coupling_high_pct.

§max_render_fan_in: Option<u32>

The single highest DISTINCT-PARENTS count across all components (the headline blast-radius number: the most distinct render LOCATIONS any one component is rendered from, the honest edit-ripple count). render_sites (incl. repeats) is secondary per-component context, never the headline. None on non-React runs. Descriptive context, no threshold.

§top_render_fan_in: Vec<RenderFanInTopComponent>

The highest-fan-in React/Preact components, located (component name + project-relative path + render-site / distinct-parent counts), sorted by distinct parents (the honest headline axis) descending, tie-broken on render sites descending, and capped at a small N. Lets a consumer see WHICH component carries the headline max_render_fan_in, not just the number. Empty (and omitted from JSON) on non-React runs, so the contract stays byte-identical there. Descriptive blast-radius context, NOT a gate.

§total_loc: u64

Total lines of code across all parsed modules.

Trait Implementations§

Source§

impl Clone for VitalSigns

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VitalSigns

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for VitalSigns

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for VitalSigns

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for VitalSigns

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more