pub struct BenchmarkResults {
pub name: String,
pub results: Vec<BenchmarkResult>,
pub metadata: Value,
}Expand description
A collection of benchmark results, compatible with the JSON schema used
by benchmark_logs.rs.
§Validation
- VAL-INFRA-013: JSON serialization round-trip with benchmark_logs.rs types
Fields§
§name: StringThe benchmark suite name.
results: Vec<BenchmarkResult>Individual benchmark results.
metadata: ValueOptional metadata (GPU info, ROCm version, etc.).
Implementations§
Source§impl BenchmarkResults
impl BenchmarkResults
Sourcepub fn add(&mut self, result: BenchmarkResult)
pub fn add(&mut self, result: BenchmarkResult)
Add a result to the collection.
Sourcepub fn to_json_pretty(&self) -> Result<String, Error>
pub fn to_json_pretty(&self) -> Result<String, Error>
Serialize to a pretty-printed JSON string.
Trait Implementations§
Source§impl Clone for BenchmarkResults
impl Clone for BenchmarkResults
Source§impl Debug for BenchmarkResults
impl Debug for BenchmarkResults
Source§impl<'de> Deserialize<'de> for BenchmarkResults
impl<'de> Deserialize<'de> for BenchmarkResults
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 PartialEq for BenchmarkResults
impl PartialEq for BenchmarkResults
Source§impl Serialize for BenchmarkResults
impl Serialize for BenchmarkResults
impl StructuralPartialEq for BenchmarkResults
Auto Trait Implementations§
impl Freeze for BenchmarkResults
impl RefUnwindSafe for BenchmarkResults
impl Send for BenchmarkResults
impl Sync for BenchmarkResults
impl Unpin for BenchmarkResults
impl UnsafeUnpin for BenchmarkResults
impl UnwindSafe for BenchmarkResults
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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