Documentation ¶
Index ¶
Constants ¶
View Source
const (
MetricsNamespace = "httpserver"
)
Variables ¶
This section is empty.
Functions ¶
func CreateExecutionTimeMetric ¶
func CreateExecutionTimeMetric(namespace string, help string) *prometheus.HistogramVec
CreateExecutionTimeMetric prepares a new histogram labeled with execution step
Types ¶
type ExecutionTimer ¶
type ExecutionTimer struct {
// contains filtered or unexported fields
}
ExecutionTimer measures execution time of a computation, split into major steps usual usage pattern is: timer := NewExecutionTimer(...) ; compute ; timer.ObserveStep() ; ... ; timer.ObserveTotal()
func NewExecutionTimer ¶
func NewExecutionTimer(histo *prometheus.HistogramVec) *ExecutionTimer
NewExecutionTimer provides a timer for admission latency; call ObserveXXX() on it to measure
func NewTimer ¶
func NewTimer() *ExecutionTimer
NewExecutionTimer provides a timer for Updater's RunOnce execution
func (*ExecutionTimer) ObserveTotal ¶
func (t *ExecutionTimer) ObserveTotal()
ObserveTotal measures the execution time from the creation of the ExecutionTimer
Click to show internal directories.
Click to hide internal directories.