Bring continuous profiling data from Grafana Pyroscope or Google Cloud Profiler into the editor, highlight hot spots inline, and generate MCP-ready AI optimization prompts for Junie, Claude Code or other AI agents.
Performance work is most effective when grounded in production behavior. Perforator fetches real continuous profiling data and overlays it next to the code being profiled, so optimization decisions are made with context.
- 🔥 Inline gutter badges with CPU time or memory usage per method
- 🧭 Editor toolbar to switch CPU/Memory, select time windows, and set hot thresholds
- 🔒 Optional Basic Auth for secured Grafana Pyroscope instances
- ⚡ One-click fetch via Tools menu
- 📁 Google Cloud Profiler file upload support (.pb.gz files)
- 🧠 Right-click a badge to copy an AI optimization prompt
- Pyroscope: prompts are tailored for Grafana MCP server (https://github.com/grafana/mcp-grafana) which can be used with JetBrains Junie, Claude Code, or any other AI agent which supports MCP servers.
- 🧩 Language support: Java and Kotlin
- IntelliJ IDEA 2025.1.2+ / Android Studio 2025.1.2+
- Access to a Grafana Pyroscope instance (URL + optional Basic Auth)
- Download the plugin from the JetBrains Plugin Repository
- Install via: File → Settings → Plugins → Install Plugin from Disk
- Restart IntelliJ IDEA
Open Settings → Tools → Perforator and configure:
- Base URL: e.g.
http://localhost:4040
- Optional Basic Auth: username/password
- Service Name: matches your Pyroscope label (e.g.
service_name
) - Profile Type:
CPU
orMemory
- Time Window:
now-15m
,now-30m
,now-1h
,now-1d
,now-3d
,now-1w
- Open a source file that belongs to the profiled service.
- Use Tools → Fetch Profiling Data.
- Gutter badges show inline metrics next to relevant lines.
- The Perforator toolbar appears at the top of the editor.
- Switch between CPU/Memory profiles and pick a time window.
- Adjust hot thresholds (ms for CPU, MB for Memory).
- Right-click a badge to copy an AI prompt.
- Paste prompt into your AI agent (Junie, Claude Code, etc.) which has integration with the Grafana MCP.
- Let your AI agent refactor your code to improve performance.
- Download a .pb.gz file from Google Cloud Profiler (CPU time / Wall time / Heap)
- Use Tools → Load Profile File (.pb.gz).
- Select your downloaded profile file.
- Gutter badges show inline metrics next to relevant lines.
- The Perforator toolbar appears at the top of the editor.
- Adjust hot thresholds (ms for CPU, MB for Memory).
- Right-click a badge to copy an AI prompt.
- Paste prompt into your AI agent (Junie, Claude Code, etc.).
- Let your AI agent refactor your code to improve performance.
- Data Sources
- Grafana Pyroscope (via API)
- Google Cloud Profiler (.pb.gz files)
- Profile Types
- CPU: displays execution time
- Memory: displays allocation
- Wall Time: displays execution time (only for Google Profiler)
- Time Windows
now-15m
,now-30m
,now-1h
,now-1d
,now-3d
,now-1w
- Languages
- Java, Kotlin
- Additional continuous profiling backends beyond Grafana Pyroscope
- More languages (e.g., Scala)
- Integrated flamegraph navigation
- Java 17+
- Gradle IntelliJ plugin
- Run locally:
./gradlew runIde
- Tools → Fetch Profiling Data (Grafana Pyroscope)
- Tools → Load Profile File (.pb.gz) (Google Cloud Profiler)
- Settings → Tools → Perforator
MIT License — see LICENSE
.
Michael Solovev — smijsm@gmail.com
Optimize where it matters — with real, continuous profiling data in your editor.