github.com/MetalBlockchain/metalgo@v1.11.9/vms/metervm/metrics.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package metervm
     5  
     6  import (
     7  	"github.com/prometheus/client_golang/prometheus"
     8  
     9  	"github.com/MetalBlockchain/metalgo/utils/metric"
    10  	"github.com/MetalBlockchain/metalgo/utils/wrappers"
    11  )
    12  
    13  func newAverager(name string, reg prometheus.Registerer, errs *wrappers.Errs) metric.Averager {
    14  	return metric.NewAveragerWithErrs(
    15  		name,
    16  		"time (in ns) of a "+name,
    17  		reg,
    18  		errs,
    19  	)
    20  }