Giter VIP home page Giter VIP logo

xk6-zmq's Introduction

xk6-zmq

This is a k6 extension using the xk6 system.

❗ 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:

Then:

  1. Install xk6:
$ go install go.k6.io/xk6/cmd/xk6@latest
  1. Build the binary:
$ xk6 build --with github.com/dgzlopes/xk6-zmq@latest

Example

import zmq from 'k6/x/zmq';

const socket = zmq.newSocket("tcp://localhost:5555")

export default function () {
  url.Send(socket,"foo")
}

export function teardown () {
  url.closeSocket(socket)
}

xk6-zmq's People

Contributors

dgzlopes avatar mstoykov avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

xk6-zmq's Issues

Extension fails to build

➜  xk6-zmq git:(main) ✗ xk6 help
2021/05/13 10:17:32 [INFO] Temporary folder: /tmp/buildenv_2021-05-13-1017.545437441
2021/05/13 10:17:32 [INFO] Writing main module: /tmp/buildenv_2021-05-13-1017.545437441/main.go
2021/05/13 10:17:32 [INFO] Initializing Go module
2021/05/13 10:17:32 [INFO] exec (timeout=10s): /usr/local/go/bin/go mod init k6 
go: creating new go.mod: module k6
go: to add module requirements and sums:
        go mod tidy
2021/05/13 10:17:32 [INFO] Replace github.com/dgzlopes/xk6-zmq => /home/dgzlopes/go/src/github.com/dgzlopes/xk6-zmq
2021/05/13 10:17:32 [INFO] exec (timeout=10s): /usr/local/go/bin/go mod edit -replace github.com/dgzlopes/xk6-zmq=/home/dgzlopes/go/src/github.com/dgzlopes/xk6-zmq 
2021/05/13 10:17:32 [INFO] Pinning versions
2021/05/13 10:17:32 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v go.k6.io/k6 
go get: added go.k6.io/k6 v0.32.0
2021/05/13 10:17:33 [INFO] Build environment ready
2021/05/13 10:17:33 [INFO] Building k6
2021/05/13 10:17:33 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy 
go: found github.com/dgzlopes/xk6-zmq in github.com/dgzlopes/xk6-zmq v0.0.0-00010101000000-000000000000
2021/05/13 10:17:33 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /home/dgzlopes/go/src/github.com/dgzlopes/xk6-zmq/k6 -ldflags -w -s -trimpath 
# github.com/pebbe/zmq4
/home/dgzlopes/go/pkg/mod/github.com/pebbe/[email protected]/reactor.go:10:4: undefined: State
/home/dgzlopes/go/pkg/mod/github.com/pebbe/[email protected]/reactor.go:11:9: undefined: State
/home/dgzlopes/go/pkg/mod/github.com/pebbe/[email protected]/reactor.go:21:16: undefined: Socket
/home/dgzlopes/go/pkg/mod/github.com/pebbe/[email protected]/reactor.go:23:12: undefined: Poller
/home/dgzlopes/go/pkg/mod/github.com/pebbe/[email protected]/reactor.go:61:34: undefined: Socket
/home/dgzlopes/go/pkg/mod/github.com/pebbe/[email protected]/reactor.go:61:49: undefined: State
/home/dgzlopes/go/pkg/mod/github.com/pebbe/[email protected]/reactor.go:68:37: undefined: Socket
/home/dgzlopes/go/pkg/mod/github.com/pebbe/[email protected]/utils.go:17:12: undefined: Socket
/home/dgzlopes/go/pkg/mod/github.com/pebbe/[email protected]/utils.go:24:12: undefined: Socket
/home/dgzlopes/go/pkg/mod/github.com/pebbe/[email protected]/utils.go:28:12: undefined: Socket
/home/dgzlopes/go/pkg/mod/github.com/pebbe/[email protected]/utils.go:28:12: too many errors
2021/05/13 10:17:33 [INFO] Cleaning up temporary folder: /tmp/buildenv_2021-05-13-1017.545437441
2021/05/13 10:17:33 [ERROR] exit status 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.