added blockLatency.

pull/69/head
Richard Liu 6 years ago
parent 32d7047512
commit fa1fdecfbd
  1. 1
      consensus/consensus_leader.go

@ -425,6 +425,7 @@ func (consensus *Consensus) reportMetrics(block blockchain.Block) {
"nodeCount": {strconv.Itoa(len(consensus.validators) + 1)},
"latestBlockHash": {hex.EncodeToString(consensus.blockHash[:])},
"latestTxHash": {hex.EncodeToString(block.TransactionIds[len(block.TransactionIds)-1][:])},
"blockLatency": {strconv.Itoa(int(timeElapsed / time.Millisecond))},
}
body := bytes.NewBufferString(form.Encode())

Loading…
Cancel
Save