pub struct BenchResult {
pub metrics: Vec<(String, f64)>,
pub iters: usize,
}Expand description
Structured output of a single bench run: named metrics (e.g. (“evaltime”, secs),
(“pp512”, tok/s)) plus the loop iteration count for the human report line. The
bench/llm-bench runners return this so callers — the interactive subcommand or
the bench suite — consume data instead of parsing stdout.
Fields§
§metrics: Vec<(String, f64)>§iters: usizeImplementations§
Source§impl BenchResult
impl BenchResult
Sourcepub fn emit_jsonl(&self)
pub fn emit_jsonl(&self)
Emit each metric as a {"metric":<name>,"value":<f64>} JSON line on stdout.
This is the bench-suite child→orchestrator contract: stdout is pure JSONL
(logs go to stderr), so the orchestrator can validate every line and treat
anything that does not parse as a hard failure.
Trait Implementations§
Source§impl Clone for BenchResult
impl Clone for BenchResult
Source§fn clone(&self) -> BenchResult
fn clone(&self) -> BenchResult
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 BenchResult
impl Debug for BenchResult
Source§impl Default for BenchResult
impl Default for BenchResult
Source§fn default() -> BenchResult
fn default() -> BenchResult
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BenchResult
impl RefUnwindSafe for BenchResult
impl Send for BenchResult
impl Sync for BenchResult
impl Unpin for BenchResult
impl UnsafeUnpin for BenchResult
impl UnwindSafe for BenchResult
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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>
Converts
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>
Converts
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