Skip to main content

Vcs

Struct Vcs 

Source
pub struct Vcs {
Show 20 fields pub commits_long: u32, pub commits_recent: u32, pub churn_long: u64, pub churn_recent: u64, pub authors_long: u32, pub authors_recent: u32, pub ownership_top_share: f64, pub burst: f64, pub bug_fix_commits: u32, pub security_fix_commits: u32, pub revert_commits: u32, pub age_days: u32, pub last_modified_days: u32, pub change_entropy_long: f64, pub change_entropy_recent: f64, pub cochange_entropy_long: f64, pub cochange_entropy_recent: f64, pub risk_score: f64, pub hotspot_score: Option<f64>, pub author_ids: Option<Vec<String>>,
}
Available on crate feature vcs-git only.
Expand description

Wire form of crate::vcs::Stats — per-file change-history metrics.

Always-slim by design (issue #635): the row carries only the metrics that vary per file. The four constant stamps that hold across every row of a single response — vcs_schema_version, risk_score_version, long_window_days, recent_window_days — live exactly once in the enclosing envelope (bca vcs’s Report, POST /vcs’s response, and the /vcs/trend document), never repeated per row or per trend point.

The remaining field names are the nested vcs object’s output keys verbatim (issue #684). All scores are ordinal. hotspot_score and author_ids are elided when absent (no AST metrics alongside, and --emit-author-details off, respectively). Gated behind the vcs-git backend feature.

Fields§

§commits_long: u32

Distinct commits in the long window.

§commits_recent: u32

Distinct commits in the recent window.

§churn_long: u64

Σ(added + deleted) lines in the long window.

§churn_recent: u64

Σ(added + deleted) lines in the recent window.

§authors_long: u32

Distinct authors in the long window.

§authors_recent: u32

Distinct authors in the recent window.

§ownership_top_share: f64

Top-author edit share in [0, 1].

§burst: f64

commits_recent / commits_long, clamped to [0, 1].

§bug_fix_commits: u32

Long-window bug-fix commit count.

§security_fix_commits: u32

Long-window security-fix commit count.

§revert_commits: u32

Long-window revert commit count.

§age_days: u32

Days since the file’s first in-window commit (capped at window).

§last_modified_days: u32

Days since the file’s most recent in-window commit.

§change_entropy_long: f64

Change entropy (bits) over the long window — Hassan 2009 History Complexity Metric; higher means more scattered changes.

§change_entropy_recent: f64

Change entropy (bits) over the recent window.

§cochange_entropy_long: f64

Co-change graph entropy (bits) over the long window — arXiv 2504.18511; higher means changes ripple across more partners. 0.0 is computed (no co-changes), not missing.

§cochange_entropy_recent: f64

Co-change graph entropy (bits) over the recent window.

§risk_score: f64

Ordinal composite risk score.

§hotspot_score: Option<f64>

Complexity × recent-churn hotspot score, when AST metrics were computed alongside the history.

§author_ids: Option<Vec<String>>

SHA-256-hashed canonical author identities, under --emit-author-details.

Trait Implementations§

Source§

impl Clone for Vcs

Source§

fn clone(&self) -> Vcs

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 Vcs

Source§

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

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

impl Default for Vcs

Source§

fn default() -> Vcs

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

impl<'de> Deserialize<'de> for Vcs

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 From<&Stats> for Vcs

Source§

fn from(s: &Stats) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Vcs

Source§

fn eq(&self, other: &Vcs) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Vcs

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
Source§

impl StructuralPartialEq for Vcs

Auto Trait Implementations§

§

impl Freeze for Vcs

§

impl RefUnwindSafe for Vcs

§

impl Send for Vcs

§

impl Sync for Vcs

§

impl Unpin for Vcs

§

impl UnsafeUnpin for Vcs

§

impl UnwindSafe for Vcs

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<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> Same for T

Source§

type Output = T

Should always be Self
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.