Skip to main content

EstimationModel

Trait EstimationModel 

Source
pub trait EstimationModel: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn display_params(&self) -> Vec<(String, String)>;
    fn estimate_effort(&self, metrics: &CodeMetrics) -> f64;
    fn estimate_schedule(
        &self,
        effort_months: f64,
        metrics: &CodeMetrics,
    ) -> f64;

    // Provided methods
    fn estimate_cost(
        &self,
        effort_months: f64,
        metrics: &CodeMetrics,
        cost_config: &CostConfig,
    ) -> f64 { ... }
    fn estimate_people(&self, effort_months: f64, schedule_months: f64) -> f64 { ... }
}
Expand description

Pluggable estimation model.

Required Methods§

Source

fn name(&self) -> &str

Model display name.

Source

fn display_params(&self) -> Vec<(String, String)>

Key parameters for display in report footer.

Source

fn estimate_effort(&self, metrics: &CodeMetrics) -> f64

Estimate effort in person-months.

Source

fn estimate_schedule(&self, effort_months: f64, metrics: &CodeMetrics) -> f64

Estimate schedule in months.

Provided Methods§

Source

fn estimate_cost( &self, effort_months: f64, metrics: &CodeMetrics, cost_config: &CostConfig, ) -> f64

Estimate cost in USD. Default: salary-based.

Source

fn estimate_people(&self, effort_months: f64, schedule_months: f64) -> f64

Estimate people required. Default: effort / schedule.

Implementors§