Fix cal_tps.sh

pull/1145/head
Rongjian Lan 5 years ago
parent 777d0ea1fb
commit d91a4f371b
  1. 2
      core/blockchain.go
  2. 2
      test/cal_tps.sh

@ -1229,7 +1229,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks) (int, []interface{}, []*ty
}
switch status {
case CanonStatTy:
log.Debug("Inserted new block", "number", block.Number(), "hash", block.Hash(), "uncles", len(block.Uncles()),
log.Info("Inserted new block", "number", block.Number(), "hash", block.Hash(), "uncles", len(block.Uncles()),
"txs", len(block.Transactions()), "gas", block.GasUsed(), "elapsed", common.PrettyDuration(time.Since(bstart)))
coalescedLogs = append(coalescedLogs, logs...)

@ -61,7 +61,7 @@ done
FILES=$(cat $VALIDATORS)
for i in $FILES; do
peer=`echo $i | cut -f 5 -d - | cut -f 1 -d .`
num=`grep "HOORAY" $i | tail -n 1 | cut -f 6 -d , | grep -Eo [0-9]+`
num=`grep "Inserted new block" $i | tail -n 1 | cut -f 6 -d , | grep -Eo [0-9]+`
echo "peerID": $peer, "numOfConsensus": $num
done

Loading…
Cancel
Save