> ## 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.

# Record Timing • AI Agents Framework

> record_timing: Record a timing measurement.

# record\_timing

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**Profiler**](../classes/Profiler) class in the [**profiler**](../modules/profiler) module.

Record a timing measurement.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def record_timing(name: str, duration_ms: float, category: str, file: str, line: int) -> None
```

## Parameters

<ParamField query="name" type="str" required={true}>
  No description available.
</ParamField>

<ParamField query="duration_ms" type="float" required={true}>
  No description available.
</ParamField>

<ParamField query="category" type="str" required={false} default="'function'">
  No description available.
</ParamField>

<ParamField query="file" type="str" required={false} default="''">
  No description available.
</ParamField>

<ParamField query="line" type="int" required={false} default="0">
  No description available.
</ParamField>

## Uses

* `cls.is_enabled`
* `TimingRecord`

## Used By

* [`Profiler.block`](../functions/Profiler-block)
* [`profile`](../functions/profile)
* [`profile_async`](../functions/profile_async)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai/praisonai/profiler.py#L287">
  `praisonai/profiler.py` at line 287
</Card>
