pub struct BenchmarkCase {
pub id: String,
pub description: String,
pub strategy: Value,
pub dataset_ref: String,
pub expected: Value,
pub expected_hash: String,
}Expand description
A single golden-verified case. Its strategy is an embedded wickra-backtest
StrategySpec (kept as raw JSON so wickra-benchmark-core stays decoupled from the
engine’s struct internals across the FFI boundary); its expected report and
expected_hash are frozen when the case is blessed and are byte-exact
thereafter. Running the case recomputes the report from strategy + the
dataset and checks it against both.
Fields§
§id: StringStable, unique case key; the sort and tie key (for example
"sma-crossover-01").
description: StringHuman-readable description of what the case exercises.
strategy: ValueThe embedded wickra-backtest StrategySpec, as raw JSON.
dataset_ref: StringThe dataset file this case runs on, relative to the data root (for
example "sma-uptrend.csv").
expected: ValueThe frozen reference report (byte-exact) the recompute is checked
against, kept as raw JSON. The engine’s BacktestReport is serialize-only
across the FFI boundary, so the expectation travels as a JSON object.
expected_hash: StringThe lowercase 64-hex blake3 of the canonical expected report.
Implementations§
Trait Implementations§
Source§impl Clone for BenchmarkCase
impl Clone for BenchmarkCase
Source§fn clone(&self) -> BenchmarkCase
fn clone(&self) -> BenchmarkCase
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BenchmarkCase
impl Debug for BenchmarkCase
Source§impl<'de> Deserialize<'de> for BenchmarkCase
impl<'de> Deserialize<'de> for BenchmarkCase
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>,
Source§impl PartialEq for BenchmarkCase
impl PartialEq for BenchmarkCase
Source§impl Serialize for BenchmarkCase
impl Serialize for BenchmarkCase
impl StructuralPartialEq for BenchmarkCase
Auto Trait Implementations§
impl Freeze for BenchmarkCase
impl RefUnwindSafe for BenchmarkCase
impl Send for BenchmarkCase
impl Sync for BenchmarkCase
impl Unpin for BenchmarkCase
impl UnsafeUnpin for BenchmarkCase
impl UnwindSafe for BenchmarkCase
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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