Discard initial very long OnVerifyPost from analisys
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
5d9c6cd02c
commit
da4bc44032
@ -409,6 +409,12 @@ func tallyGasCharges(charges map[string]*stats, et types.ExecutionTrace) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
tt := float64(gc.TimeTaken.Nanoseconds())
|
tt := float64(gc.TimeTaken.Nanoseconds())
|
||||||
|
if name == "OnVerifyPost" && tt > 2e9 {
|
||||||
|
// discard initial very long OnVerifyPost
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
eType, eSize := getExtras(gc.Extra)
|
||||||
|
|
||||||
if name == "OnIpldGet" {
|
if name == "OnIpldGet" {
|
||||||
next := &types.GasTrace{}
|
next := &types.GasTrace{}
|
||||||
if i+1 < len(et.GasCharges) {
|
if i+1 < len(et.GasCharges) {
|
||||||
@ -416,14 +422,18 @@ func tallyGasCharges(charges map[string]*stats, et types.ExecutionTrace) {
|
|||||||
}
|
}
|
||||||
if next.Name != "OnIpldGetEnd" {
|
if next.Name != "OnIpldGetEnd" {
|
||||||
log.Warn("OnIpldGet without OnIpldGetEnd")
|
log.Warn("OnIpldGet without OnIpldGetEnd")
|
||||||
|
} else {
|
||||||
|
_, size := getExtras(next.Extra)
|
||||||
|
eSize = size
|
||||||
}
|
}
|
||||||
tt += float64(next.TimeTaken.Nanoseconds())
|
|
||||||
}
|
}
|
||||||
eType, eSize := getExtras(gc.Extra)
|
|
||||||
if eType != nil {
|
if eType != nil {
|
||||||
name += "-" + *eType
|
name += "-" + *eType
|
||||||
}
|
}
|
||||||
compGas := gc.VirtualComputeGas
|
compGas := gc.ComputeGas
|
||||||
|
if compGas == 0 {
|
||||||
|
compGas = gc.VirtualComputeGas
|
||||||
|
}
|
||||||
if compGas == 0 {
|
if compGas == 0 {
|
||||||
compGas = 1
|
compGas = 1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user