Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
FunctionStats
Defined in the telemetry module.
Rust AI Agent SDK
Statistics for a tracked function.
Fields
| Name | Type | Description |
|---|
name | String | Function name |
call_count | usize | Number of calls |
total_duration | Duration | Total duration |
min_duration | Duration | Minimum duration |
max_duration | Duration | Maximum duration |
last_duration | Duration | Last call duration |
Methods
new
fn new(name: impl Into<String>) -> Self
Create new stats for a function.
Parameters:
| Name | Type |
|---|
name | impl Into<String> |
record
fn record(&mut self, duration: Duration) -> ()
Record a call.
Parameters:
average_duration
fn average_duration(&self) -> Duration
Get average duration.
calls_per_second
fn calls_per_second(&self, elapsed: Duration) -> f64
Get calls per second.
Parameters:
Source
View on GitHub
praisonai/src/telemetry/mod.rs at line 26