https://github.com/mstoykov/xk6-breakpoint
https://github.com/mstoykov/xk6-breakpoint
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mstoykov/xk6-breakpoint
- Owner: mstoykov
- License: mit
- Created: 2021-06-07T13:14:58.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-07T15:01:51.000Z (about 4 years ago)
- Last Synced: 2024-12-25T13:42:02.557Z (6 months ago)
- Language: Go
- Size: 24.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xk6-breakpoint
This is a [k6](https://go.k6.io/k6) extension using the [xk6](https://github.com/k6io/xk6) system.
| :exclamation: This is a proof of concept, isn't supported by the k6 team, and may break in the future. USE AT YOUR OWN RISK! |
| ---------------------------------------------------------------------------------------------------------------------------- |## Build
To build a `k6` binary with this extension, first ensure you have the prerequisites:
- [gvm](https://github.com/moovweb/gvm)
- [Git](https://git-scm.com/)Then, install [xk6](https://github.com/k6io/xk6) and build your custom k6 binary with the Kafka extension:
1. Install `xk6`:
```shell
$ go install github.com/k6io/xk6/cmd/xk6@latest
```2. Build the binary:
```shell
$ xk6 build --with github.com/mstoykov/xk6-breakpoint@latest
```# example
```javascript
import breakpoint from "k6/x/breakpoint"
export default function() {
var s = "something";
breakpoint.break()
}
```Some asciinema showing how to (ab)use it:
[](https://asciinema.org/a/GvhZaBg8WiL1yh9gdsLveJaPB)
[](https://asciinema.org/a/dPKP4kcotM6RU5kgWUkfGFbR6)
[](https://asciinema.org/a/hzEZdFHVkDhQyGXiOyOwhjmfc)