pub struct SessionSummary {
pub correct_simulation: usize,
pub incorrect_simulation: usize,
pub execution_errors: usize,
pub balance_diff: usize,
pub log_diff: usize,
pub unsanitizable: usize,
pub reroute_stats: Option<Box<RerouteStatsReport>>,
}Expand description
Summary of transaction execution statistics for a completed backtest session.
Fields§
§correct_simulation: usizeNumber of simulations where simulator outcome matched on-chain outcome
(true_success + true_failure).
incorrect_simulation: usizeNumber of simulations where simulator outcome did not match on-chain outcome
(false_success + false_failure).
execution_errors: usizeNumber of transactions that had execution errors in simulation.
balance_diff: usizeNumber of transactions with different balance diffs.
log_diff: usizeNumber of transactions with different log diffs.
unsanitizable: usizeTransactions skipped because they could not be sanitized (malformed message or unresolvable address lookup table).
reroute_stats: Option<Box<RerouteStatsReport>>Aggregate reroute metrics, populated only for reroute-order-flow sessions. Boxed to
keep SessionSummary small in the many response enums that carry it.
Implementations§
Source§impl SessionSummary
impl SessionSummary
Sourcepub fn has_deviations(&self) -> bool
pub fn has_deviations(&self) -> bool
Returns true if there were any execution deviations (errors or mismatched results).
Sourcepub fn total_transactions(&self) -> usize
pub fn total_transactions(&self) -> usize
Total number of transactions processed.
Sourcepub fn deviation_details(&self, balance_label: &str, log_label: &str) -> String
pub fn deviation_details(&self, balance_label: &str, log_label: &str) -> String
Renders the compact “N incorrect simulations, N execution errors, …” deviation list
shared by console reporters. balance_label / log_label let each caller keep its own
historical wording for the trailing two counts (e.g. “balance diffs” vs
“different balances”).
Trait Implementations§
Source§impl Clone for SessionSummary
impl Clone for SessionSummary
Source§fn clone(&self) -> SessionSummary
fn clone(&self) -> SessionSummary
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 SessionSummary
impl Debug for SessionSummary
Source§impl Default for SessionSummary
impl Default for SessionSummary
Source§fn default() -> SessionSummary
fn default() -> SessionSummary
Source§impl<'de> Deserialize<'de> for SessionSummary
impl<'de> Deserialize<'de> for SessionSummary
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 Display for SessionSummary
impl Display for SessionSummary
Auto Trait Implementations§
impl Freeze for SessionSummary
impl RefUnwindSafe for SessionSummary
impl Send for SessionSummary
impl Sync for SessionSummary
impl Unpin for SessionSummary
impl UnsafeUnpin for SessionSummary
impl UnwindSafe for SessionSummary
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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