> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Performance Evaluator Builder • Rust AI Agent SDK

> PerformanceEvaluatorBuilder: Builder for PerformanceEvaluator.

# PerformanceEvaluatorBuilder

> Defined in the [**eval**](../modules/eval) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Builder for PerformanceEvaluator.

## Fields

| Name           | Type                     | Description |
| -------------- | ------------------------ | ----------- |
| `max_duration` | `Option&lt;Duration&gt;` | -           |
| `max_ttft`     | `Option&lt;Duration&gt;` | -           |
| `config`       | `EvaluatorConfig`        | -           |

## Methods

### `max_duration`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn max_duration(mut self, duration: Duration) -> Self
```

Set maximum duration.

**Parameters:**

| Name       | Type       |
| ---------- | ---------- |
| `duration` | `Duration` |

### `max_ttft`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn max_ttft(mut self, ttft: Duration) -> Self
```

Set maximum TTFT.

**Parameters:**

| Name   | Type       |
| ------ | ---------- |
| `ttft` | `Duration` |

### `threshold`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn threshold(mut self, threshold: f64) -> Self
```

Set threshold.

**Parameters:**

| Name        | Type  |
| ----------- | ----- |
| `threshold` | `f64` |

### `build`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn build(self) -> PerformanceEvaluator
```

Build the evaluator.

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/eval/mod.rs#L488">
  `praisonai/src/eval/mod.rs` at line 488
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Evaluation" icon="gavel" href="/docs/rust/evaluation" />

  <Card title="Rust Criteria" icon="check-double" href="/docs/rust/criteria" />

  <Card title="Rust Agent UI" icon="display" href="/docs/rust/agent-ui-agui" />

  <Card title="Rust AGUI" icon="display" href="/docs/rust/agui" />
</CardGroup>
