8000 Graphite bridge should use standard time.time instead of timeit.defau… · sonlinux/client_python@caf3293 · GitHub
[go: up one dir, main page]

Skip to content

Commit caf3293

Browse files
melnikkbrian-brazil
authored andcommitted
Graphite bridge should use standard time.time instead of timeit.default_timer
1 parent 052116d commit caf3293

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

prometheus_client/bridge/graphite.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def run(self):
4545

4646

4747
class GraphiteBridge(object):
48-
def __init__(self, address, registry=core.REGISTRY, timeout_seconds=30, _timer=default_timer):
48+
def __init__(self, address, registry=core.REGISTRY, timeout_seconds=30, _timer=time.time):
4949
self._address = address
5050
self._registry = registry
5151
self._timeout = timeout_seconds
@@ -64,8 +64,8 @@ def push(self, prefix=''):
6464
if labels:
6565
labelstr = '.' + '.'.join(
6666
['{0}.{1}'.format(
67-
_sanitize(k), _sanitize(v))
68-
for k, v in sorted(labels.items())])
67+
_sanitize(k), _sanitize(v))
68+
for k, v in sorted(labels.items())])
6969
else:
7070
labelstr = ''
7171
output.append('{0}{1}{2} {3} {4}\n'.format(

0 commit comments

Comments
 (0)
0