github.com/vipernet-xyz/tm@v0.34.24/test/loadtime/README.md (about) 1 # loadtime 2 3 This directory contains the `loadtime` tools, a set of tools for generating 4 transaction load against Tendermint and measuring their resulting latency. 5 `loadtime` generates transactions that contain the timestamp of when they were 6 generated as well as additional metadata to track the variables used when 7 generating the load. 8 9 10 ## Building the tool set 11 12 The `Makefile` contains a target for building the `loadtime` tools. 13 14 The following command will build the tool and place the resulting binaries in `./build/`. 15 16 ```bash 17 make build 18 ``` 19 20 ## `load` 21 22 The `load` binary is built when `make build` is invoked. The `load` tool generates 23 transactions and broadcasts them to Tendermint. 24 25 `load` leverages the [tm-load-test](https://github.com/informalsystems/tm-load-test) 26 framework. As a result, all flags and options specified on the `tm-load-test` apply to 27 `load`. 28 29 Below is a basic invocation for generating load against a Tendermint websocket running 30 on `localhost:25567` 31 32 ```bash 33 ./build/load \ 34 -c 1 -T 10 -r 1000 -s 1024 \ 35 --broadcast-tx-method sync \ 36 --endpoints ws://localhost:26657/websocket 37 ``` 38 39 ## `report` 40 41 The `report` binary is built when `make build` is invoked. The `report` tool 42 reads all of the blocks from the specified blockstore database and calculates 43 transaction latency metrics. `report` reads transactions generated by `load` 44 and uses the difference between the timestamp contained in the transaction and 45 the timestamp of the block the transaction was executed in to determine transaction latency. 46 `report` outputs a set of metrics calculated on the list of latencies, including 47 minimum, maximum, and average latency as well as the standard deviation. 48 49 Below is a basic invocation of the report tool with a data directory under `/home/test/.tendermint/data/` 50 where the data was saved in a `goleveldb` database. 51 52 53 ```bash 54 ./build/report --database-type goleveldb --data-dir ~/.tendermint/data 55 ``` 56 57 The `report` tool also supports outputting the raw data as `csv`. This can be 58 useful if you want to use a more powerful tool to aggregate and analyze the data. 59 60 Below is an invocation of the report tool that outputs the data to a `csv` file 61 in `out.csv` 62 63 ```bash 64 ./build/report --database-type goleveldb --data-dir ~/.tendermint/data --csv out.csv 65 ``` 66 67 The `report` tool outputs the data for each experiment separately, identified 68 by the UUID generated by the `load` tool at the start of the experiment. It also 69 outputs the experimental values used for the run.