10000 Merge pull request #43 from railto/docs · Syncano/client_python@783a917 · GitHub
[go: up one dir, main page]

Skip to content

Commit 783a917

Browse files
committed
Merge pull request prometheus#43 from railto/docs
Adds docstring for Gauge method
2 parents 6a045e7 + dd6416c commit 783a917

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