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.

159 lines
3.5 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. Development
  52. ^^^^^^^^^^^
  53. ::
  54. make get_vendor_deps
  55. make test
  56. tm-monitor
  57. ----------
  58. 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
  59. Quick Start
  60. ^^^^^^^^^^^
  61. Docker
  62. ~~~~~~
  63. ::
  64. docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init
  65. docker run -it --rm -v "/tmp:/tendermint" -p "46657:46657" --name=tm tendermint/tendermint
  66. docker run -it --rm --link=tm tendermint/monitor tm:46657
  67. Binaries
  68. ~~~~~~~~
  69. This will be the same as you did for ``tm-bench`` above, except for the last line which should be:
  70. ::
  71. tm-monitor localhost:46657
  72. Usage
  73. ^^^^^
  74. ::
  75. tm-monitor [-v] [-no-ton] [-listen-addr="tcp://0.0.0.0:46670"] [endpoints]
  76. Examples:
  77. # monitor single instance
  78. tm-monitor localhost:46657
  79. # monitor a few instances by providing comma-separated list of RPC endpoints
  80. tm-monitor host1:46657,host2:46657
  81. Flags:
  82. -listen-addr string
  83. HTTP and Websocket server listen address (default "tcp://0.0.0.0:46670")
  84. -no-ton
  85. Do not show ton (table of nodes)
  86. -v verbose logging
  87. RPC UI
  88. ^^^^^^
  89. Run ``tm-monitor`` and visit http://localhost:46670
  90. You should see the list of the available RPC endpoints:
  91. ::
  92. http://localhost:46670/status
  93. http://localhost:46670/status/network
  94. http://localhost:46670/monitor?endpoint=_
  95. http://localhost:46670/status/node?name=_
  96. http://localhost:46670/unmonitor?endpoint=_
  97. The API is available as GET requests with URI encoded parameters, or as JSONRPC
  98. POST requests. The JSONRPC methods are also exposed over websocket.
  99. Development
  100. ^^^^^^^^^^^
  101. ::
  102. make get_vendor_deps
  103. make test