analyze
Analyze Python application profiling data to identify performance bottlenecks, memory leaks, and optimization opportunities using CPU, GPU, and memory metrics.
Instructions
Analyze profiling data with flexible analysis types.
Args: profile_id: Profile ID from profile() metric_type: "all", "cpu", "memory", "gpu", "bottlenecks", "leaks", "file", "functions", "recommendations" top_n: Number of items to return (for rankings) cpu_threshold: Minimum CPU % to flag bottleneck memory_threshold_mb: Minimum MB to flag bottleneck filename: Required if metric_type="file", file to analyze
Returns: {metric_type, data, summary} structure varies by metric_type
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile_id | Yes | ||
| metric_type | No | all | |
| top_n | No | ||
| cpu_threshold | No | ||
| memory_threshold_mb | No | ||
| filename | No |