Skip to content

spelens-gud/pprofview-intellij-plugin

Repository files navigation

Pprof Plus: Visual Analytics

A powerful performance analysis plugin that brings go tool pprof directly into your IDE. Visualize, analyze, and optimize your Go applications without leaving GoLand or IntelliJ IDEA.

🚀 Pprof Plus - Go Performance Analysis Made Easy

A powerful performance analysis plugin that brings go tool pprof directly into your IDE. Visualize, analyze, and optimize your Go applications without leaving GoLand or IntelliJ IDEA.

✨ Key Features

  • 🎯 Smart Run Configurations - One-click profiling with multiple collection modes (Runtime, HTTP, Manual, Instrumentation)
  • 📊 Rich Visualizations - 7 visualization types including interactive web UI, flame graphs, call graphs, and more
  • 🔍 Code Navigation - Jump from performance data to source code with inlay hints and heatmap visualization
  • 🛠️ Integrated Tool Windows - View analysis results directly in your IDE
  • ⚡ Multiple Profile Types - CPU, Memory, Goroutine, Block, Mutex, and Allocs profiling

🎨 Highlights

  • Inlay Hints - Display performance metrics (flat/cum) directly in your code editor
  • Heatmap - Visual treemap of Top 20 functions with color-coded hotspots
  • Context Menu - Right-click any pprof file to visualize instantly
  • Auto-open Results - Visualization opens automatically after profiling completes

🚀 Quick Start

  1. Create a new pprof run configuration
  2. Select your collection mode and profile type
  3. Click Run and watch the magic happen
  4. Explore interactive visualizations and jump to code

📋 Requirements

  • GoLand 2025.2+ or IntelliJ IDEA 2025.2+ (with Go plugin)
  • Go 1.16+
  • JVM 21+

Made with ❤️ for Go developers

GitHub | Report Issues | Changelog

English | 简体中文

📸 Screenshots

Smart Run Configuration

Configure profiling with multiple collection modes, profile types, and flexible parameters.

Run Configuration

Inlay Hints - Performance Metrics in Code

Display flat and cum performance data directly at the end of code lines with color-coded hotspot indicators.

Inlay Hints

Heatmap Visualization

Interactive treemap showing Top 20 functions' performance distribution with color intensity representing hotspot levels.

Heatmap

Interactive Hover Details

Hover over functions to see detailed performance information including flat%, cum%, and call relationships.

Hover Details

Comprehensive Analysis View

Detailed performance data visualization with multiple analysis perspectives.

Detailed Analysis

✨ Key Features

🎯 Run Configuration

  • Smart Run Configuration: Supports file, directory, and package run modes
  • Responsive Auto-fill: Automatically fills configuration options based on project structure
  • Multiple Collection Modes:
    • Runtime Sampling
    • HTTP Server
    • Manual Collection
    • Compile-time Instrumentation
  • Multiple Profile Types: CPU, Heap, Goroutine, Block, Mutex, Allocs
  • Flexible Configuration: Working directory, program arguments, environment variables, Go build flags

📊 Visualization

  • 7 Visualization Types:
    • 🌐 Web Browser (Interactive UI)
    • 📝 Text Report
    • 📋 Function List
    • ℹ️ Brief Info
  • Context Menu Integration: Visualize pprof files directly from context menu
  • Auto-open: Automatically opens visualization results after run configuration completes
  • Real-time Notifications: Instant feedback on operation status

🔍 Code Navigation

  • Inlay Hints: Display flat and cum data at the end of code lines
  • Heatmap: Treemap visualization of Top 20 functions' performance distribution
  • Smart Jump: Jump directly from charts to source code
  • Color Coding: Automatically selects colors based on hotspot intensity

🛠️ Tool Windows

  • pprof Output: Displays text output results
  • Integrated Terminal: View detailed performance analysis data

📦 Installation

From JetBrains Marketplace

  1. Open GoLand/IntelliJ IDEA
  2. Go to Settings/PreferencesPluginsMarketplace
  3. Search for "pprofview"
  4. Click Install

Manual Installation

  1. Download the latest release from Releases
  2. Go to Settings/PreferencesPlugins⚙️Install Plugin from Disk...
  3. Select the downloaded ZIP file

🚀 Quick Start

1. Create Run Configuration

  1. Click RunEdit Configurations...
  2. Click +pprof
  3. Configure run parameters:
    • Select run kind (File/Directory/Package)
    • Select collection mode
    • Select profile type
    • Configure sampling parameters

2. Run Performance Analysis

  1. Click the run button
  2. Wait for program execution and data collection
  3. Visualization results open automatically

3. Visualization Analysis

  • Context Menu: Right-click on pprof file in project view or editor → Visualize with go tool pprof
  • Select Visualization Type: Web, Text, Call Graph, Flame Graph, etc.
  • View Results: View in browser or tool window

4. Code Navigation

  • Click on function name in chart
  • Automatically jump to source code
  • View inlay hints with performance data

📖 Usage Examples

Runtime Sampling Mode

package main

import (
    "fmt"
    "runtime/pprof"
    "os"
)

func main() {
    // CPU profiling
    f, _ := os.Create("cpu.pprof")
    pprof.StartCPUProfile(f)
    defer pprof.StopCPUProfile()
    
    // Your code here
    fibonacci(40)
}

func fibonacci(n int) int {
    if n <= 1 {
        return n
    }
    return fibonacci(n-1) + fibonacci(n-2)
}

HTTP Server Mode

package main

import (
    _ "net/http/pprof"
    "net/http"
)

func main() {
    go func() {
        http.ListenAndServe("localhost:6060", nil)
    }()
    
    // Your application code
}

🎨 Feature Highlights

Inlay Hints

  • Display flat and cum data at the end of code lines
  • Use different colors based on hotspot intensity
  • Support for light and dark themes

Heatmap

  • Rectangle area represents performance ratio
  • Color intensity represents hotspot level
  • Display Top 20 functions
  • Hover to show detailed information
  • Click to jump to code

🔧 Requirements

  • IDE: GoLand 2025.2+ or IntelliJ IDEA 2025.2+ (with Go plugin)
  • Go: 1.16+
  • JVM: 21+
  • OS: Windows, macOS, Linux

📝 Development

Build Plugin

./gradlew buildPlugin

Run Tests

./gradlew test

Run IDE

./gradlew runIde

🤝 Contributing

Contributions are welcome! Please check the Contributing Guide.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🔗 Links

📧 Contact

For questions or suggestions, please contact us through GitHub Issues.


Made with ❤️ for Go developers

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages