A k6 extension to updating the current k6 metrics summaries on the terminal during the test run. Metric summaries are updated on the terminal screen at regular intervals (default: 2s).
All custom k6 metrics (Counter,Gauge,Rate,Trend) and build-in metrics are supported.
Table of Contents
You can download pre-built k6 binaries from Releases page. Check Packages page for pre-built k6 Docker images.
To build a
k6 binary with this extension, first ensure you have the prerequisites:
- Go toolchain
$ go install go.k6.io/xk6/cmd/[email protected]
- Build the binary:
$ xk6 build --with github.com/szkiba/[email protected]
$ ./k6 run --out top script.js
The output extension accept parameters in a standard query string format:
k6 run --out 'top=param1=value1¶m2=value2¶m3=value3'
Note apostrophe (
') characters around the
--outparameter! You should use it for escape
&characters from shell (or use backslash before
The following parameters are recognized:
|period||Screen refresh frequency (default:
You can also use pre-built k6 image within a Docker container. To do that, you'll need to execute something more-or-less like the following:
docker run -v $(pwd):/scripts -it --rm ghcr.io/szkiba/xk6-top:latest run --out=top /scripts/script.js
docker run -v %cd%:/scripts -it --rm ghcr.io/szkiba/xk6-top:latest run --out=top /scripts/script.js
Display total and remaining duration of test
Hey, I just tried it and it looks really nice. I have one problem though, it doesn't seem to show how long the test has been running for (and/or remaining duration).
Additionally, would it be possible to show the name of the currently-running script?