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

# cprofile • AI Agents Framework

> cprofile: Context manager for cProfile.

# cprofile

Method

> This is a method of the [**ProfilerCompat**](https://praison.ai/docs/sdk/reference/praisonai/classes/ProfilerCompat.md) class in the [**profiler**](https://praison.ai/docs/sdk/reference/praisonai/modules/profiler.md) module.

Context manager for cProfile.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def cprofile(name: str) -> Any
```

## Parameters

**name** `str` *required*

No description available.

### Returns

**Returns** `Any`

The result of the operation.

## Uses

* `cprofile`
* `get_profiler`

## Used By

* [`ProfilerCompat.cprofile`](../functions/ProfilerCompat-cprofile)

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai/praisonai/profiler.py#L937)
>
> `praisonai/profiler.py` at line 937

***

## Related Documentation

> [card] [Agent Profiles](https://praison.ai/docs/docs/features/agent-profiles)

> [card] [Profiling](https://praison.ai/docs/docs/features/profiling)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.