github.com/moby/docker@v26.1.3+incompatible/daemon/images/metrics.go (about)

     1  package images // import "github.com/docker/docker/daemon/images"
     2  
     3  import (
     4  	metrics "github.com/docker/go-metrics"
     5  )
     6  
     7  // ImagesActions measures the time it takes to process some image actions.
     8  // Exported for use in the containerd-backed image store and it is not intended
     9  // for external consumption. Do not use!
    10  var ImageActions metrics.LabeledTimer
    11  
    12  func init() {
    13  	ns := metrics.NewNamespace("engine", "daemon", nil)
    14  	ImageActions = ns.NewLabeledTimer("image_actions", "The number of seconds it takes to process each image action", "action")
    15  	// TODO: is it OK to register a namespace with the same name? Or does this
    16  	// need to be exported from somewhere?
    17  	metrics.Register(ns)
    18  }