conjure_core/stats/
solver_stats.rsuse schemars::JsonSchema;
use serde::Serialize;
use serde_with::skip_serializing_none;
use crate::solver::SolverFamily;
#[skip_serializing_none]
#[derive(Default, Serialize, Clone, JsonSchema, Debug)]
#[serde(rename_all = "camelCase")]
#[allow(dead_code)]
pub struct SolverStats {
#[serde(rename = "conjureSolverWallTime_s")]
pub conjure_solver_wall_time_s: f64,
pub solver_family: Option<SolverFamily>,
pub solver_adaptor: Option<String>,
pub nodes: Option<u64>,
pub satisfiable: Option<bool>,
pub sat_vars: Option<u64>,
pub sat_clauses: Option<u64>,
}
impl SolverStats {
pub fn with_timings(self, wall_time_s: f64) -> SolverStats {
SolverStats {
conjure_solver_wall_time_s: wall_time_s,
..self.clone()
}
}
}