Skip to content

Profiling Guide

David Ortinau edited this page Apr 10, 2025 · 3 revisions

Profiling and Trace Collection Guide

Use dotnet-trace, Speedscope, and PerfView to capture CPU or memory traces.

🔧 How to Collect

# Install once
 dotnet tool install -g dotnet-trace

# Run tracing (find your app PID first)
 dotnet-trace collect --process-id <PID> --profile cpu-sampling --format speedscope

🔍 How to Analyze

  • Open the .nettrace file in https://www.speedscope.app
  • Look for long-running methods (hot spots)
  • Check if work is being done on the UI thread

➡️ Next: Apply Fixes

Clone this wiki locally