pub struct BudgetLine {
pub key: String,
pub cache_mode: CacheMode,
pub metric: String,
pub current_us: f64,
pub budget_us: f64,
pub samples: usize,
pub verdict: String,
}Expand description
One measurement held against a budget.
use majordomus_cli::bench::baseline::BudgetLine;
use majordomus_cli::bench::results::CacheMode;
let line = BudgetLine {
key: "system.http.live.ui.command".into(),
cache_mode: CacheMode::Warm,
metric: "p95".into(),
current_us: 620_000.0,
budget_us: 100_000.0,
samples: 20,
verdict: "OVER".into(),
};
// the line says what a reader needs to act: which screen, how slow, against what bound
assert!(line.current_us > line.budget_us && line.verdict == "OVER");Fields§
§key: StringThe target’s key.
cache_mode: CacheModeThe cache mode.
metric: StringThe metric.
current_us: f64The run’s value, microseconds.
budget_us: f64The bound, microseconds.
samples: usizeHow many samples the run took of this target and mode.
verdict: StringPASS, OVER (the value is above the bound), or SHORT (the run took fewer
samples than the budget’s minimum_samples).
Trait Implementations§
Source§impl Clone for BudgetLine
impl Clone for BudgetLine
Source§fn clone(&self) -> BudgetLine
fn clone(&self) -> BudgetLine
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 BudgetLine
impl Debug for BudgetLine
Source§impl<'de> Deserialize<'de> for BudgetLine
impl<'de> Deserialize<'de> for BudgetLine
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 BudgetLine
impl JsonSchema for BudgetLine
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 PartialEq for BudgetLine
impl PartialEq for BudgetLine
Source§fn eq(&self, other: &BudgetLine) -> bool
fn eq(&self, other: &BudgetLine) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BudgetLine
impl Serialize for BudgetLine
impl StructuralPartialEq for BudgetLine
Auto Trait Implementations§
impl Freeze for BudgetLine
impl RefUnwindSafe for BudgetLine
impl Send for BudgetLine
impl Sync for BudgetLine
impl Unpin for BudgetLine
impl UnsafeUnpin for BudgetLine
impl UnwindSafe for BudgetLine
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