8000 Adds docstring for Gauges class · Syncano/client_python@dd6416c · GitHub
[go: up one dir, main page]

Skip to content

Commit dd6416c

Browse files
author
Mark Railton
committed
Adds docstring for Gauges class
1 parent 6a045e7 commit dd6416c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

prometheus_client/core.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,23 @@ def _samples(self):
232232

233233
@_MetricWrapper
234234
class Gauge(object):
235+
'''Gauge metric, to report instantaneous values.
236+
237+
Examples of Gauges include:
238+
Inprogress requests
239+
Number of items in a queue
240+
Free memory
241+
Total memory
242+
Temperature
243+
244+
Gauges can go both up and down.
245+
246+
from prometheus_client import Gauge
247+
g = Gauge('my_inprogress_requests', 'Description of gauge')
248+
g.inc() # Increment by 1
249+
g.dec(10) # Decrement by given value
250+
g.set(4.2) # Set to a given value
251+
'''
235252
_type = 'gauge'
236253
_reserved_labelnames = []
237254

0 commit comments

Comments
 (0)
0