Conversation
Continues addressing cosmos/cosmos-sdk#2169.
mempool/metrics.go
Outdated
| Subsystem: MetricsSubsytem, | ||
| Name: "tx_size_bytes", | ||
| Help: "Transaction sizes in bytes.", | ||
| Buckets: stdprometheus.ExponentialBuckets(1, 2, 10), |
There was a problem hiding this comment.
what's the last bucket - 1024 bytes? some of our users have 100KB transactions. the max size for a transaction right now is 21MB (block size)
There was a problem hiding this comment.
Was unaware of what the best buckets would be, so I made a guess based on my knowledge of Bitcoin.
mempool/metrics.go
Outdated
| // Histogram of transaction sizes, in bytes. | ||
| TxSizeBytes metrics.Histogram | ||
| // Number of failed transactions. | ||
| FailedTxs metrics.Gauge |
There was a problem hiding this comment.
why gauge if it's only growing?
state/metrics.go
Outdated
| Namespace: namespace, | ||
| Subsystem: MetricsSubsystem, | ||
| Name: "block_processing_time", | ||
| Help: "Time between BeginBlock and EndBlock.", |
Codecov Report
@@ Coverage Diff @@
## develop #2500 +/- ##
==========================================
Coverage ? 61.19%
==========================================
Files ? 198
Lines ? 16556
Branches ? 0
==========================================
Hits ? 10131
Misses ? 5565
Partials ? 860
|
|
We also need to update the docs! https://tendermint.com/docs/tendermint-core/metrics.html#list-of-available-metrics |
|
@melekes docs should be good to go :) |
xla
left a comment
There was a problem hiding this comment.
Thanks for the follow-up and introduction of even more metrics, this is ace!
Some style nits to be addressed.
consensus/reactor.go
Outdated
| if numVotes := ps.RecordVote(); numVotes%votesToContributeToBecomeGoodPeer == 0 { | ||
| conR.Switch.MarkPeerAsGood(peer) | ||
| } | ||
| } |
There was a problem hiding this comment.
This reformatting seems incorrect.
consensus/reactor.go
Outdated
| conR.Switch.MarkPeerAsGood(peer) | ||
| } | ||
| } | ||
| } |
docs/tendermint-core/metrics.md
Outdated
| mempool\_tx\_size\_bytes |histogram |on dev| |transaction sizes in bytes | ||
| mempool\_failed\_txs |counter|on dev| |number of failed transactions | ||
| mempool\_recheck\_times |counter|on dev| |number of transactions rechecked in the mempool | ||
| state\_block\_processing\_time|histogram|on dev| |time between BeginBlock and EndBlock in ms |
There was a problem hiding this comment.
This reformatting makes it harder to read the content. Let's revert.
state/execution.go
Outdated
| // It returns the application root hash (result of abci.Commit). | ||
| func ExecCommitBlock(appConnConsensus proxy.AppConnConsensus, block *types.Block, | ||
| logger log.Logger, lastValSet *types.ValidatorSet, stateDB dbm.DB) ([]byte, error) { | ||
| logger log.Logger, lastValSet *types.ValidatorSet, stateDB dbm.DB) ([]byte, error) { |
There was a problem hiding this comment.
If we reformat this than one param per line wtih trailing comma and newline after the last param.
state/execution.go
Outdated
| // updateState returns a new State updated according to the header and responses. | ||
| func updateState(state State, blockID types.BlockID, header *types.Header, | ||
| abciResponses *ABCIResponses) (State, error) { | ||
| abciResponses *ABCIResponses) (State, error) { |
There was a problem hiding this comment.
If we reformat this than one param per line wtih trailing comma and newline after the last param.
state/execution.go
Outdated
| // Returns a list of transaction results and updates to the validator set | ||
| func execBlockOnProxyApp(logger log.Logger, proxyAppConn proxy.AppConnConsensus, | ||
| block *types.Block, lastValSet *types.ValidatorSet, stateDB dbm.DB) (*ABCIResponses, error) { | ||
| block *types.Block, lastValSet *types.ValidatorSet, stateDB dbm.DB) (*ABCIResponses, error) { |
There was a problem hiding this comment.
If we reformat this than one param per line wtih trailing comma and newline after the last param.
node/node.go
Outdated
| blockExecLogger := logger.With("module", "state") | ||
| // make block executor for consensus and blockchain reactors to execute blocks | ||
| blockExec := sm.NewBlockExecutor(stateDB, blockExecLogger, proxyApp.Consensus(), mempool, evidencePool) | ||
| blockExec := sm.NewBlockExecutor(stateDB, blockExecLogger, proxyApp.Consensus(), mempool, evidencePool, sm.BlockExecutorWithMetrics(smMetrics)) |
There was a problem hiding this comment.
This line should be broken up, it grew quit big.
|
I think these comments are addressed @xla! Looks like this is ready to merge. |
xla
left a comment
There was a problem hiding this comment.
👍
🍡
Thanks for addressing the style concerns.
Continues addressing cosmos/cosmos-sdk#2169.