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.
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
fn new(duration: Duration) -> Self
Create new metrics with duration.
Parameters:
with_ttft
fn with_ttft(mut self, ttft: Duration) -> Self
Set TTFT.
Parameters:
with_tokens_per_second
fn with_tokens_per_second(mut self, tps: f64) -> Self
Set tokens per second.
Parameters:
with_tokens
fn with_tokens(mut self, input: usize, output: usize) -> Self
Set token counts.
Parameters:
| Name | Type |
|---|
input | usize |
output | usize |
Source
View on GitHub
praisonai/src/eval/mod.rs at line 83