python_profile
Profile Python scripts using cProfile, py-spy, or memray to identify performance bottlenecks.
Instructions
Profile Python code performance using cProfile, py-spy, or memray
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Additional arguments | |
| topN | No | Show top N functions (default: 20) | |
| format | No | Output format (default: text) | |
| command | Yes | Python script to profile | |
| timeout | No | Command timeout in milliseconds | |
| profiler | No | Profiler to use (default: cprofile) | |
| directory | No | Working directory | |
| outputFile | No | Save profile to file |