pub enum OutputFormat {
ExitCode,
Json,
}Expand description
How the framework extracts metrics from a payload’s output.
ExitCode records only the exit code; no text parsing. Json
finds a JSON document region and walks numeric leaves into
Metric values.
For Json, extraction is stdout-primary with a stderr fallback:
the extractor runs first against stdout, and only when that
yields an empty metric set AND stderr is non-empty does it retry
against stderr. Well-behaved binaries keep stdout canonical;
payloads that emit structured output only on stderr (schbench’s
show_latencies → fprintf(stderr, ...)) still parse. The
streams are never merged. ExitCode produces no metrics from
either stream — extract_metrics is invoked (the control flow
is variant-agnostic for simplicity) but the ExitCode arm
returns Ok(vec![]) immediately, so the stderr fallback runs
and also returns empty. Observable behavior: exit code only, no
metrics.
Variants§
ExitCode
Pass/fail from exit code alone. Stdout is archived for
debugging but not parsed. extract_metrics is still invoked
in the evaluate pipeline (variant-agnostic control flow) but
returns Ok(vec![]) immediately for this variant; the
stderr fallback runs too and also returns empty. Observable
behavior: no metrics extracted regardless of stream content.
Json
Parse the primary stream (stdout, or stderr on fallback) as
JSON: find the JSON region within mixed output, extract
numeric leaves as metrics keyed by dotted path (e.g.
jobs.0.read.iops).
Trait Implementations§
Source§impl Clone for OutputFormat
impl Clone for OutputFormat
Source§fn clone(&self) -> OutputFormat
fn clone(&self) -> OutputFormat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OutputFormat
impl Debug for OutputFormat
impl Copy for OutputFormat
Auto Trait Implementations§
impl Freeze for OutputFormat
impl RefUnwindSafe for OutputFormat
impl Send for OutputFormat
impl Sync for OutputFormat
impl Unpin for OutputFormat
impl UnwindSafe for OutputFormat
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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