dotnet-performance

Diagnose and validate .NET performance issues using cross-platform profiling and benchmarking workflows.

36|Updated Jul 25, 2026
One-click install
npx skills add https://github.com/wieslawsoltes/Performance-Skill --skill dotnet-performance-wieslawsoltes
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dotnet-performance
Source: https://github.com/wieslawsoltes/Performance-Skill
Command: npx skills add https://github.com/wieslawsoltes/Performance-Skill --skill dotnet-performance-wieslawsoltes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? It guides coding agents through evidence-first .NET performance investigations, replacing guesswork with structured profiling, memory analysis, benchmarking, and before/after validation across CPU, memory, latency, startup, and GPU layers. ## Core Features & Use Cases - Cross-platform diagnostics: Combines dotnet-counters, dotnet-trace, dotnet-dump, and SOS with platform-native tools like xctrace, WPR/WPA, perf, and eBPF on macOS, Windows, and Linux. - Benchmarking and validation: Covers BenchmarkDotNet micro through soak benchmarks, statistical comparison, CI regression gates, and equivalent before/after measurement. - GPU and production coverage: Includes Metal, D3D12, Vulkan, WebGPU rendering analysis plus bounded production collection with dotnet-monitor, containers, and Kubernetes. - Use Case: Ask the agent to investigate why RSS grows while the managed heap stays stable, and it will build a memory ownership ledger comparing managed live bytes, native heaps, mappings, and GPU residency. ## Quick Start Ask the agent to profile your .NET application and identify the dominant CPU, memory, latency, or rendering bottleneck with supporting evidence.

Frequently Asked Questions about dotnet-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I profile a .NET application to find CPU bottlenecks?▼

Collect a managed CPU trace with dotnet-trace using the dotnet-common and dotnet-sampled-thread-time profiles, then analyze inclusive and exclusive stack costs. Correlate with dotnet-counters and platform-native tools like perf or xctrace when native frames matter.

How to diagnose memory leaks when the .NET managed heap is stable?▼

Build a memory ownership ledger comparing managed live bytes, GC committed heap, RSS/PSS, native allocator growth, mappings, and GPU residency. Escalate to native heap tools like heaptrack or platform VM tools when private memory grows while managed bytes stay flat.

Does dotnet-trace still support the cpu-sampling profile?▼

The cpu-sampling profile was removed from standard dotnet-trace collect; use dotnet-common with dotnet-sampled-thread-time instead. It remains valid only for the separate Linux collect-linux perf-based workflow.

Can I use BenchmarkDotNet results to prove application improvements?▼

A microbenchmark improvement alone does not prove application improvement. Validate with equivalent before/after runs of the real workload, reporting median, spread, and tail metrics rather than a single best run.

How do I collect performance data from production Kubernetes workloads safely?▼

Use bounded or triggered collection through dotnet-monitor and diagnostic ports, record cgroup limits and container constraints, and protect secrets in dumps and traces. Keep collection duration and artifact sizes explicitly limited.

Why is high GPU utilization not proof of a GPU bottleneck?▼

High GPU utilization can coexist with acceptable frame times or reflect compositor and driver work rather than shader cost. Classify the bottleneck by correlating CPU submission time, GPU timestamps, queue gaps, and present timing before optimizing.