From 7065d51429d872b86df0c27f87db6930cb1b2348 Mon Sep 17 00:00:00 2001 From: HarrisChu <1726587+HarrisChu@users.noreply.github.com> Date: Sun, 26 Dec 2021 11:25:41 +0800 Subject: [PATCH 1/2] upgrade nebula-go --- client.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client.go b/client.go index c9cf444..f566450 100644 --- a/client.go +++ b/client.go @@ -15,7 +15,7 @@ type Data []string type Output struct { TimeStamp int64 NGQL string - Latency int32 + Latency int64 ResponseTime int32 IsSucceed bool Rows int32 diff --git a/go.mod b/go.mod index 3ea2b44..319b929 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module github.com/vesoft-inc/k6-plugin go 1.16 require ( - github.com/vesoft-inc/nebula-go/v2 v2.5.1 + github.com/vesoft-inc/nebula-go/v2 v2.5.2-0.20211223072708-423659a022a3 go.k6.io/k6 v0.33.0 ) diff --git a/go.sum b/go.sum index 3709abb..438a96f 100644 --- a/go.sum +++ b/go.sum @@ -324,8 +324,8 @@ github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLY github.com/urfave/negroni v0.3.1-0.20180130044549-22c5532ea862/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4/go.mod h1:50wTf68f99/Zt14pr046Tgt3Lp2vLyFZKzbFXTOabXw= -github.com/vesoft-inc/nebula-go/v2 v2.5.1 h1:y4gBQzRqb3W4jeBbbAdtCPxVZ4tXKv9TJLHjNuWGhI0= -github.com/vesoft-inc/nebula-go/v2 v2.5.1/go.mod h1:fehDUs97/mpmxXi9WezhznX0Dg7hmQRUoOWgDZv9zG0= +github.com/vesoft-inc/nebula-go/v2 v2.5.2-0.20211223072708-423659a022a3 h1:ccWeKTZoyH9S1E81ApPHFomfPseEDTzvgpgOHzlJiz8= +github.com/vesoft-inc/nebula-go/v2 v2.5.2-0.20211223072708-423659a022a3/go.mod h1:fehDUs97/mpmxXi9WezhznX0Dg7hmQRUoOWgDZv9zG0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= From 7853735371f034024b063353d8e9bcaedc5e250b Mon Sep 17 00:00:00 2001 From: HarrisChu <1726587+HarrisChu@users.noreply.github.com> Date: Mon, 27 Dec 2021 10:01:52 +0800 Subject: [PATCH 2/2] update doc --- Makefile | 2 +- README.md | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index d519509..ecfb6e4 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ VERSION ?= v0.0.8 build: go install github.com/k6io/xk6/cmd/xk6@v0.4.1 - $(GOPATH)/bin/xk6 build --with github.com/vesoft-inc/k6-plugin@latest; + $(GOPATH)/bin/xk6 build --with github.com/vesoft-inc/k6-plugin@$(VERSION); build-all: build-arm-v7 diff --git a/README.md b/README.md index 81bf41c..b03b9d3 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,15 @@ Used to test [Nebula-Graph](https://github.com/vesoft-inc/nebula-graph). * xk6 v0.4.1 * Golang 1.16+ +## Version match + +There are the version correspondence between k6-plugin and Nebula: + +| k6-plugin Version | Nebula Version | +|:-----------------:|:--------------:| +| v0.0.8 | 2.5.0, 2.5.1, 2.6.0, 2.6.1 | +| master | nightly | + ## Build To build a `k6` binary with this extension, first ensure you have the prerequisites: @@ -27,9 +36,13 @@ Then: 2. Build the binary: - ```bash - xk6 build --with github.com/vesoft-inc/k6-plugin@v0.4.1 - ``` +```bash +xk6 build --with github.com/vesoft-inc/k6-plugin@{version} +# e.g. build v0.0.8 +xk6 build --with github.com/vesoft-inc/k6-plugin@v0.0.8 +# e.g. build master +xk6 build --with github.com/vesoft-inc/k6-plugin@master +``` ## Example @@ -227,7 +240,6 @@ And then ramping up from 10 vus to 35 vus in 10 minutes. Then ramping down from 35 vu3 to 0 in 3 minutes. - It is much useful when we test multiple scenarios. please refer to [k6 options](https://k6.io/docs/using-k6/options/)