MCPcopy Index your code
hub / github.com/prometheus/client_python / inc

Method inc

prometheus_client/metrics.py:444–449  ·  view source on GitHub ↗

Increment gauge by the given amount.

(self, amount: float = 1)

Source from the content-addressed store, hash-verified

442 )
443
444 def inc(self, amount: float = 1) -> None:
445 """Increment gauge by the given amount."""
446 if self._is_most_recent:
447 raise RuntimeError("inc must not be used with the mostrecent mode")
448 self._raise_if_not_observable()
449 self._value.inc(amount)
450
451 def dec(self, amount: float = 1) -> None:
452 """Decrement gauge by the given amount."""

Callers 15

test_nolabelsMethod · 0.95
__exit__Method · 0.45
__enter__Method · 0.45
__init__.pyFile · 0.45
incMethod · 0.45
decMethod · 0.45
observeMethod · 0.45
observeMethod · 0.45
test_collectMethod · 0.45
test_restrictMethod · 0.45

Calls 1

Tested by 15

test_nolabelsMethod · 0.76
test_collectMethod · 0.36
test_restrictMethod · 0.36
test_labelsMethod · 0.36
test_labels_tagsMethod · 0.36
test_prefixMethod · 0.36
test_prefix_tagsMethod · 0.36
test_sanitizingMethod · 0.36
test_sanitizing_tagsMethod · 0.36