as nebula-go uses a replaced mod, should build with several complicated steps:
export XK6_SKIP_CLEANUP=1 && make build-dev
cd the build directory, and then add replace in go.mod, github.com/facebook/fbthrift => github.com/vesoft-inc/fbthrift v0.0.0-20230214024353-fa2f34755b28
go mod, and then build with command. e.g. go build -o k6 -ldflags "-w -s" -trimpath
Usage:
import nebulaPool from 'k6/x/nebulagraph';
import { check } from 'k6';
import { Trend } from 'k6/metrics';
import { sleep } from 'k6';
var latencyTrend = new Trend('latency');
var responseTrend = new Trend('responseTime');
# enable http2
nebulaPool.enableHttp2()
# communicate service with SSL connection
nebulaPool.setSSLConfig("ca.pem", "client.pem", "client.key")
// initial nebula connect pool
var pool = nebulaPool.init("192.168.15.32:10030", 400);
// initial session for every vu
var session = pool.getSession("root", "nebula")
session.execute("USE sf0_1")
...(as before)
support http2 and ssl
PLEASE NOTE:
as nebula-go uses a replaced mod, should build with several complicated steps:
go.mod
,github.com/facebook/fbthrift => github.com/vesoft-inc/fbthrift v0.0.0-20230214024353-fa2f34755b28
go build -o k6 -ldflags "-w -s" -trimpath
Usage: