GoLand’s Profiler Now Works With AI Agents

The JetBrains Blog · 软件开发

In our practical guide to profiling in Go , we mentioned that some of the Go developers we talked to avoid pprof if they can. For many of them, typical Go services perform well enough without optimizations, so when they do need to profile, it can feel like a “rescue mission” with a tool they are not really experienced with. They have to remember which profile to take and how to collect it, and then make sense of a lot of low-level data. GoLand 2026.1.2 made the collecting part easier with a built-in profiler. In GoLand 2026.3, we are taking it a step further – your AI agent can now use that profiler too. You describe the symptom, for example, “reindexing through POST /reindex takes much longer than it should, profile it”, and the agent runs your app with the profiler, picks the profiles that fit the problem, reads the results, and points you to the code that is responsible. You do not need to know what a mutex profile is or which pprof flags to pass. This works with Claude Code, Codex, and Junie through the bundled goland-profiler skill and a set of MCP tools. Below, we take a closer look at what the agent does and how you can split the work with it. What happens when you ask the agent to profile your app? The goland-profiler skill tells the agent when to reach for the profiler, for example, for slow execution, high CPU usage, excessive allocations, memory growth, blocking, lock contention, or goroutine leaks. It also explains how to work with the MCP tools that give the agent access to GoLand’s profiler. A typical run goes like this: Run with the profiler: If you have already started the app with the profiler, the agent reuses that run. Otherwise, it starts the app with the profiler using your run configuration, just as you would with the Run with Profiler button. The skill explicitly tells the agent not to add net/http/pprof or any temporary profiling code, so your source code stays untouched. If it is unclear whether the app is doing what it should, the agent can

查看原文