Skip to content

RG-rahul/cpuStressSimulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CPU Stress App

A Windows desktop app built with .NET 8 and WinForms to generate controlled CPU load and monitor CPU usage in real time.

Overview

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.

Features

  • 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)

Solution Structure

  • src/CPUStressApp.Core: Core logic for CPU detection, stress generation, and usage monitoring
  • src/CPUStressApp.WinForms: WinForms desktop UI
  • src/CPUStressApp.sln: Solution file

Requirements

  • Windows (required by WinForms, WMI, and Performance Counter APIs)
  • .NET 8 SDK

Build and Run

From the repository root:

cd src
dotnet build CPUStressApp.sln
dotnet run --project CPUStressApp.WinForms/CPUStressApp.WinForms.csproj

How To Use

  1. Launch the app.
  2. Wait for CPU detection and monitor initialization.
  3. Select the number of logical cores to burn.
  4. Click Start to begin stressing CPU.
  5. Observe Current CPU Usage in the UI.
  6. Click Stop to end stress.

Notes

  • 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.

Use Cases

  • Basic performance and thermal testing
  • Observing behavior under high CPU utilization
  • Demo/learning project for threading and WinForms integration

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

CPU Stress App is a .NET 8 WinForm desktop utility for Windows that simulates configurable CPU load by burning selected logical cores. It provides real-time CPU usage monitoring, detects CPU details (model, logical processors, and physical cores), and lets you start or stop stress threads safely from a simple UI.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages