To build the aarch64 Binary Executable
k6
, please follow these steps.
First, please install the Go compiler tools for your machine, from
https://golang.org/doc/install.
Then please execute these commands:
cd ~/ncsexamples/batchMode
GOARCH=arm64 GOOS=linux GOPATH=$PWD/go go get go.k6.io/k6
cp -p go/bin/linux_arm64/k6 k6Worker
tar -czf k6Worker/k6.tar.gz k6Worker/k6
rm k6Worker/k6
Now you will have the compressed binary executable file
~/ncsexamples/batchMode/k6Worker/k6.tar.gz
, ready to send to the workers.
In the subdirectory
~/ncsexamples/batchMode
you will find the
runBatchK6.py command.
This script will create a set of instances running on mobile devices, one instance for each load generator.
In the default example provided, we ask for 6 successful instances:
startFrame = 1,
endFrame = 6,
nWorkers = 10,
By setting
nWorkers = 10
, we slightly over-allocate instances to allow for some fraction to fail.
It will command the
instances to install k6, and then run k6 with a short (90 seconds) and simple test script
./k6Worker/script.js
to send http
requests to the target URL (currently
https://loadtest-target.neocortix.com
).
def frameCmd( self, frameNum ):
cmd = 'cd k6Worker && ./k6 run -q script.js --out csv=~/worker_%03d.csv' % (
frameNum
)
return cmd
The output of each instance will be
a .csv file
worker_<n>.csv
containing request response timing information for each worker. The master will create several
image files
worldMap.png
,
deliveredLoad.png
,
responseTimesByRegion.png
,
and then terminate the instances.