pub struct AgentRoleStatsEntryResponse {
pub agent_role: String,
pub executions: i64,
pub failed: i64,
pub total_cost_usd: f64,
pub total_duration_ms: i64,
}Expand description
Cost, executions and failures of one agent role.
§Examples
use ironflow_api::entities::AgentRoleStatsEntryResponse;
use ironflow_store::entities::AgentRoleStats;
use rust_decimal::Decimal;
let entry = AgentRoleStatsEntryResponse::from(AgentRoleStats {
agent_role: "Reviewer".to_string(),
executions: 3,
failed: 1,
total_cost_usd: Decimal::new(42, 2),
total_duration_ms: 1200,
});
assert_eq!(entry.agent_role, "Reviewer");JSON schema
{
"description": "Cost, executions and failures of one agent role.\n\n# Examples\n\n```\nuse ironflow_api::entities::AgentRoleStatsEntryResponse;\nuse ironflow_store::entities::AgentRoleStats;\nuse rust_decimal::Decimal;\n\nlet entry = AgentRoleStatsEntryResponse::from(AgentRoleStats {\n agent_role: \"Reviewer\".to_string(),\n executions: 3,\n failed: 1,\n total_cost_usd: Decimal::new(42, 2),\n total_duration_ms: 1200,\n});\nassert_eq!(entry.agent_role, \"Reviewer\");\n```",
"type": "object",
"required": [
"agent_role",
"executions",
"failed",
"total_cost_usd",
"total_duration_ms"
],
"properties": {
"agent_role": {
"description": "Name of the role (`AgentRole::name`).",
"type": "string"
},
"executions": {
"description": "Number of agent steps the role ran, each attempt included.",
"type": "integer",
"format": "int64",
"minimum": 0.0
},
"failed": {
"description": "Steps of the role that failed.",
"type": "integer",
"format": "int64",
"minimum": 0.0
},
"total_cost_usd": {
"description": "Total cost in USD of the steps of the role.",
"type": "number",
"format": "double"
},
"total_duration_ms": {
"description": "Total execution time in milliseconds of the steps of the role.",
"type": "integer",
"format": "int64",
"minimum": 0.0
}
}
}
```ignore
</details>Fields§
§agent_role: StringName of the role (AgentRole::name).
executions: i64Number of agent steps the role ran, each attempt included.
failed: i64Steps of the role that failed.
total_cost_usd: f64Total cost in USD of the steps of the role.
total_duration_ms: i64Total execution time in milliseconds of the steps of the role.
Implementations§
Trait Implementations§
Source§impl Clone for AgentRoleStatsEntryResponse
impl Clone for AgentRoleStatsEntryResponse
Source§impl Debug for AgentRoleStatsEntryResponse
impl Debug for AgentRoleStatsEntryResponse
Source§impl<'de> Deserialize<'de> for AgentRoleStatsEntryResponse
impl<'de> Deserialize<'de> for AgentRoleStatsEntryResponse
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<AgentRoleStatsEntryResponse> for AgentRoleStatsEntryResponse
impl From<AgentRoleStatsEntryResponse> for AgentRoleStatsEntryResponse
Source§fn from(value: AgentRoleStatsEntryResponse) -> Self
fn from(value: AgentRoleStatsEntryResponse) -> Self
Converts to this type from the input type.
Source§impl TryFrom<AgentRoleStatsEntryResponse> for AgentRoleStatsEntryResponse
impl TryFrom<AgentRoleStatsEntryResponse> for AgentRoleStatsEntryResponse
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: AgentRoleStatsEntryResponse) -> Result<Self, ConversionError>
fn try_from(value: AgentRoleStatsEntryResponse) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for AgentRoleStatsEntryResponse
impl RefUnwindSafe for AgentRoleStatsEntryResponse
impl Send for AgentRoleStatsEntryResponse
impl Sync for AgentRoleStatsEntryResponse
impl Unpin for AgentRoleStatsEntryResponse
impl UnsafeUnpin for AgentRoleStatsEntryResponse
impl UnwindSafe for AgentRoleStatsEntryResponse
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