mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-29 20:51:45 +00:00
[bench] fix type errors
This commit is contained in:
@ -84,11 +84,12 @@ Examples:
|
|||||||
BlockLatency: metrics.NewHistogram(metrics.NewUniformSample(1000)),
|
BlockLatency: metrics.NewHistogram(metrics.NewUniformSample(1000)),
|
||||||
}
|
}
|
||||||
|
|
||||||
lastBlockHeight := -1
|
lastBlockHeight := int64(-1)
|
||||||
|
|
||||||
durationTimer := time.After(time.Duration(duration) * time.Second)
|
durationTimer := time.After(time.Duration(duration) * time.Second)
|
||||||
ticker := time.NewTicker(1 * time.Second)
|
ticker := time.NewTicker(1 * time.Second)
|
||||||
var blocks, txs int
|
var blocks int
|
||||||
|
var txs int64
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case b := <-blockCh:
|
case b := <-blockCh:
|
||||||
@ -101,7 +102,7 @@ Examples:
|
|||||||
stats.BlockLatency.Update(int64(l))
|
stats.BlockLatency.Update(int64(l))
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
stats.BlockTimeSample.Update(int64(blocks))
|
stats.BlockTimeSample.Update(int64(blocks))
|
||||||
stats.TxThroughputSample.Update(int64(txs))
|
stats.TxThroughputSample.Update(txs)
|
||||||
blocks = 0
|
blocks = 0
|
||||||
txs = 0
|
txs = 0
|
||||||
case <-durationTimer:
|
case <-durationTimer:
|
||||||
|
Reference in New Issue
Block a user