Skip to main content

ImportProfiler

Defined in the profiler module.
AI Agents Framework Context manager to profile imports.

Methods

get_imports()

Get recorded imports.

get_slowest()

Get N slowest imports.

Usage

with profile_imports() as profiler:
        import heavy_module
    
    print(profiler.get_imports())

Source

View on GitHub

praisonai/profiler.py at line 952

Agent Profiles

Profiling