You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -293,12 +293,33 @@ If you run `rspec` at the top level, you'll see this message: `require': cannot
293
293
294
294
After running a test, you can view the coverage results in SimpleCov reports by opening `coverage/index.html`.
295
295
296
+
### Benchmarking
297
+
You'll need to [install `k6`](https://grafana.com/docs/k6/latest/set-up/install-k6/) first.
298
+
299
+
The benchmarking scripts are in `k6` directory, so you can run, for example:
300
+
```sh
301
+
k6 run k6/root.js
302
+
```
303
+
to exercise the main page of the dummy app, or `k6/streaming.js` for the streaming page.
304
+
305
+
For significant changes, please make sure to run all benchmarks before and after, and include the results in the PR.
306
+
Later they will be added to CI, if we can make sure the results there are stable enough.
307
+
308
+
If you add significant new functionality and add a page in the dummy app showing it, consider adding the corresponding benchmark as well.
309
+
310
+
#### Debugging the benchmark scripts
311
+
You can add `-e DEBUG_K6=true` to run only a single iteration while showing HTTP requests and responses. See
312
+
[How to debug k6 load testing scripts](https://github.com/grafana/k6-learn/blob/main/Modules/III-k6-Intermediate/01-How-to-debug-k6-load-testing-scripts.md) for more suggestions if needed.
313
+
296
314
### Debugging
297
315
Start the sample app like this for some debug printing:
0 commit comments