Skip to content

Conversation

@acdha
Copy link
Contributor

@acdha acdha commented Oct 3, 2016

On Python 3, this uses time.perf_counter on all platforms.

On Python 2, it will use time.clock on Windows and time.time everywhere else

On Python 3, this uses time.perf_counter.

On Python 2, it will use time.clock on Windows and time.time
everywhere else
@brian-brazil brian-brazil merged commit bde3259 into prometheus:master Oct 3, 2016
@brian-brazil
Copy link
Contributor

Thanks!

@melnikk
Copy link
Contributor

melnikk commented Jul 5, 2017

Just FYI, this leads to short timestamp on my system (Centos 7.3, python 3.4.5):

process_resident_memory_bytes 30285824.0 160435

Graphite drops that metrics, and, as a workaround, I had to switch back from default_timer:

gb = GraphiteBridge((GRAPHITE_HOST, GRAPHITE_PORT), _timer=time.time)

@brian-brazil
Copy link
Contributor

That would be a bug, would you like to send a PR switching that one back to time.time?

@melnikk
Copy link
Contributor

melnikk commented Jul 5, 2017

@brian-brazil, sure, PR #175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants