report key.

pull/69/head
Richard Liu 6 years ago
parent c34f568056
commit 8d43e64a1f
  1. 2
      consensus/consensus.go
  2. 1
      consensus/consensus_leader.go

@ -199,5 +199,5 @@ func (consensus *Consensus) String() string {
duty = "VLD" // validator duty = "VLD" // validator
} }
return fmt.Sprintf("[duty:%s, priKey:%s, ShardID:%v, nodeId:%v, state:%s]", return fmt.Sprintf("[duty:%s, priKey:%s, ShardID:%v, nodeId:%v, state:%s]",
duty, fmt.Sprintf("%x", consensus.priKey), consensus.ShardID, consensus.nodeId, consensus.state) duty, consensus.priKey.String(), consensus.ShardID, consensus.nodeId, consensus.state)
} }

@ -426,6 +426,7 @@ func (consensus *Consensus) reportMetrics(block blockchain.Block) {
} }
} }
form := url.Values{ form := url.Values{
"key": {consensus.pubKey.String()},
"tps": {strconv.FormatFloat(tps, 'f', 2, 64)}, "tps": {strconv.FormatFloat(tps, 'f', 2, 64)},
"txCount": {strconv.Itoa(int(numOfTxs))}, "txCount": {strconv.Itoa(int(numOfTxs))},
"nodeCount": {strconv.Itoa(len(consensus.validators) + 1)}, "nodeCount": {strconv.Itoa(len(consensus.validators) + 1)},

Loading…
Cancel
Save