Etcd: how to run etcd benchmark tool.

Created on 6 Feb 2019  路  7Comments  路  Source: etcd-io/etcd

  • just as the issue-8386 ,I read the doc, but still cannot know how to etcd benchmark tool,I exec go get github.com/coreos/etcd/tools/benchmark,then exec
    benchmark --endpoints=${HOST_1} --target-leader --conns=1 --clients=1 put --key-size=8 --sequential-keys --total=10000 --val-size=256,but got this error benchmark: command not found
  • search around the source codes in the master branch,cannot get something useful.forgive me, I am a newbie for go.
  • my env is :
    >
    etcd Version: 3.3.11
    Git SHA: 2cf9e51d2
    Go Version: go1.10.7
    Go OS/Arch: linux/amd64
arequestion

Most helpful comment

Great comment regarding compiling from source and to go get this works for me.

go get go.etcd.io/etcd/tools/benchmark

If you use that method just make sure $GOPATH/bin is part of your $PATH something like

echo $PATH | grep -o $GOPATH/bin

All 7 comments

@maoling hello, from your cloned copy, try this one go install -v ./tools/benchmark and then run your benchmark, let's see if that work.

Great comment regarding compiling from source and to go get this works for me.

go get go.etcd.io/etcd/tools/benchmark

If you use that method just make sure $GOPATH/bin is part of your $PATH something like

echo $PATH | grep -o $GOPATH/bin

@spzala @hexfusion Thanks for your help.

  • it will be be a disaster for a Chinese user due to the GFW.
  • use the way from hexfusion,I exec go get go.etcd.io/etcd/tools/benchmark almost a whole day,and only success one time miraculously(cry), then I find her under $GOPATH/bin.Bingo!
  • use the way from spzala,I get some dependency errors(net,time not in my local(cry)):

Fetching https://google.golang.org/grpc?go-get=1
Fetching https://google.golang.org/genproto?go-get=1
Fetching https://golang.org/x/net?go-get=1
Fetching https://golang.org/x/time?go-get=1
Fetching https://golang.org/x/text?go-get=1
Fetching https://golang.org/x/sync?go-get=1
Fetching https://golang.org/x/sys?go-get=1
Fetching https://golang.org/x/crypto?go-get=1

then I install them one by one ,just like this

$mkdir -p $GOPATH/src/golang.org/x/
$cd $GOPATH/src/golang.org/x/
$git clone https://github.com/golang/net.git net
$go install net

Finally, I quit and weep in the toilet.

  • Why etcd doesn't make the benchmark shell build-in, just like etcdctl?

How about try to use GOPROXY to do that by package https://github.com/goproxyio/goproxy ?
And I use it with a HK VPS .It works!

  • Why etcd doesn't make the benchmark shell build-in, just like etcdctl?

My understanding is the tools under the tool folder are not necessarily needed by every user, so their download and installation is optional. Whereas etcdctl is the command line tool that is likely used by most users.

@maoling :( With reasoning @jingyih provided above and related merged PR, is it OK to close the issue? Thanks!

@spzala Of Course,Let me close it.

Was this page helpful?
0 / 5 - 0 ratings