← English news
Priority 4/5

Cloudflare Introduces On-Demand CPU and Memory Profiling for Workers and Durable Objects

Cloudflare has launched on-demand profiling tools that allow developers to generate CPU and memory flame graphs directly from live production workloads inside Workers and Durable Objects.

Cloudflare Introduces On-Demand CPU and Memory Profiling for Workers and Durable Objects

Cloudflare has introduced on-demand CPU and memory profiling for Cloudflare Workers and Durable Objects, enabling developers to capture performance profiles from live production environments. This feature visualizes execution paths as interactive flame graphs, allowing engineers to pinpoint resource bottlenecks at the function level. By accessing these insights directly, developers can resolve complex performance issues that aggregates and standard logs often fail to capture.

Primary source

Open Cloudflare Blog ↗

This article summarizes the source. Check the original for full details and conditions.

Comparison

AspectBefore / AlternativeAfter / This
Data SourceSynthetic testing or local environment simulationsLive production traffic and real workloads
VisualizationStatic metrics and text-based logsInteractive CPU and memory flame graphs
IntegrationManual instrumenting of performance measuring codeOn-demand execution via dashboard or command-line interface
GranularityHigh-level request duration and memory limitsFunction-level execution time and memory allocation details

Action Checklist

  1. Update the Cloudflare CLI tool to the latest version Required to execute profiling commands from the terminal
  2. Navigate to the Observability tab in the Cloudflare Dashboard Provides the web interface for initiating profiles and viewing flame graphs
  3. Trigger an on-demand profiling session on the target Worker or Durable Object Use this during active production workloads for accurate metrics
  4. Analyze the resulting flame graph or download the raw profile file Files can be exported for deep-dive analysis in local profiling tools