A Windows desktop app built with .NET 8 and WinForms to generate controlled CPU load and monitor CPU usage in real time.
CPU Stress App helps test system behavior under CPU pressure by selecting how many logical cores to burn. It provides a simple WinForms UI, live CPU usage updates, and safe start/stop controls.
- Detects CPU model, logical processor count, and physical core count
- Lets you select how many logical cores to stress
- Uses a duty-cycle stress engine to target load based on selected cores
- Pins stress workers to CPU cores where possible
- Monitors live total CPU usage using Windows performance counters
- Warns when max core count is selected
- Enforces single-instance execution (prevents launching multiple app instances)
src/CPUStressApp.Core: Core logic for CPU detection, stress generation, and usage monitoringsrc/CPUStressApp.WinForms: WinForms desktop UIsrc/CPUStressApp.sln: Solution file
- Windows (required by WinForms, WMI, and Performance Counter APIs)
- .NET 8 SDK
From the repository root:
cd src
dotnet build CPUStressApp.sln
dotnet run --project CPUStressApp.WinForms/CPUStressApp.WinForms.csproj- Launch the app.
- Wait for CPU detection and monitor initialization.
- Select the number of logical cores to burn.
- Click Start to begin stressing CPU.
- Observe Current CPU Usage in the UI.
- Click Stop to end stress.
- Selecting all logical cores may make the UI less responsive.
- CPU usage readings are based on Windows performance counters and may vary slightly from Task Manager.
- Basic performance and thermal testing
- Observing behavior under high CPU utilization
- Demo/learning project for threading and WinForms integration
This project is licensed under the MIT License. See the LICENSE file for details.