pub struct StatsResponse {
pub active_runs: i64,
pub awaiting_approval_runs: i64,
pub cancelled_runs: i64,
pub completed_runs: i64,
pub failed_runs: i64,
pub success_rate_percent: f64,
pub total_cost_usd: f64,
pub total_duration_ms: i64,
pub total_runs: i64,
}Expand description
Aggregate statistics response.
Computed from all runs in the store.
§Examples
use ironflow_api::entities::StatsResponse;JSON schema
{
"description": "Aggregate statistics response.\n\nComputed from all runs in the store.\n\n# Examples\n\n```\nuse ironflow_api::entities::StatsResponse;\n```",
"type": "object",
"required": [
"active_runs",
"awaiting_approval_runs",
"cancelled_runs",
"completed_runs",
"failed_runs",
"success_rate_percent",
"total_cost_usd",
"total_duration_ms",
"total_runs"
],
"properties": {
"active_runs": {
"description": "Number of active runs: pending, running, retrying, awaiting approval\nor sleeping.",
"type": "integer",
"format": "int64",
"minimum": 0.0
},
"awaiting_approval_runs": {
"description": "Number of runs awaiting approval. A subset of `active_runs`.",
"type": "integer",
"format": "int64",
"minimum": 0.0
},
"cancelled_runs": {
"description": "Number of cancelled runs.",
"type": "integer",
"format": "int64",
"minimum": 0.0
},
"completed_runs": {
"description": "Number of completed runs.",
"type": "integer",
"format": "int64",
"minimum": 0.0
},
"failed_runs": {
"description": "Number of failed runs.",
"type": "integer",
"format": "int64",
"minimum": 0.0
},
"success_rate_percent": {
"description": "Success rate: completed / (completed + failed), as a percentage.",
"type": "number",
"format": "double"
},
"total_cost_usd": {
"description": "Aggregated cost across all runs in USD.",
"type": "number",
"format": "double"
},
"total_duration_ms": {
"description": "Aggregated duration across all runs in milliseconds.",
"type": "integer",
"format": "int64",
"minimum": 0.0
},
"total_runs": {
"description": "Total number of runs.",
"type": "integer",
"format": "int64",
"minimum": 0.0
}
}
}
```ignore
</details>Fields§
§active_runs: i64Number of active runs: pending, running, retrying, awaiting approval or sleeping.
awaiting_approval_runs: i64Number of runs awaiting approval. A subset of active_runs.
cancelled_runs: i64Number of cancelled runs.
completed_runs: i64Number of completed runs.
failed_runs: i64Number of failed runs.
success_rate_percent: f64Success rate: completed / (completed + failed), as a percentage.
total_cost_usd: f64Aggregated cost across all runs in USD.
total_duration_ms: i64Aggregated duration across all runs in milliseconds.
total_runs: i64Total number of runs.
Implementations§
Source§impl StatsResponse
impl StatsResponse
pub fn builder() -> StatsResponse
Trait Implementations§
Source§impl Clone for StatsResponse
impl Clone for StatsResponse
Source§impl Debug for StatsResponse
impl Debug for StatsResponse
Source§impl<'de> Deserialize<'de> for StatsResponse
impl<'de> Deserialize<'de> for StatsResponse
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 From<StatsResponse> for StatsResponse
impl From<StatsResponse> for StatsResponse
Source§fn from(value: StatsResponse) -> Self
fn from(value: StatsResponse) -> Self
Converts to this type from the input type.
Source§impl Serialize for StatsResponse
impl Serialize for StatsResponse
Source§impl TryFrom<StatsResponse> for StatsResponse
impl TryFrom<StatsResponse> for StatsResponse
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: StatsResponse) -> Result<Self, ConversionError>
fn try_from(value: StatsResponse) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for StatsResponse
impl RefUnwindSafe for StatsResponse
impl Send for StatsResponse
impl Sync for StatsResponse
impl Unpin for StatsResponse
impl UnsafeUnpin for StatsResponse
impl UnwindSafe for StatsResponse
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