github.com/MetalBlockchain/subnet-evm@v0.4.9/metrics/metrics.go (about)

     1  // Go port of Coda Hale's Metrics library
     2  //
     3  // <https://github.com/rcrowley/go-metrics>
     4  //
     5  // Coda Hale's original work: <https://github.com/codahale/metrics>
     6  package metrics
     7  
     8  // Enabled is checked by the constructor functions for all of the
     9  // standard metrics. If it is true, the metric returned is a stub.
    10  //
    11  // This global kill-switch helps quantify the observer effect and makes
    12  // for less cluttered pprof profiles.
    13  var Enabled = true
    14  
    15  // EnabledExpensive is a soft-flag meant for external packages to check if costly
    16  // metrics gathering is allowed or not. The goal is to separate standard metrics
    17  // for health monitoring and debug metrics that might impact runtime performance.
    18  var EnabledExpensive = false