proagents 1.6.20 → 1.6.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/.claude/settings.local.json +3 -1
  2. package/.proagents/.cursorrules +1 -1
  3. package/.proagents/.windsurfrules +1 -1
  4. package/.proagents/AGENTS.md +1 -1
  5. package/.proagents/AI_INSTRUCTIONS.md +29 -1
  6. package/.proagents/BOLT.md +1 -1
  7. package/.proagents/CLAUDE.md +1 -1
  8. package/.proagents/GEMINI.md +1 -1
  9. package/.proagents/KIRO.md +1 -1
  10. package/.proagents/LOVABLE.md +1 -1
  11. package/.proagents/REPLIT.md +1 -1
  12. package/.proagents/custom-commands.yaml +1 -2
  13. package/.proagents/docs/command-details.md +1 -2
  14. package/.proagents/getting-started/ai-training-setup.md +0 -1
  15. package/.proagents/performance/README.md +59 -0
  16. package/.proagents/performance/bundle-analysis.md +375 -0
  17. package/.proagents/performance/load-testing.md +563 -0
  18. package/.proagents/performance/runtime-metrics.md +489 -0
  19. package/.proagents/performance/web-vitals.md +425 -0
  20. package/.proagents/proagents.config.yaml +55 -1
  21. package/.proagents/prompts/11-session-tracking.md +100 -0
  22. package/.proagents/prompts/13-commit.md +426 -0
  23. package/.proagents/workflow-modes/entry-modes.md +1 -6
  24. package/COMMANDS.md +19 -0
  25. package/lib/commands/init.js +62 -11
  26. package/package.json +1 -1
  27. package/.proagents/api-versioning/README.md +0 -257
  28. package/.proagents/api-versioning/changelog-template.md +0 -225
  29. package/.proagents/api-versioning/deprecation-workflow.md +0 -470
  30. package/.proagents/api-versioning/versioning-strategy.md +0 -291
  31. package/.proagents/automation/README.md +0 -38
  32. package/.proagents/automation/ai-behavior-rules.md +0 -339
  33. package/.proagents/automation/ai-prompt-injection.md +0 -331
  34. package/.proagents/automation/auto-decisions.md +0 -535
  35. package/.proagents/automation/decision-defaults.yaml +0 -317
  36. package/.proagents/cache/README.md +0 -110
  37. package/.proagents/cache/analysis-metadata.json +0 -76
  38. package/.proagents/cache/conventions.json +0 -125
  39. package/.proagents/cache/dependencies.json +0 -85
  40. package/.proagents/cache/features.json +0 -115
  41. package/.proagents/cache/patterns.json +0 -105
  42. package/.proagents/cache/schemas/conventions-schema.json +0 -138
  43. package/.proagents/cache/schemas/dependencies-schema.json +0 -95
  44. package/.proagents/cache/schemas/features-schema.json +0 -104
  45. package/.proagents/cache/schemas/metadata-schema.json +0 -83
  46. package/.proagents/cache/schemas/patterns-schema.json +0 -136
  47. package/.proagents/cache/schemas/structure-schema.json +0 -72
  48. package/.proagents/cache/structure.json +0 -109
  49. package/.proagents/checklists/README.md +0 -261
  50. package/.proagents/checklists/code-quality.md +0 -137
  51. package/.proagents/checklists/code-review.md +0 -148
  52. package/.proagents/checklists/pr-checklist.md +0 -78
  53. package/.proagents/checklists/pre-deployment.md +0 -132
  54. package/.proagents/checklists/pre-implementation.md +0 -80
  55. package/.proagents/checklists/testing.md +0 -120
  56. package/.proagents/checkpoints.json +0 -13
  57. package/.proagents/cicd/README.md +0 -338
  58. package/.proagents/cicd/azure-devops.md +0 -267
  59. package/.proagents/cicd/github-actions.md +0 -375
  60. package/.proagents/cicd/gitlab-ci.md +0 -278
  61. package/.proagents/cicd/jenkins.md +0 -317
  62. package/.proagents/collaboration/README.md +0 -143
  63. package/.proagents/collaboration/roles.md +0 -248
  64. package/.proagents/collaboration/sessions.md +0 -390
  65. package/.proagents/collaboration/sync.md +0 -358
  66. package/.proagents/cost/README.md +0 -48
  67. package/.proagents/cost/cost-template.md +0 -283
  68. package/.proagents/cost/estimation-framework.md +0 -287
  69. package/.proagents/database/README.md +0 -72
  70. package/.proagents/database/examples/001-create-users.sql +0 -129
  71. package/.proagents/database/examples/002-add-preferences.sql +0 -94
  72. package/.proagents/database/examples/003-add-index.sql +0 -105
  73. package/.proagents/database/examples/004-rename-column.sql +0 -122
  74. package/.proagents/database/examples/005-add-foreign-key.sql +0 -142
  75. package/.proagents/database/examples/006-data-migration.sql +0 -196
  76. package/.proagents/database/examples/007-drop-column.sql +0 -163
  77. package/.proagents/database/examples/README.md +0 -89
  78. package/.proagents/database/migration-workflow.md +0 -478
  79. package/.proagents/database/rollback-scripts.md +0 -487
  80. package/.proagents/database/safety-checks.md +0 -447
  81. package/.proagents/git/README.md +0 -68
  82. package/.proagents/git/branch-strategy.md +0 -164
  83. package/.proagents/git/commit-conventions.md +0 -241
  84. package/.proagents/git/pr-workflow.md +0 -286
  85. package/.proagents/git/rollback-procedures.md +0 -416
  86. package/.proagents/ide-integration/README.md +0 -124
  87. package/.proagents/ide-integration/cline-config.md +0 -429
  88. package/.proagents/ide-integration/continue-config.md +0 -380
  89. package/.proagents/ide-integration/cursor-rules.md +0 -280
  90. package/.proagents/ide-integration/github-copilot.md +0 -384
  91. package/.proagents/ide-integration/windsurf-rules.md +0 -314
  92. package/.proagents/integrations/README.md +0 -97
  93. package/.proagents/integrations/pm/README.md +0 -344
  94. package/.proagents/learning/README.md +0 -136
  95. package/.proagents/learning/adaptation.md +0 -305
  96. package/.proagents/learning/data-collection.md +0 -283
  97. package/.proagents/learning/implementation-guide.md +0 -865
  98. package/.proagents/learning/reports.md +0 -306
  99. package/.proagents/mcp/README.md +0 -133
  100. package/.proagents/mcp/context-providers.md +0 -442
  101. package/.proagents/mcp/server-config.md +0 -306
  102. package/.proagents/mcp/tools-definition.md +0 -513
  103. package/.proagents/pm-integration/README.md +0 -151
  104. package/.proagents/pm-integration/asana.md +0 -346
  105. package/.proagents/pm-integration/github-issues.md +0 -308
  106. package/.proagents/pm-integration/gitlab-issues.md +0 -482
  107. package/.proagents/pm-integration/jira.md +0 -364
  108. package/.proagents/pm-integration/linear.md +0 -409
  109. package/.proagents/pm-integration/notion.md +0 -275
  110. package/.proagents/pm-integration/sync-config.md +0 -533
  111. package/.proagents/pm-integration/trello.md +0 -159
  112. package/.proagents/rules/README.md +0 -179
  113. package/.proagents/rules/custom-rules-template.yaml +0 -286
  114. package/.proagents/rules/custom-rules.md +0 -754
  115. package/.proagents/rules/validation-rules-template.yaml +0 -517
  116. package/.proagents/runbooks/README.md +0 -219
  117. package/.proagents/runbooks/dependency-vulnerability.md +0 -505
  118. package/.proagents/runbooks/incident-response.md +0 -451
  119. package/.proagents/runbooks/performance-degradation.md +0 -584
  120. package/.proagents/runbooks/production-debugging.md +0 -489
  121. package/.proagents/sessions/README.md +0 -5
  122. package/.proagents/sprints/README.md +0 -58
  123. package/.proagents/team/README.md +0 -256
  124. package/.proagents/team/code-ownership.md +0 -306
  125. package/.proagents/team/communication-templates.md +0 -441
  126. package/.proagents/team/handoff-protocol.md +0 -380
  127. package/.proagents/team/ide-setup/README.md +0 -103
  128. package/.proagents/team/ide-setup/cursor.md +0 -276
  129. package/.proagents/team/ide-setup/jetbrains.md +0 -330
  130. package/.proagents/team/ide-setup/neovim.md +0 -640
  131. package/.proagents/team/ide-setup/vscode.md +0 -348
  132. package/.proagents/team/onboarding.md +0 -278
  133. package/.proagents/time-tracking.json +0 -19
  134. package/.proagents/troubleshooting/README.md +0 -730
  135. package/.proagents/troubleshooting/ai-issues.md +0 -601
  136. package/.proagents/troubleshooting/workflow-issues.md +0 -571
@@ -0,0 +1,563 @@
1
+ # Load Testing Guide
2
+
3
+ Comprehensive load testing strategies and implementation.
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ Load testing ensures your application can handle expected (and unexpected) traffic. This guide covers:
10
+ - Load testing types
11
+ - Tool selection and setup
12
+ - Test scenario design
13
+ - Result analysis
14
+
15
+ ---
16
+
17
+ ## Load Testing Types
18
+
19
+ ### 1. Smoke Test
20
+ Quick validation that system works under minimal load.
21
+
22
+ ```yaml
23
+ smoke_test:
24
+ duration: "1m"
25
+ users: 1-5
26
+ purpose: "Verify system is functional"
27
+ when: "Before every deployment"
28
+ ```
29
+
30
+ ### 2. Load Test
31
+ Assess performance under expected normal conditions.
32
+
33
+ ```yaml
34
+ load_test:
35
+ duration: "10-30m"
36
+ users: "Expected average"
37
+ purpose: "Verify performance targets met"
38
+ when: "Before releases"
39
+ ```
40
+
41
+ ### 3. Stress Test
42
+ Find the breaking point of the system.
43
+
44
+ ```yaml
45
+ stress_test:
46
+ duration: "Until failure"
47
+ users: "Gradually increase"
48
+ purpose: "Find system limits"
49
+ when: "Quarterly or major changes"
50
+ ```
51
+
52
+ ### 4. Spike Test
53
+ Handle sudden traffic spikes.
54
+
55
+ ```yaml
56
+ spike_test:
57
+ duration: "5-10m"
58
+ users: "10x normal suddenly"
59
+ purpose: "Test auto-scaling and recovery"
60
+ when: "Before marketing campaigns"
61
+ ```
62
+
63
+ ### 5. Soak Test
64
+ Extended duration testing for memory leaks.
65
+
66
+ ```yaml
67
+ soak_test:
68
+ duration: "4-24 hours"
69
+ users: "Normal load"
70
+ purpose: "Find memory leaks, connection issues"
71
+ when: "Monthly"
72
+ ```
73
+
74
+ ---
75
+
76
+ ## K6 Load Testing
77
+
78
+ ### Installation
79
+
80
+ ```bash
81
+ # macOS
82
+ brew install k6
83
+
84
+ # Linux
85
+ sudo gpg -k
86
+ sudo gpg --no-default-keyring --keyring /usr/share/keyrings/k6-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69
87
+ echo "deb [signed-by=/usr/share/keyrings/k6-archive-keyring.gpg] https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list
88
+ sudo apt-get update
89
+ sudo apt-get install k6
90
+ ```
91
+
92
+ ### Basic Load Test
93
+
94
+ ```javascript
95
+ // tests/load/basic.js
96
+ import http from 'k6/http';
97
+ import { check, sleep } from 'k6';
98
+
99
+ export const options = {
100
+ stages: [
101
+ { duration: '2m', target: 100 }, // Ramp up to 100 users
102
+ { duration: '5m', target: 100 }, // Stay at 100 users
103
+ { duration: '2m', target: 0 }, // Ramp down
104
+ ],
105
+ thresholds: {
106
+ http_req_duration: ['p(95)<500'], // 95% under 500ms
107
+ http_req_failed: ['rate<0.01'], // Less than 1% failures
108
+ },
109
+ };
110
+
111
+ export default function () {
112
+ const res = http.get('https://api.example.com/users');
113
+
114
+ check(res, {
115
+ 'status is 200': (r) => r.status === 200,
116
+ 'response time < 500ms': (r) => r.timings.duration < 500,
117
+ });
118
+
119
+ sleep(1);
120
+ }
121
+ ```
122
+
123
+ ### API Flow Test
124
+
125
+ ```javascript
126
+ // tests/load/user-flow.js
127
+ import http from 'k6/http';
128
+ import { check, group, sleep } from 'k6';
129
+ import { SharedArray } from 'k6/data';
130
+
131
+ // Load test data
132
+ const users = new SharedArray('users', function () {
133
+ return JSON.parse(open('./test-users.json'));
134
+ });
135
+
136
+ export const options = {
137
+ scenarios: {
138
+ user_flow: {
139
+ executor: 'ramping-vus',
140
+ startVUs: 0,
141
+ stages: [
142
+ { duration: '2m', target: 50 },
143
+ { duration: '5m', target: 50 },
144
+ { duration: '2m', target: 100 },
145
+ { duration: '5m', target: 100 },
146
+ { duration: '2m', target: 0 },
147
+ ],
148
+ },
149
+ },
150
+ thresholds: {
151
+ 'http_req_duration{name:login}': ['p(95)<1000'],
152
+ 'http_req_duration{name:get_profile}': ['p(95)<500'],
153
+ 'http_req_duration{name:list_posts}': ['p(95)<800'],
154
+ http_req_failed: ['rate<0.02'],
155
+ },
156
+ };
157
+
158
+ const BASE_URL = 'https://api.example.com';
159
+
160
+ export default function () {
161
+ const user = users[Math.floor(Math.random() * users.length)];
162
+
163
+ group('User Authentication Flow', function () {
164
+ // Login
165
+ const loginRes = http.post(
166
+ `${BASE_URL}/auth/login`,
167
+ JSON.stringify({
168
+ email: user.email,
169
+ password: user.password,
170
+ }),
171
+ {
172
+ headers: { 'Content-Type': 'application/json' },
173
+ tags: { name: 'login' },
174
+ }
175
+ );
176
+
177
+ check(loginRes, {
178
+ 'login successful': (r) => r.status === 200,
179
+ 'has token': (r) => r.json('token') !== undefined,
180
+ });
181
+
182
+ const token = loginRes.json('token');
183
+ const authHeaders = {
184
+ 'Content-Type': 'application/json',
185
+ Authorization: `Bearer ${token}`,
186
+ };
187
+
188
+ sleep(1);
189
+
190
+ // Get Profile
191
+ const profileRes = http.get(`${BASE_URL}/users/me`, {
192
+ headers: authHeaders,
193
+ tags: { name: 'get_profile' },
194
+ });
195
+
196
+ check(profileRes, {
197
+ 'profile loaded': (r) => r.status === 200,
198
+ });
199
+
200
+ sleep(0.5);
201
+
202
+ // List Posts
203
+ const postsRes = http.get(`${BASE_URL}/posts?limit=10`, {
204
+ headers: authHeaders,
205
+ tags: { name: 'list_posts' },
206
+ });
207
+
208
+ check(postsRes, {
209
+ 'posts loaded': (r) => r.status === 200,
210
+ 'has posts': (r) => r.json('data').length > 0,
211
+ });
212
+
213
+ sleep(2);
214
+ });
215
+ }
216
+ ```
217
+
218
+ ### Spike Test
219
+
220
+ ```javascript
221
+ // tests/load/spike.js
222
+ import http from 'k6/http';
223
+ import { check, sleep } from 'k6';
224
+
225
+ export const options = {
226
+ stages: [
227
+ { duration: '1m', target: 50 }, // Normal load
228
+ { duration: '10s', target: 500 }, // Spike!
229
+ { duration: '3m', target: 500 }, // Stay at spike
230
+ { duration: '10s', target: 50 }, // Scale down
231
+ { duration: '2m', target: 50 }, // Recovery
232
+ { duration: '1m', target: 0 }, // Ramp down
233
+ ],
234
+ thresholds: {
235
+ http_req_duration: ['p(99)<3000'], // Even during spike
236
+ http_req_failed: ['rate<0.1'], // Allow some failures during spike
237
+ },
238
+ };
239
+
240
+ export default function () {
241
+ const res = http.get('https://api.example.com/health');
242
+ check(res, { 'status is 200': (r) => r.status === 200 });
243
+ sleep(0.5);
244
+ }
245
+ ```
246
+
247
+ ### Soak Test
248
+
249
+ ```javascript
250
+ // tests/load/soak.js
251
+ import http from 'k6/http';
252
+ import { check, sleep } from 'k6';
253
+
254
+ export const options = {
255
+ stages: [
256
+ { duration: '5m', target: 100 }, // Ramp up
257
+ { duration: '4h', target: 100 }, // Sustained load for 4 hours
258
+ { duration: '5m', target: 0 }, // Ramp down
259
+ ],
260
+ thresholds: {
261
+ http_req_duration: ['p(95)<500'],
262
+ http_req_failed: ['rate<0.01'],
263
+ },
264
+ };
265
+
266
+ export default function () {
267
+ const res = http.get('https://api.example.com/users');
268
+ check(res, { 'status is 200': (r) => r.status === 200 });
269
+ sleep(1);
270
+ }
271
+ ```
272
+
273
+ ---
274
+
275
+ ## Artillery Load Testing
276
+
277
+ ### Installation
278
+
279
+ ```bash
280
+ npm install -g artillery
281
+ ```
282
+
283
+ ### Basic Test Config
284
+
285
+ ```yaml
286
+ # tests/load/artillery.yml
287
+ config:
288
+ target: "https://api.example.com"
289
+ phases:
290
+ - duration: 120
291
+ arrivalRate: 10
292
+ rampTo: 50
293
+ name: "Ramp up"
294
+ - duration: 300
295
+ arrivalRate: 50
296
+ name: "Sustained load"
297
+ - duration: 60
298
+ arrivalRate: 50
299
+ rampTo: 0
300
+ name: "Ramp down"
301
+
302
+ defaults:
303
+ headers:
304
+ Content-Type: "application/json"
305
+
306
+ scenarios:
307
+ - name: "User Flow"
308
+ flow:
309
+ - post:
310
+ url: "/auth/login"
311
+ json:
312
+ email: "{{ $randomString(8) }}@test.com"
313
+ password: "testpassword"
314
+ capture:
315
+ - json: "$.token"
316
+ as: "token"
317
+
318
+ - get:
319
+ url: "/users/me"
320
+ headers:
321
+ Authorization: "Bearer {{ token }}"
322
+ expect:
323
+ - statusCode: 200
324
+
325
+ - get:
326
+ url: "/posts"
327
+ headers:
328
+ Authorization: "Bearer {{ token }}"
329
+ expect:
330
+ - statusCode: 200
331
+ ```
332
+
333
+ ### Run Artillery
334
+
335
+ ```bash
336
+ # Run test
337
+ artillery run tests/load/artillery.yml
338
+
339
+ # Run with report
340
+ artillery run tests/load/artillery.yml --output report.json
341
+
342
+ # Generate HTML report
343
+ artillery report report.json --output report.html
344
+ ```
345
+
346
+ ---
347
+
348
+ ## Test Scenarios
349
+
350
+ ### Scenario 1: E-commerce Checkout Flow
351
+
352
+ ```javascript
353
+ // tests/load/checkout.js
354
+ export default function () {
355
+ group('E-commerce Checkout', function () {
356
+ // Browse products
357
+ http.get(`${BASE_URL}/products`);
358
+ sleep(2);
359
+
360
+ // View product
361
+ http.get(`${BASE_URL}/products/123`);
362
+ sleep(1);
363
+
364
+ // Add to cart
365
+ http.post(`${BASE_URL}/cart/items`, JSON.stringify({
366
+ productId: '123',
367
+ quantity: 1,
368
+ }), { headers: authHeaders });
369
+ sleep(0.5);
370
+
371
+ // Checkout
372
+ http.post(`${BASE_URL}/checkout`, JSON.stringify({
373
+ cartId: 'cart-123',
374
+ paymentMethod: 'card',
375
+ }), { headers: authHeaders });
376
+ sleep(1);
377
+ });
378
+ }
379
+ ```
380
+
381
+ ### Scenario 2: Real-time API
382
+
383
+ ```javascript
384
+ // tests/load/websocket.js
385
+ import ws from 'k6/ws';
386
+ import { check } from 'k6';
387
+
388
+ export default function () {
389
+ const url = 'wss://api.example.com/realtime';
390
+
391
+ const res = ws.connect(url, {}, function (socket) {
392
+ socket.on('open', () => {
393
+ socket.send(JSON.stringify({ type: 'subscribe', channel: 'updates' }));
394
+ });
395
+
396
+ socket.on('message', (data) => {
397
+ const msg = JSON.parse(data);
398
+ check(msg, {
399
+ 'message received': (m) => m.type !== undefined,
400
+ });
401
+ });
402
+
403
+ socket.setTimeout(function () {
404
+ socket.close();
405
+ }, 30000);
406
+ });
407
+
408
+ check(res, { 'connected': (r) => r && r.status === 101 });
409
+ }
410
+ ```
411
+
412
+ ---
413
+
414
+ ## Results Analysis
415
+
416
+ ### Understanding K6 Output
417
+
418
+ ```
419
+ /\ |‾‾| /‾‾/ /‾‾/
420
+ /\ / \ | |/ / / /
421
+ / \/ \ | ( / ‾‾\
422
+ / \ | |\ \ | (‾) |
423
+ / __________ \ |__| \__\ \_____/ .io
424
+
425
+ execution: local
426
+ script: basic.js
427
+ output: -
428
+
429
+ scenarios: (100.00%) 1 scenario, 100 max VUs, 9m30s max duration
430
+ ✓ default: Up to 100 looping VUs for 9m0s
431
+
432
+ ✓ status is 200
433
+ ✓ response time < 500ms
434
+
435
+ checks.........................: 100.00% ✓ 54000 ✗ 0
436
+ data_received..................: 12 MB 22 kB/s
437
+ data_sent......................: 4.3 MB 7.8 kB/s
438
+ http_req_blocked...............: avg=1.2ms min=0s med=0s p(95)=0s p(99)=0s
439
+ http_req_connecting............: avg=500µs min=0s med=0s p(95)=0s p(99)=0s
440
+ ✓ http_req_duration............: avg=45ms min=12ms med=38ms p(95)=89ms p(99)=120ms
441
+ http_req_receiving.............: avg=500µs min=0s med=0s p(95)=1ms p(99)=2ms
442
+ http_req_sending...............: avg=100µs min=0s med=0s p(95)=0s p(99)=1ms
443
+ http_req_waiting...............: avg=44ms min=12ms med=37ms p(95)=88ms p(99)=119ms
444
+ http_reqs......................: 54000 100/s
445
+ iteration_duration.............: avg=1.04s min=1.01s med=1.03s p(95)=1.09s p(99)=1.12s
446
+ iterations.....................: 54000 100/s
447
+ vus............................: 100 min=1 max=100
448
+ vus_max........................: 100 min=100 max=100
449
+ ```
450
+
451
+ ### Key Metrics Interpretation
452
+
453
+ | Metric | Good | Warning | Critical |
454
+ |--------|------|---------|----------|
455
+ | `http_req_duration p(95)` | <200ms | 200-500ms | >500ms |
456
+ | `http_req_failed` | <1% | 1-5% | >5% |
457
+ | `iterations` | Meets target | 10% below | >20% below |
458
+ | `checks` | 100% | 95-99% | <95% |
459
+
460
+ ---
461
+
462
+ ## Load Test Report Template
463
+
464
+ ```markdown
465
+ # Load Test Report
466
+
467
+ ## Test Information
468
+ - **Date:** [Date]
469
+ - **Environment:** [staging/production]
470
+ - **Duration:** [Duration]
471
+ - **Test Type:** [Load/Stress/Spike/Soak]
472
+
473
+ ## Summary
474
+
475
+ | Metric | Target | Result | Status |
476
+ |--------|--------|--------|--------|
477
+ | Max Users | 100 | 100 | ✅ |
478
+ | P95 Latency | <500ms | 89ms | ✅ |
479
+ | Error Rate | <1% | 0.1% | ✅ |
480
+ | Throughput | 100 rps | 120 rps | ✅ |
481
+
482
+ ## Detailed Results
483
+
484
+ ### Response Time
485
+ - P50: 38ms
486
+ - P95: 89ms
487
+ - P99: 120ms
488
+ - Max: 250ms
489
+
490
+ ### Throughput
491
+ - Requests/sec: 120
492
+ - Total requests: 54,000
493
+
494
+ ### Errors
495
+ - Total: 54 (0.1%)
496
+ - 5xx: 0
497
+ - Timeouts: 54
498
+
499
+ ## Bottlenecks Identified
500
+
501
+ 1. **Database connection pool**
502
+ - Saturated at 80 concurrent users
503
+ - Recommendation: Increase pool size
504
+
505
+ 2. **Memory usage**
506
+ - Peaked at 85% during max load
507
+ - Recommendation: Add memory or optimize
508
+
509
+ ## Recommendations
510
+
511
+ 1. Increase database pool from 10 to 25
512
+ 2. Add response caching for `/api/products`
513
+ 3. Consider horizontal scaling for >200 users
514
+
515
+ ## Appendix
516
+
517
+ [Attach detailed test output and graphs]
518
+ ```
519
+
520
+ ---
521
+
522
+ ## Configuration
523
+
524
+ ```yaml
525
+ # proagents.config.yaml
526
+
527
+ performance:
528
+ load_testing:
529
+ enabled: true
530
+ tool: "k6"
531
+
532
+ default_thresholds:
533
+ http_req_duration_p95: 500ms
534
+ http_req_failed: 1%
535
+
536
+ environments:
537
+ staging:
538
+ base_url: "https://staging.example.com"
539
+ max_users: 100
540
+
541
+ production:
542
+ base_url: "https://api.example.com"
543
+ max_users: 500 # Higher limit
544
+
545
+ schedule:
546
+ smoke: "on_deploy"
547
+ load: "weekly"
548
+ stress: "monthly"
549
+ soak: "monthly"
550
+ ```
551
+
552
+ ---
553
+
554
+ ## Commands
555
+
556
+ | Command | Description |
557
+ |---------|-------------|
558
+ | `pa:load-test` | Run default load test |
559
+ | `pa:load-test --smoke` | Run smoke test |
560
+ | `pa:load-test --stress` | Run stress test |
561
+ | `pa:load-test --spike` | Run spike test |
562
+ | `pa:load-test --soak` | Run soak test |
563
+ | `pa:load-test --report` | Generate test report |