Browse Source

docs: md fixes & latest tm-bench/monitor

pull/1922/head
Zach Ramsay 6 years ago
parent
commit
bef04114ef
3 changed files with 99 additions and 120 deletions
  1. +54
    -23
      docs/tools/benchmarking.md
  2. +0
    -67
      docs/tools/docker.md
  3. +45
    -30
      docs/tools/monitoring.md

+ 54
- 23
docs/tools/benchmarking.md View File

@ -6,44 +6,75 @@ Tendermint blockchain benchmarking tool:
For example, the following:
tm-bench -T 10 -r 1000 localhost:26657
```
tm-bench -T 10 -r 1000 localhost:26657
```
will output:
Stats Avg Stdev Max
Block latency 6.18ms 3.19ms 14ms
Blocks/sec 0.828 0.378 1
Txs/sec 963 493 1811
```
Stats Avg StdDev Max Total
Txs/sec 818 532 1549 9000
Blocks/sec 0.818 0.386 1 9
```
## Quick Start
[Install Tendermint](https://github.com/tendermint/tendermint#install)
[Install Tendermint](../introduction/install)
This currently is setup to work on tendermint's develop branch. Please ensure
you are on that. (If not, update `tendermint` and `tmlibs` in gopkg.toml to use
the master branch.)
then run:
tendermint init
tendermint node --proxy_app=kvstore
```
tendermint init
tendermint node --proxy_app=kvstore
```
tm-bench localhost:26657
```
tm-bench localhost:26657
```
with the last command being in a seperate window.
## Usage
tm-bench [-c 1] [-T 10] [-r 1000] [endpoints]
Examples:
tm-bench localhost:26657
Flags:
-T int
Exit after the specified amount of time in seconds (default 10)
-c int
Connections to keep open per endpoint (default 1)
-r int
Txs per second to send in a connection (default 1000)
-v Verbose output
```
tm-bench [-c 1] [-T 10] [-r 1000] [-s 250] [endpoints]
Examples:
tm-bench localhost:26657
Flags:
-T int
Exit after the specified amount of time in seconds (default 10)
-c int
Connections to keep open per endpoint (default 1)
-r int
Txs per second to send in a connection (default 1000)
-s int
Size per tx in bytes
-v Verbose output
```
## How stats are collected
These stats are derived by having each connection send transactions at the
specified rate (or as close as it can get) for the specified time. After the
specified time, it iterates over all of the blocks that were created in that
time. The average and stddev per second are computed based off of that, by
grouping the data by second.
To send transactions at the specified rate in each connection, we loop
through the number of transactions. If its too slow, the loop stops at one second.
If its too fast, we wait until the one second mark ends. The transactions per
second stat is computed based off of what ends up in the block.
Each of the connections is handled via two separate goroutines.
## Development
make get_vendor_deps
make test
```
make get_vendor_deps
make test
```

+ 0
- 67
docs/tools/docker.md View File

@ -1,67 +0,0 @@
# Docker
## Supported tags and respective `Dockerfile` links
- `0.17.1`, `latest` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/208ac32fa266657bd6c304e84ec828aa252bb0b8/DOCKER/Dockerfile)
- `0.15.0` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/170777300ea92dc21a8aec1abc16cb51812513a4/DOCKER/Dockerfile)
- `0.13.0` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/a28b3fff49dce2fb31f90abb2fc693834e0029c2/DOCKER/Dockerfile)
- `0.12.1` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/457c688346b565e90735431619ca3ca597ef9007/DOCKER/Dockerfile)
- `0.12.0` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/70d8afa6e952e24c573ece345560a5971bf2cc0e/DOCKER/Dockerfile)
- `0.11.0` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/9177cc1f64ca88a4a0243c5d1773d10fba67e201/DOCKER/Dockerfile)
- `0.10.0` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/e5342f4054ab784b2cd6150e14f01053d7c8deb2/DOCKER/Dockerfile)
- `0.9.1`, `0.9`, [(Dockerfile)](https://github.com/tendermint/tendermint/blob/809e0e8c5933604ba8b2d096803ada7c5ec4dfd3/DOCKER/Dockerfile)
- `0.9.0` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/d474baeeea6c22b289e7402449572f7c89ee21da/DOCKER/Dockerfile)
- `0.8.0`, `0.8` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/bf64dd21fdb193e54d8addaaaa2ecf7ac371de8c/DOCKER/Dockerfile)
- `develop` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/master/DOCKER/Dockerfile.develop)
`develop` tag points to the [develop](https://github.com/tendermint/tendermint/tree/develop) branch.
## Quick reference
- **Where to get help:**
https://cosmos.network/community
- **Where to file issues:**
https://github.com/tendermint/tendermint/issues
- **Supported Docker versions:**
[the latest release](https://github.com/moby/moby/releases) (down to 1.6 on a best-effort basis)
## Tendermint
Tendermint Core is Byzantine Fault Tolerant (BFT) middleware that takes a state transition machine, written in any programming language, and securely replicates it on many machines.
For more background, see the [introduction](https://tendermint.readthedocs.io/en/master/introduction.html).
To get started developing applications, see the [application developers guide](https://tendermint.readthedocs.io/en/master/getting-started.html).
## How to use this image
### Start one instance of the Tendermint core with the `kvstore` app
A quick example of a built-in app and Tendermint core in one container.
```
docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init
docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint node --proxy_app=kvstore
```
## Local cluster
To run a 4-node network, see the `Makefile` in the root of [the repo](https://github.com/tendermint/tendermint/master/Makefile) and run:
```
make build-linux
make build-docker-localnode
make localnet-start
```
Note that this will build and use a different image than the ones provided here.
## License
- Tendermint's license is [Apache 2.0](https://github.com/tendermint/tendermint/master/LICENSE).
## Contributing
Contributions are most welcome! See the [contributing file](https://github.com/tendermint/tendermint/blob/master/CONTRIBUTING.md) for more information.

+ 45
- 30
docs/tools/monitoring.md View File

@ -12,18 +12,23 @@ collecting and providing various statistics to the user:
Assuming your application is running in another container with the name
`app`:
docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init
docker run -it --rm -v "/tmp:/tendermint" -p "26657:26657" --name=tm --link=app tendermint/tendermint node --proxy_app=tcp://app:26658
```
docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init
docker run -it --rm -v "/tmp:/tendermint" -p "26657:26657" --name=tm --link=app tendermint/tendermint node --proxy_app=tcp://app:26658
docker run -it --rm -p "26670:26670" --link=tm tendermint/monitor tm:26657
docker run -it --rm -p "26670:26670" --link=tm tendermint/monitor tm:26657
```
If you don't have an application yet, but still want to try monitor out,
use `kvstore`:
docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init
docker run -it --rm -v "/tmp:/tendermint" -p "26657:26657" --name=tm tendermint/tendermint node --proxy_app=kvstore
docker run -it --rm -p "26670:26670" --link=tm tendermint/monitor tm:26657
```
docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init
docker run -it --rm -v "/tmp:/tendermint" -p "26657:26657" --name=tm tendermint/tendermint node --proxy_app=kvstore
```
```
docker run -it --rm -p "26670:26670" --link=tm tendermint/monitor tm:26657
```
### Using Binaries
@ -31,40 +36,48 @@ use `kvstore`:
then run:
tendermint init
tendermint node --proxy_app=kvstore
```
tendermint init
tendermint node --proxy_app=kvstore
```
tm-monitor localhost:26657
```
tm-monitor localhost:26657
```
with the last command being in a seperate window.
## Usage
tm-monitor [-v] [-no-ton] [-listen-addr="tcp://0.0.0.0:26670"] [endpoints]
```
tm-monitor [-v] [-no-ton] [-listen-addr="tcp://0.0.0.0:26670"] [endpoints]
Examples:
# monitor single instance
tm-monitor localhost:26657
Examples:
# monitor single instance
tm-monitor localhost:26657
# monitor a few instances by providing comma-separated list of RPC endpoints
tm-monitor host1:26657,host2:26657
Flags:
-listen-addr string
HTTP and Websocket server listen address (default "tcp://0.0.0.0:26670")
-no-ton
Do not show ton (table of nodes)
-v verbose logging
# monitor a few instances by providing comma-separated list of RPC endpoints
tm-monitor host1:26657,host2:26657
Flags:
-listen-addr string
HTTP and Websocket server listen address (default "tcp://0.0.0.0:26670")
-no-ton
Do not show ton (table of nodes)
-v verbose logging
```
### RPC UI
Run `tm-monitor` and visit http://localhost:26670 You should see the
list of the available RPC endpoints:
http://localhost:26670/status
http://localhost:26670/status/network
http://localhost:26670/monitor?endpoint=_
http://localhost:26670/status/node?name=_
http://localhost:26670/unmonitor?endpoint=_
```
http://localhost:26670/status
http://localhost:26670/status/network
http://localhost:26670/monitor?endpoint=_
http://localhost:26670/status/node?name=_
http://localhost:26670/unmonitor?endpoint=_
```
The API is available as GET requests with URI encoded parameters, or as
JSONRPC POST requests. The JSONRPC methods are also exposed over
@ -72,6 +85,8 @@ websocket.
## Development
make get_tools
make get_vendor_deps
make test
```
make get_tools
make get_vendor_deps
make test
```

Loading…
Cancel
Save