Fix cal_tps.sh

pull/1145/head
Rongjian Lan 6 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 { switch status {
case CanonStatTy: 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))) "txs", len(block.Transactions()), "gas", block.GasUsed(), "elapsed", common.PrettyDuration(time.Since(bstart)))
coalescedLogs = append(coalescedLogs, logs...) coalescedLogs = append(coalescedLogs, logs...)

@ -61,7 +61,7 @@ done
FILES=$(cat $VALIDATORS) FILES=$(cat $VALIDATORS)
for i in $FILES; do for i in $FILES; do
peer=`echo $i | cut -f 5 -d - | cut -f 1 -d .` 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 echo "peerID": $peer, "numOfConsensus": $num
done done

Loading…
Cancel
Save