pub struct RunStats {
pub total_runs: u64,
pub completed_runs: u64,
pub failed_runs: u64,
pub cancelled_runs: u64,
pub active_runs: u64,
pub total_cost_usd: Decimal,
pub total_duration_ms: u64,
}Expand description
Aggregated statistics for all runs in the store.
Computed efficiently by the store implementation (single SQL query in PostgreSQL, in-memory aggregation in InMemoryStore).
§Examples
use ironflow_store::entities::RunStats;
use rust_decimal::Decimal;
let stats = RunStats {
total_runs: 100,
completed_runs: 80,
failed_runs: 15,
cancelled_runs: 5,
active_runs: 0,
total_cost_usd: Decimal::new(4250, 2),
total_duration_ms: 3600000,
};
assert_eq!(stats.total_runs, 100);Fields§
§total_runs: u64Total number of runs ever created.
completed_runs: u64Runs that reached the Completed state.
failed_runs: u64Runs that reached the Failed state.
cancelled_runs: u64Runs that reached the Cancelled state.
active_runs: u64Runs in an active state: Pending, Running, or Retrying.
total_cost_usd: DecimalTotal cost in USD across all runs.
total_duration_ms: u64Total execution time in milliseconds across all runs.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunStats
impl<'de> Deserialize<'de> for RunStats
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
Auto Trait Implementations§
impl Freeze for RunStats
impl RefUnwindSafe for RunStats
impl Send for RunStats
impl Sync for RunStats
impl Unpin for RunStats
impl UnsafeUnpin for RunStats
impl UnwindSafe for RunStats
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