mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-18 08:38:46 +00:00
less metrics performance impact
This commit is contained in:
parent
cdc090ebfd
commit
5ae602e9a4
@ -30,11 +30,6 @@ import (
|
||||
"github.com/ledgerwatch/turbo-geth/common/dbutils"
|
||||
"github.com/ledgerwatch/turbo-geth/common/debug"
|
||||
"github.com/ledgerwatch/turbo-geth/log"
|
||||
"github.com/ledgerwatch/turbo-geth/metrics"
|
||||
)
|
||||
|
||||
var (
|
||||
dbGetTimer = metrics.NewRegisteredTimer("db/get", nil)
|
||||
)
|
||||
|
||||
type DbCopier interface {
|
||||
|
@ -113,9 +113,9 @@ func (m *TxDb) Last(bucket string) ([]byte, []byte, error) {
|
||||
}
|
||||
|
||||
func (m *TxDb) Get(bucket string, key []byte) ([]byte, error) {
|
||||
if metrics.Enabled {
|
||||
defer dbGetTimer.UpdateSince(time.Now())
|
||||
}
|
||||
//if metrics.Enabled {
|
||||
// defer dbGetTimer.UpdateSince(time.Now())
|
||||
//}
|
||||
|
||||
_, v, err := m.cursor(bucket).SeekExact(key)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user