Skip to main content

PerformanceMonitor

Defined in the telemetry module.
Rust AI Agent SDK Performance monitor for tracking function and API performance.

Fields

Methods

new

Create a new monitor.

enable

Enable monitoring.

disable

Disable monitoring.

is_enabled

Check if enabled.

track_function

Track a function call. Parameters:

track_api

Track an API call. Parameters:

get_function_stats

Get function stats. Parameters:

get_api_stats

Get API stats. Parameters:

all_function_stats

Get all function stats.

all_api_stats

Get all API stats.

slowest_functions

Get slowest functions. Parameters:

slowest_apis

Get slowest APIs. Parameters:

elapsed

Get elapsed time since start.

clear

Clear all data.

get_report

Get performance report.

Source

View on GitHub

praisonai/src/telemetry/mod.rs at line 164