MCPcopy Create free account
hub / github.com/prometheus/client_golang / decreaseCounter

Function decreaseCounter

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

Source from the content-addressed store, hash-verified

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

Callers 1

TestCounterAddFunction · 0.85

Calls 1

AddMethod · 0.65

Tested by

no test coverage detected