You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.1 KiB

  1. # tm-bench
  2. **Deprecation Warning**: please use [tm-load-test](https://github.com/interchainio/tm-load-test)
  3. Tendermint blockchain benchmarking tool:
  4. - [https://github.com/tendermint/tendermint/tree/master/tools/tm-bench](https://github.com/tendermint/tendermint/tree/master/tools/tm-bench)
  5. For example, the following:
  6. ```
  7. tm-bench -T 10 -r 1000 localhost:26657
  8. ```
  9. will output:
  10. ```
  11. Stats Avg StdDev Max Total
  12. Txs/sec 818 532 1549 9000
  13. Blocks/sec 0.818 0.386 1 9
  14. ```
  15. ## Quick Start
  16. [Install Tendermint](../introduction/install.md)
  17. This currently is setup to work on tendermint's develop branch. Please ensure
  18. you are on that. (If not, update `tendermint` and `tmlibs` in gopkg.toml to use
  19. the master branch.)
  20. then run:
  21. ```
  22. tendermint init
  23. tendermint node --proxy_app=kvstore
  24. ```
  25. ```
  26. tm-bench localhost:26657
  27. ```
  28. with the last command being in a seperate window.
  29. ## Usage
  30. ```
  31. tm-bench [-c 1] [-T 10] [-r 1000] [-s 250] [endpoints]
  32. Examples:
  33. tm-bench localhost:26657
  34. Flags:
  35. -T int
  36. Exit after the specified amount of time in seconds (default 10)
  37. -c int
  38. Connections to keep open per endpoint (default 1)
  39. -r int
  40. Txs per second to send in a connection (default 1000)
  41. -s int
  42. Size per tx in bytes
  43. -v Verbose output
  44. ```
  45. ## How stats are collected
  46. These stats are derived by having each connection send transactions at the
  47. specified rate (or as close as it can get) for the specified time. After the
  48. specified time, it iterates over all of the blocks that were created in that
  49. time. The average and stddev per second are computed based off of that, by
  50. grouping the data by second.
  51. To send transactions at the specified rate in each connection, we loop
  52. through the number of transactions. If its too slow, the loop stops at one second.
  53. If its too fast, we wait until the one second mark ends. The transactions per
  54. second stat is computed based off of what ends up in the block.
  55. Each of the connections is handled via two separate goroutines.
  56. ## Development
  57. ```
  58. make test
  59. ```