Skip to content

Commit 58edab9

Browse files
author
rhamlett_microsoft
committed
Updates to CPU target selection.
1 parent e5330cd commit 58edab9

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/PerfProblemSimulator/wwwroot/index.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,14 @@ <h3>🔥 CPU Stress</h3>
4444
<label>Duration (s):
4545
<input type="number" id="cpuDuration" value="10" min="1" title="Duration in seconds (minimum 1 second)">
4646
</label>
47-
<label>Target CPU (%):
48-
<input type="number" id="cpuTarget" value="100" min="1" max="100" title="Target CPU load percentage (1-100)">
47+
<label>Target Load:
48+
<select id="cpuTarget" title="Target CPU load range" class="wide-input">
49+
<option value="55">50% - 60%</option>
50+
<option value="65">60% - 70%</option>
51+
<option value="75" selected>70% - 80%</option>
52+
<option value="90">80% - 90%</option>
53+
<option value="100">90% - 100%</option>
54+
</select>
4955
</label>
5056
</div>
5157
<button class="btn btn-danger" id="btnTriggerCpu">🔥 Trigger High CPU</button>

tests/PerfProblemSimulator.Tests/Unit/MetricsCollectorTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ public void GetHealthStatus_ThreadPoolMetrics_ArePopulated()
242242
_sut.Stop();
243243

244244
// Assert
245+
Assert.NotNull(status.ThreadPool);
245246
Assert.True(status.ThreadPool.MaxWorkerThreads > 0, "MaxWorkerThreads should be positive");
246247
Assert.True(status.ThreadPool.AvailableWorkerThreads > 0, "AvailableWorkerThreads should be positive");
247248
Assert.True(status.ThreadPool.MaxIoThreads > 0, "MaxIoThreads should be positive");

0 commit comments

Comments
 (0)