pub struct HalsteadMetrics {
pub distinct_operators: usize,
pub distinct_operands: usize,
pub total_operators: usize,
pub total_operands: usize,
pub vocabulary: usize,
pub length: usize,
pub volume: f64,
pub difficulty: f64,
pub effort: f64,
pub time_seconds: f64,
pub estimated_bugs: f64,
}Expand description
Halstead software science metrics computed from operator/operand token counts.
Fields§
§distinct_operators: usizeNumber of distinct operators (n1).
distinct_operands: usizeNumber of distinct operands (n2).
total_operators: usizeTotal number of operators (N1).
total_operands: usizeTotal number of operands (N2).
vocabulary: usizeProgram vocabulary: n1 + n2.
length: usizeProgram length: N1 + N2.
volume: f64Volume: N * log2(n).
difficulty: f64Difficulty: (n1/2) * (N2/n2).
effort: f64Effort: D * V.
time_seconds: f64Estimated programming time in seconds: E / 18.
estimated_bugs: f64Estimated number of bugs: V / 3000.
Trait Implementations§
Source§impl Clone for HalsteadMetrics
impl Clone for HalsteadMetrics
Source§fn clone(&self) -> HalsteadMetrics
fn clone(&self) -> HalsteadMetrics
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 HalsteadMetrics
impl Debug for HalsteadMetrics
Source§impl<'de> Deserialize<'de> for HalsteadMetrics
impl<'de> Deserialize<'de> for HalsteadMetrics
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 HalsteadMetrics
impl RefUnwindSafe for HalsteadMetrics
impl Send for HalsteadMetrics
impl Sync for HalsteadMetrics
impl Unpin for HalsteadMetrics
impl UnsafeUnpin for HalsteadMetrics
impl UnwindSafe for HalsteadMetrics
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