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 more