Native Profiler

The Native Profiler captures CPU and memory metrics from the native layer of your React Native app and displays them in real time in the Desktop App. Use it to identify memory leaks, excessive allocations, and CPU bottlenecks during development.

Availability — Partial: Real-time CPU and memory profiling is available today in the Desktop App when connected to a debug device. Profiling data streams over WebSocket and is displayed in interactive charts with correlation views. What is not yet available: cloud-side storage of profiling snapshots, historical comparison between sessions, CI/CD-integrated profiling, and automated regression detection for memory/CPU. These are planned for a future release.

What You Can Do Today

  • Real-time CPU sampling: View CPU usage percentage, thread utilization, and JS thread stall detection.
  • Memory tracking: Monitor heap size, allocation rate, and GC events in real time.
  • Correlation view: Overlay profiling data with screen transitions and user interactions to identify which actions cause spikes.
  • Snapshot comparison: Take point-in-time snapshots and compare them within the same session to detect growth trends.

How to Use

The Native Profiler activates automatically when you connect the Desktop App to a debug device. No additional SDK configuration is required — profiling data is captured as part of the standard debug connection.

1. Connect to Desktop

await WhatzBug.init({
  projectId: 'your-project-id',
  publishableKey: 'pk_your_key',
  apiBaseUrl: 'https://api.whatzbug.com',
  debug: true,
});

2. Open the Profiler Panel

In the Desktop App, navigate to the Profiler tab. You will see real-time CPU and memory charts updating as the app runs.

3. Take Snapshots

Click Take Snapshot in the Desktop App to capture a point-in-time profiling snapshot. You can compare snapshots to detect growth trends within a session.

Profiling Metrics

MetricSourceDescription
cpu.usageNativeOverall CPU usage percentage
cpu.jsThreadHermes / JSCJS thread CPU time and stall detection
memory.heapUsedNativeCurrent heap memory usage in bytes
memory.heapTotalNativeTotal allocated heap size
memory.gcEventsNativeGarbage collection frequency and duration

Next Steps