Skip to content

Improved tm-monitor formatting#4023

Merged
melekes merged 4 commits intotendermint:masterfrom
erikgrinaker:tm-monitor-formatting
Sep 30, 2019
Merged

Improved tm-monitor formatting#4023
melekes merged 4 commits intotendermint:masterfrom
erikgrinaker:tm-monitor-formatting

Conversation

@erikgrinaker
Copy link
Contributor

@erikgrinaker erikgrinaker commented Sep 29, 2019

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGELOG_PENDING.md

Improves tm-monitor formatting of start time (RFC1123 without unnecessary precision) and avg tx throughput (three decimal places). The old tx throughput display was confusing during local testing where the tx rate is low and displayed as 0.

Also updates the monitor health whenever the validator number changes. It otherwise starts with moderate health and fails to update this once it discovers the validators, leading to incorrect health reporting and invalid uptime statistics. Let me know if you would like me to submit this as a separate PR.

Before:

2019-09-29 20:40:00.992834 +0200 CEST m=+0.024057059 up -92030989600.42%

Height: 2518
Avg block time: 1275.496 ms
Avg tx throughput: 0 per sec
Avg block latency: 2.464 ms
Active nodes: 4/4 (health: moderate) Validators: 4

NAME                HEIGHT     BLOCK LATENCY     ONLINE     VALIDATOR     
localhost:26657     2518       0.935 ms          true       true          
localhost:26660     2518       0.710 ms          true       true          
localhost:26662     2518       0.708 ms          true       true          
localhost:26664     2518       0.717 ms          true       true          

After:

Sun, 29 Sep 2019 20:21:59 +0200 up 100.00%

Height: 2480
Avg block time: 1361.445 ms
Avg tx throughput: 0.735 per sec
Avg block latency: 4.232 ms
Active nodes: 4/4 (health: full) Validators: 4

NAME                HEIGHT     BLOCK LATENCY     ONLINE     VALIDATOR     
localhost:26657     2480       1.174 ms          true       true          
localhost:26660     2480       1.037 ms          true       true          
localhost:26662     2480       0.981 ms          true       true          
localhost:26664     2480       0.995 ms          true       true          

@erikgrinaker erikgrinaker changed the title Improved tm-monitor formatting Improved tm-monitor formatting Sep 29, 2019
@codecov-io
Copy link

Codecov Report

Merging #4023 into master will decrease coverage by 0.05%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #4023      +/-   ##
==========================================
- Coverage   67.17%   67.11%   -0.06%     
==========================================
  Files         245      245              
  Lines       20573    20574       +1     
==========================================
- Hits        13820    13809      -11     
- Misses       5718     5732      +14     
+ Partials     1035     1033       -2
Impacted Files Coverage Δ
tools/tm-monitor/monitor/network.go 92.63% <100%> (+2.2%) ⬆️
blockchain/v2/reactor.go 54.38% <0%> (-15.79%) ⬇️
blockchain/v2/routine.go 81.81% <0%> (-6.07%) ⬇️
blockchain/v0/reactor.go 77.83% <0%> (-0.95%) ⬇️
blockchain/v0/pool.go 80% <0%> (-0.66%) ⬇️
consensus/state.go 78.96% <0%> (-0.36%) ⬇️
consensus/reactor.go 78.54% <0%> (-0.24%) ⬇️
consensus/replay.go 71.77% <0%> (+0.8%) ⬆️
privval/signer_endpoint.go 84% <0%> (+2.66%) ⬆️
... and 2 more

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ 💚 💙

@melekes melekes merged commit ac099aa into tendermint:master Sep 30, 2019
@erikgrinaker erikgrinaker deleted the tm-monitor-formatting branch September 30, 2019 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants