mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
core: changes mgasps to a speed rating
Speed is relative to the maximum speed of the blockchain in gas: 1 speed = 8Mgas/block * 1 block/13s ~= .615 Mgas This speed provides an easy way to understand how fast blocks are being processed.
This commit is contained in:
parent
2a113f6d72
commit
51a6100156
1 changed files with 2 additions and 1 deletions
|
|
@ -55,9 +55,10 @@ func (st *insertStats) report(chain []*types.Block, index int, cache common.Stor
|
|||
end := chain[index]
|
||||
|
||||
// Assemble the log context and send it to the logger
|
||||
sp := float64(st.usedGas) * 1000 / float64(elapsed) * 13 / 8 // ~13s/blk / max 8Mgas/blk = blk/s @ max gas
|
||||
context := []interface{}{
|
||||
"blocks", st.processed, "txs", txs, "mgas", float64(st.usedGas) / 1000000,
|
||||
"elapsed", common.PrettyDuration(elapsed), "mgasps", float64(st.usedGas) * 1000 / float64(elapsed),
|
||||
"elapsed", common.PrettyDuration(elapsed), "speed", sp,
|
||||
"number", end.Number(), "hash", end.Hash(),
|
||||
}
|
||||
if timestamp := time.Unix(end.Time().Int64(), 0); time.Since(timestamp) > time.Minute {
|
||||
|
|
|
|||
Loading…
Reference in a new issue