PerformanceMetrics
Defined in the eval module.Rust AI Agent SDK Performance metrics from an evaluation.
Fields
| Name | Type | Description |
|---|---|---|
duration | Duration | Total duration |
ttft | Option<Duration> | Time to first token (if applicable) |
tokens_per_second | Option<f64> | Tokens per second |
memory_bytes | Option<usize> | Memory usage in bytes |
input_tokens | Option<usize> | Input tokens |
output_tokens | Option<usize> | Output tokens |
Methods
new
| Name | Type |
|---|---|
duration | Duration |
with_ttft
| Name | Type |
|---|---|
ttft | Duration |
with_tokens_per_second
| Name | Type |
|---|---|
tps | f64 |
with_tokens
| Name | Type |
|---|---|
input | usize |
output | usize |
Source
View on GitHub
praisonai/src/eval/mod.rs at line 83
