pub struct QualityDashboard {
pub targets: QualityTargets,
/* private fields */
}Expand description
Quality dashboard for tracking and reporting
Fields§
§targets: QualityTargetsImplementations§
Source§impl QualityDashboard
impl QualityDashboard
pub fn new() -> Self
pub fn with_targets(self, targets: QualityTargets) -> Self
Sourcepub fn record_metric(&mut self, metric: QualityMetric)
pub fn record_metric(&mut self, metric: QualityMetric)
Record a metric
Sourcepub fn record_with_profile(&mut self, metric: QualityMetric, profile: &str)
pub fn record_with_profile(&mut self, metric: QualityMetric, profile: &str)
Record a metric with profile
Sourcepub fn get_by_category(&self, category: &str) -> Vec<&MetricRecord>
pub fn get_by_category(&self, category: &str) -> Vec<&MetricRecord>
Get records by category
Sourcepub fn get_latest_by_category(&self) -> HashMap<String, &MetricRecord>
pub fn get_latest_by_category(&self) -> HashMap<String, &MetricRecord>
Get latest record for each category
Sourcepub fn compute_score(&self) -> QualityScore
pub fn compute_score(&self) -> QualityScore
Compute overall quality score
Sourcepub fn check_targets(&self) -> Vec<TargetViolation>
pub fn check_targets(&self) -> Vec<TargetViolation>
Check metrics against targets
Sourcepub fn generate_report(&self) -> QualityReport
pub fn generate_report(&self) -> QualityReport
Generate quality report
Sourcepub fn export_json(&self) -> String
pub fn export_json(&self) -> String
Export records as JSON
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QualityDashboard
impl RefUnwindSafe for QualityDashboard
impl Send for QualityDashboard
impl Sync for QualityDashboard
impl Unpin for QualityDashboard
impl UnwindSafe for QualityDashboard
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
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>
Converts
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>
Converts
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