A k6 extension for decoding and encoding proto files. Built using xk6.
Follow these steps to set up and run the K6 benchmark with Protobuf support:
Installing Go toolchain
Add the Go binary directory to your system's PATH
environment variable:
export PATH=$(go env GOPATH)/bin:$PATH
Install the latest version of xk6:
go install go.k6.io/xk6/cmd/xk6@latest
Build the K6 binary with the xk6-protobuf
extension:
xk6 build --with github.com/traveltime-dev/xk6-protobuf@latest
If you want to build it locally, then clone this repository and use:
xk6 build --with xk6-protobuf=.
Run the K6 benchmark using the generated binary and the protobuf benchmark file:
./k6 run {proto-benchmark-file}.js
Replace {proto-benchmark-file}.js
with the actual file name of your protobuf benchmark script.
Command to run examples:
./k6 run example/codec.js