Skip to content

Commit 02236b2

Browse files
committed
Doc: add installtion instructions for tools
Add missing install commands. Update benchmark to go install as go get usage is deprecated. Also, improve overall instructions and experience. related etcd-io#13991
1 parent 82a258d commit 02236b2

File tree

5 files changed

+140
-23
lines changed

5 files changed

+140
-23
lines changed

tools/benchmark/README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,30 @@
22

33
`etcd/tools/benchmark` is the official benchmarking tool for etcd clusters.
44

5-
## Install
5+
## Installation
66

7-
To install `benchmark` follow these steps.
7+
Install the tool by running the following command from the etcd source directory.
88

9-
```sh
10-
$ go get go.etcd.io/etcd/v3/tools/benchmark
11-
$ benchmark --help
129
```
10+
$ go install -v ./tools/benchmark
11+
```
12+
13+
The installation will place executables in the $GOPATH/bin. If $GOPATH environment variable is not set, the tool will be installed into the $HOME/go/bin. You can also find out the installed location by running the following command from the etcd source directory. Make sure that $PATH is set accordingly in your environment.
1314

14-
Last command should output of usage of `benchmark`.
15+
```
16+
$ go list -f "{{.Target}}" ./tools/benchmark
17+
```
18+
19+
Alternatively, instead of installing the tool, you can use it by simply running the following command from the etcd source directory.
20+
21+
```
22+
$ go run ./tools/benchmark
23+
```
24+
25+
## Usage
26+
27+
The following command should output the usage per the latest development.
28+
29+
```
30+
$ benchmark --help
31+
```

tools/etcd-dump-db/README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
1-
### etcd-dump-db
1+
# etcd-dump-db
22

3-
etcd-dump-db inspects etcd db files.
3+
`etcd-dump-db` inspects etcd db files.
4+
5+
## Installation
6+
7+
Install the tool by running the following command from the etcd source directory.
8+
9+
```
10+
$ go install -v ./tools/etcd-dump-db
11+
```
12+
13+
The installation will place executables in the $GOPATH/bin. If $GOPATH environment variable is not set, the tool will be installed into the $HOME/go/bin. You can also find out the installed location by running the following command from the etcd source directory. Make sure that $PATH is set accordingly in your environment.
14+
15+
```
16+
$ go list -f "{{.Target}}" ./tools/etcd-dump-db
17+
```
18+
19+
Alternatively, instead of installing the tool, you can use it by simply running the following command from the etcd source directory.
20+
21+
```
22+
$ go run ./tools/etcd-dump-db
23+
```
24+
25+
## Usage
26+
27+
The following command should output the usage per the latest development.
28+
29+
```
30+
$ etcd-dump-db --help
31+
```
32+
33+
An example of usage detail is provided below.
434

535
```
636
Usage:

tools/etcd-dump-logs/README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
1-
### etcd-dump-logs
1+
# etcd-dump-logs
22

3-
etcd-dump-logs dumps the log from data directory.
3+
`etcd-dump-logs` dumps the log from data directory.
4+
5+
## Installation
6+
7+
Install the tool by running the following command from the etcd source directory.
8+
9+
```
10+
$ go install -v ./tools/etcd-dump-logs
11+
```
12+
13+
The installation will place executables in the $GOPATH/bin. If $GOPATH environment variable is not set, the tool will be installed into the $HOME/go/bin. You can also find out the installed location by running the following command from the etcd source directory. Make sure that $PATH is set accordingly in your environment.
14+
15+
```
16+
$ go list -f "{{.Target}}" ./tools/etcd-dump-logs
17+
```
18+
19+
Alternatively, instead of installing the tool, you can use it by simply running the following command from the etcd source directory.
20+
21+
```
22+
$ go run ./tools/etcd-dump-logs
23+
```
24+
25+
## Usage
26+
27+
The following command should output the usage per the latest development.
28+
29+
```
30+
$ etcd-dump-logs --help
31+
```
32+
33+
An example of usage detail is provided below.
434

535
```
636
Usage:

tools/etcd-dump-metrics/README

Lines changed: 0 additions & 13 deletions
This file was deleted.

tools/etcd-dump-metrics/README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# etcd-dump-metrics
2+
3+
`etcd-dump-metrics` provides metrics for the latest main branch, a given endpoint, or version.
4+
5+
## Installation
6+
7+
Install the tool by running the following command from the etcd source directory.
8+
9+
```
10+
$ go install -v ./tools/etcd-dump-metrics
11+
```
12+
13+
The installation will place executables in the $GOPATH/bin. If $GOPATH environment variable is not set, the tool will be
14+
installed into the $HOME/go/bin. You can also find out the installed location by running the following command from the
15+
etcd source directory. Make sure that $PATH is set accordingly in your environment.
16+
17+
```
18+
$ go list -f "{{.Target}}" ./tools/etcd-dump-metrics
19+
```
20+
21+
Alternatively, instead of installing the tool, you can use it by simply running the following command from the etcd source
22+
directory.
23+
24+
```
25+
$ go run ./tools/etcd-dump-metrics
26+
```
27+
28+
## Usage
29+
30+
The following command should output the usage per the latest development.
31+
32+
```
33+
$ etcd-dump-metrics --help
34+
```
35+
36+
An example of usage detail is provided below.
37+
38+
### For the latest main branch
39+
```
40+
$ etcd-dump-metrics
41+
```
42+
43+
### For the provided endpoint
44+
```
45+
$ goreman start
46+
$ etcd-dump-metrics --addr http://localhost:2379/metrics
47+
```
48+
49+
### Download specific version to temporary directory to fetch metrics
50+
```
51+
$ etcd-dump-metrics --debug --download-ver v3.5.3
52+
$ etcd-dump-metrics --download-ver v3.5.3
53+
```

0 commit comments

Comments
 (0)