MCPcopy
hub / github.com/prometheus/client_golang / decreaseCounter

Function decreaseCounter

prometheus/counter_test.go:81–89  ·  view source on GitHub ↗
(c *counter)

Source from the content-addressed store, hash-verified

79}
80
81func decreaseCounter(c *counter) (err error) {
82 defer func() {
83 if e := recover(); e != nil {
84 err = e.(error)
85 }
86 }()
87 c.Add(-1)
88 return nil
89}
90
91func TestCounterVecGetMetricWithInvalidLabelValues(t *testing.T) {
92 testCases := []struct {

Callers 1

TestCounterAddFunction · 0.85

Calls 1

AddMethod · 0.65

Tested by

no test coverage detected