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.

69 lines
2.0 KiB

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