Skip to content
Kitbay
Submit

workers-profiling

Apache-2.0Updated on Nov 10, 20263,337GitHub stars

A short Cloudflare skill for finding CPU and memory hotspots in deployed Workers and Durable Objects.

What the skill teaches

A short Cloudflare skill for finding CPU and memory hotspots in deployed Workers and Durable Objects. It walks the agent through naming the symptom, confirming the account, Worker, environment and version with the user, choosing a CPU or heap profile, and capturing it, preferably with the cf CLI. The profiling API returns a pprof file that the agent reads to map hotspots to functions and source locations, suggesting source maps when names point at generated code. It ends with a report of evidence per finding and the smallest code change that addresses it.

Capabilities

  • Capture CPU or heap profiles of a deployed Worker
  • Profile a specific Durable Object instance
  • Map pprof hotspots to functions and source files
  • Report findings with a suggested code change