pub struct AgentRoleStatsEntryResponse {
pub agent_role: String,
pub executions: u64,
pub failed: u64,
pub total_cost_usd: Decimal,
pub total_duration_ms: u64,
}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");Fields§
§agent_role: StringName of the role (AgentRole::name).
executions: u64Number of agent steps the role ran, each attempt included.
failed: u64Steps of the role that failed.
total_cost_usd: DecimalTotal cost in USD of the steps of the role.
total_duration_ms: u64Total execution time in milliseconds of the steps of the role.
Trait Implementations§
Source§impl Debug for AgentRoleStatsEntryResponse
impl Debug for AgentRoleStatsEntryResponse
Source§impl From<AgentRoleStats> for AgentRoleStatsEntryResponse
impl From<AgentRoleStats> for AgentRoleStatsEntryResponse
Source§fn from(stats: AgentRoleStats) -> Self
fn from(stats: AgentRoleStats) -> Self
Converts to this type from the input type.
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