Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers Profiling CPU usage

How to use Cloudflare DevTools to generate and interpret CPU profiles during local development to identify performance bottlenecks.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers Profiling CPU usage

How to use Cloudflare DevTools to generate and interpret CPU profiles during local development to identify performance bottlenecks.

When To Use

Use when you need to identify specific functions or code blocks that are consuming excessive CPU time in a Cloudflare Worker during local development.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-observability-dev-tools-profiling-cpu-usage-workflow-guide.mdA guide explaining how to use DevTools to profile and identify CPU-intensive tasks within Cloudflare Workers.Questions about a guide explaining how to use DevTools to profile and identify CPU-intensive tasks within Cloudflare Workers.
examples/workers-observability-dev-tools-profiling-cpu-usage-cloudflare-workers-p.textA configuration snippet for wasm-pack showing how to enable dwarf-debug-info for profiling CPU usage in Cloudflare Workers.Exact payloads, commands, or snippets shown in A configuration snippet for wasm-pack showing how to enable dwarf-debug-info for profiling CPU usage in Cloudflare Wo...
examples/workers-observability-dev-tools-profiling-cpu-usage-cloudflare-workers-p-2.textThe build command configuration for installing worker-build and running it in development mode for CPU profiling.Exact payloads, commands, or snippets shown in The build command configuration for installing worker-build and running it in development mode for CPU profiling.
examples/workers-observability-dev-tools-profiling-cpu-usage-cloudflare-workers-c.textA JavaScript code snippet demonstrating a CPU-intensive loop within a Cloudflare Worker to facilitate profiling.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating a CPU-intensive loop within a Cloudflare Worker to facilitate profiling.

What This Skill Covers

  • If a Worker spends too much time performing CPU-intensive tasks, responses may be slow or the Worker might fail to startup due to time limits.
  • Main sections: Taking a profile, An Example Profile, Additional Resources.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/observability/dev-tools/cpu-usage