pub struct EconomicsHistoryPoint {
pub suite: String,
pub methodology: u32,
pub revision: String,
pub at: String,
pub metric: String,
pub value: f64,
pub n: usize,
}Expand description
A recorded measurement over time: one entry per recorded context run.
use majordomus_cli::economics::model::EconomicsHistoryPoint;
let p: EconomicsHistoryPoint = serde_json::from_value(serde_json::json!({
"suite": "context", "methodology": 1, "revision": "8d37d011ef",
"at": "2026-09-24T10:00:00Z", "metric": "context_reduction_ratio", "value": 0.62, "n": 40
}))
.unwrap();
assert_eq!((p.methodology, p.n), (1, 40));
assert_eq!(serde_json::to_value(&p).unwrap()["metric"], "context_reduction_ratio");Fields§
§suite: StringThe suite.
methodology: u32The methodology version, so that incompatible versions are never drawn as one line.
revision: StringThe revision.
at: StringWhen.
metric: StringThe metric.
value: f64Its value.
n: usizeHow many values it rests on.
Trait Implementations§
Source§impl Clone for EconomicsHistoryPoint
impl Clone for EconomicsHistoryPoint
Source§fn clone(&self) -> EconomicsHistoryPoint
fn clone(&self) -> EconomicsHistoryPoint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EconomicsHistoryPoint
impl Debug for EconomicsHistoryPoint
Source§impl<'de> Deserialize<'de> for EconomicsHistoryPoint
impl<'de> Deserialize<'de> for EconomicsHistoryPoint
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
Source§impl JsonSchema for EconomicsHistoryPoint
impl JsonSchema for EconomicsHistoryPoint
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ordered for EconomicsHistoryPoint
A point of the history orders within its suite by when it was measured, then by the
revision it was measured at. at is a UTC RFC 3339 timestamp at whole seconds, whose
digit runs have fixed widths, so the natural order reads it chronologically.
impl Ordered for EconomicsHistoryPoint
A point of the history orders within its suite by when it was measured, then by the
revision it was measured at. at is a UTC RFC 3339 timestamp at whole seconds, whose
digit runs have fixed widths, so the natural order reads it chronologically.
Source§impl PartialEq for EconomicsHistoryPoint
impl PartialEq for EconomicsHistoryPoint
Source§fn eq(&self, other: &EconomicsHistoryPoint) -> bool
fn eq(&self, other: &EconomicsHistoryPoint) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EconomicsHistoryPoint
impl Serialize for EconomicsHistoryPoint
impl StructuralPartialEq for EconomicsHistoryPoint
Auto Trait Implementations§
impl Freeze for EconomicsHistoryPoint
impl RefUnwindSafe for EconomicsHistoryPoint
impl Send for EconomicsHistoryPoint
impl Sync for EconomicsHistoryPoint
impl Unpin for EconomicsHistoryPoint
impl UnsafeUnpin for EconomicsHistoryPoint
impl UnwindSafe for EconomicsHistoryPoint
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