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.

144 lines
3.3 KiB

  1. Benchmarking and Monitoring
  2. ===========================
  3. tm-bench
  4. --------
  5. Tendermint blockchain benchmarking tool: https://github.com/tendermint/tools/tree/master/tm-bench
  6. For example, the following:
  7. ::
  8. tm-bench -T 10 -r 1000 localhost:46657
  9. will output:
  10. ::
  11. Stats Avg Stdev Max
  12. Block latency 6.18ms 3.19ms 14ms
  13. Blocks/sec 0.828 0.378 1
  14. Txs/sec 963 493 1811
  15. Quick Start
  16. ^^^^^^^^^^^
  17. Docker
  18. ~~~~~~
  19. ::
  20. docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint:0.12.1 init
  21. docker run -it --rm -v "/tmp:/tendermint" -p "46657:46657" --name=tm tendermint/tendermint:0.12.1
  22. docker run -it --rm --link=tm tendermint/bench tm:46657
  23. Binaries
  24. ~~~~~~~~
  25. If **Linux**, start with:
  26. ::
  27. curl -L https://s3-us-west-2.amazonaws.com/tendermint/0.12.1/tendermint_linux_amd64.zip && sudo unzip -d /usr/local/bin tendermint_linux_amd64.zip && sudo chmod +x tendermint
  28. if **Mac OS**, start with:
  29. ::
  30. curl -L https://s3-us-west-2.amazonaws.com/tendermint/0.12.1/tendermint_darwin_amd64.zip && sudo unzip -d /usr/local/bin tendermint_darwin_amd64.zip && sudo chmod +x tendermint
  31. then run:
  32. ::
  33. tendermint init
  34. tendermint node --app_proxy=dummy
  35. tm-bench localhost:46657
  36. with the last command being in a seperate window.
  37. Usage
  38. ^^^^^
  39. ::
  40. tm-bench [-c 1] [-T 10] [-r 1000] [endpoints]
  41. Examples:
  42. tm-bench localhost:46657
  43. Flags:
  44. -T int
  45. Exit after the specified amount of time in seconds (default 10)
  46. -c int
  47. Connections to keep open per endpoint (default 1)
  48. -r int
  49. Txs per second to send in a connection (default 1000)
  50. -v Verbose output
  51. tm-monitor
  52. ----------
  53. Tendermint blockchain monitoring tool; watches over one or more nodes, collecting and providing various statistics to the user: https://github.com/tendermint/tools/tree/master/tm-monitor
  54. Quick Start
  55. ^^^^^^^^^^^
  56. Docker
  57. ~~~~~~
  58. ::
  59. docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init
  60. docker run -it --rm -v "/tmp:/tendermint" -p "46657:46657" --name=tm tendermint/tendermint
  61. docker run -it --rm --link=tm tendermint/monitor tm:46657
  62. Binaries
  63. ~~~~~~~~
  64. This will be the same as you did for ``tm-bench`` above, except for the last line which should be:
  65. ::
  66. tm-monitor localhost:46657
  67. Usage
  68. ^^^^^
  69. ::
  70. tm-monitor [-v] [-no-ton] [-listen-addr="tcp://0.0.0.0:46670"] [endpoints]
  71. Examples:
  72. # monitor single instance
  73. tm-monitor localhost:46657
  74. # monitor a few instances by providing comma-separated list of RPC endpoints
  75. tm-monitor host1:46657,host2:46657
  76. Flags:
  77. -listen-addr string
  78. HTTP and Websocket server listen address (default "tcp://0.0.0.0:46670")
  79. -no-ton
  80. Do not show ton (table of nodes)
  81. -v verbose logging
  82. RPC UI
  83. ^^^^^^
  84. Run ``tm-monitor`` and visit http://localhost:46670
  85. You should see the list of the available RPC endpoints:
  86. ::
  87. http://localhost:46670/status
  88. http://localhost:46670/status/network
  89. http://localhost:46670/monitor?endpoint=_
  90. http://localhost:46670/status/node?name=_
  91. http://localhost:46670/unmonitor?endpoint=_
  92. The API is available as GET requests with URI encoded parameters, or as JSONRPC
  93. POST requests. The JSONRPC methods are also exposed over websocket.