Skip to content

Commit c54d73c

Browse files
author
rhamlett_microsoft
committed
Updated documentation.
1 parent addf462 commit c54d73c

2 files changed

Lines changed: 45 additions & 1 deletion

File tree

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ The CPU and Memory metric tiles use dynamic color coding based on utilization pe
8686
| `/api/health` | GET | Basic health check |
8787
| `/api/health/status` | GET | Detailed health with active simulations |
8888
| `/api/health/probe` | GET | Lightweight probe for latency measurement |
89+
| `/api/health/build` | GET | Build information and assembly version |
8990
| `/api/metrics/current` | GET | Latest metrics snapshot |
9091
| `/api/metrics/health` | GET | Detailed health status with warnings |
9192
| `/api/admin/stats` | GET | Simulation and resource statistics |
@@ -104,12 +105,16 @@ The CPU and Memory metric tiles use dynamic color coding based on utilization pe
104105
}
105106
```
106107

108+
- `durationSeconds`: How long to run (default: 30)
109+
- `targetPercentage`: Target CPU usage 1-100 (default: 100)
110+
107111
### Memory Pressure Simulation
108112

109113
| Endpoint | Method | Description |
110114
|----------|--------|-------------|
111115
| `/api/memory/allocate-memory` | POST | Allocate memory block |
112116
| `/api/memory/release-memory` | POST | Release all allocated memory |
117+
| `/api/memory/status` | GET | Get current memory allocation status |
113118

114119
**Request body (allocate):**
115120
```json
@@ -155,6 +160,27 @@ The slow request simulator generates requests using three different sync-over-as
155160
- **NestedSyncOverAsync**: Sync methods that block internally - look for `*_BLOCKS_INTERNALLY` methods
156161
- **DatabasePattern**: Simulated database/HTTP blocking - look for `*Sync_SYNC_BLOCK` methods
157162

163+
### Crash Simulation
164+
165+
| Endpoint | Method | Description |
166+
|----------|--------|-------------|
167+
| `/api/crash/trigger` | POST | Trigger a crash with options |
168+
| `/api/crash/now` | GET/POST | Immediate synchronous crash (best for Azure Crash Monitoring) |
169+
| `/api/crash/types` | GET | List available crash types |
170+
| `/api/crash/failfast` | POST | Quick FailFast crash |
171+
| `/api/crash/stackoverflow` | POST | Quick StackOverflow crash |
172+
173+
**Request body (trigger):**
174+
```json
175+
{
176+
"crashType": "FailFast",
177+
"delaySeconds": 3,
178+
"message": "Optional crash message"
179+
}
180+
```
181+
182+
**Available crash types:** `FailFast`, `StackOverflow`, `UnhandledException`, `AccessViolation`, `OutOfMemory`
183+
158184
### Admin Operations
159185

160186
| Endpoint | Method | Description |

src/PerfProblemSimulator/wwwroot/documentation.html

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,11 @@ <h3>Health & Monitoring</h3>
624624
<td><span class="method-badge method-get">GET</span></td>
625625
<td>Lightweight probe for latency measurement</td>
626626
</tr>
627+
<tr>
628+
<td><code>/api/health/build</code></td>
629+
<td><span class="method-badge method-get">GET</span></td>
630+
<td>Build information and assembly version</td>
631+
</tr>
627632
<tr>
628633
<td><code>/api/metrics/current</code></td>
629634
<td><span class="method-badge method-get">GET</span></td>
@@ -662,9 +667,12 @@ <h3>CPU Stress Simulation</h3>
662667
<p><strong>Request body:</strong></p>
663668
<div class="code-block">
664669
{
665-
<span class="string">"durationSeconds"</span>: 30
670+
<span class="string">"durationSeconds"</span>: 30,
671+
<span class="string">"targetPercentage"</span>: 100
666672
}
667673
</div>
674+
<p><code>durationSeconds</code>: How long to run (default: 30)<br>
675+
<code>targetPercentage</code>: Target CPU usage 1-100 (default: 100)</p>
668676

669677
<h3>Memory Pressure Simulation</h3>
670678
<table class="api-table">
@@ -686,6 +694,11 @@ <h3>Memory Pressure Simulation</h3>
686694
<td><span class="method-badge method-post">POST</span></td>
687695
<td>Release all allocated memory</td>
688696
</tr>
697+
<tr>
698+
<td><code>/api/memory/status</code></td>
699+
<td><span class="method-badge method-get">GET</span></td>
700+
<td>Get current memory allocation status</td>
701+
</tr>
689702
</tbody>
690703
</table>
691704
<p><strong>Request body (allocate):</strong></p>
@@ -792,6 +805,11 @@ <h3>Crash Simulation</h3>
792805
<td><span class="method-badge method-post">POST</span></td>
793806
<td>Trigger a crash of specified type</td>
794807
</tr>
808+
<tr>
809+
<td><code>/api/crash/now</code></td>
810+
<td><span class="method-badge method-get">GET</span> <span class="method-badge method-post">POST</span></td>
811+
<td>Immediate synchronous crash (best for Azure Crash Monitoring)</td>
812+
</tr>
795813
<tr>
796814
<td><code>/api/crash/types</code></td>
797815
<td><span class="method-badge method-get">GET</span></td>

0 commit comments

Comments
 (0)