Shipping a Tool to Help Agents Fix Slow Code (www.indragie.com)

🤖 AI Summary
The author built uniprof, a lightweight profiling tool created to give coding agents the runtime context they need to find real root causes of slow code. After experimenting with agentic developer tools (and writing the project entirely with Claude Code and Codex), they found LLMs are good at fixing obvious code-pattern anti‑patterns but often miss problems when they can’t see actual execution paths or when profilers are hard to set up and parse. uniprof addresses that gap by running the target in Docker containers preconfigured with the right profilers, normalizing outputs from multiple open‑source profilers into a single format, aggregating samples (frequency, percentiles), and exposing a minimal interface (collect + analyze). It’s a CLI (with an MCP wrapper and tool description) requiring only Node.js and Docker, avoiding elevated privileges and platform-specific installs. This matters because LLMs excel at consuming large structured telemetry but fail when they lack accurate runtime evidence or have to invent callee behavior. By packaging profiling setup, symbolication, and analysis so an agent can reliably request and interpret profiles, uniprof enables agents to identify true hotspots (e.g., fixing a syntax-highlighting function that consumed ~22% CPU) instead of guessing from source alone. The project points toward an observability future where tools optimize for agent-driven, end‑to‑end root cause analysis—less manual dashboards, more automated fixes.
Loading comments...
loading comments...