diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-05-24 13:04:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-24 13:04:07 -0500 |
commit | 1f6969334727787286502e8387d6803aec342f24 (patch) | |
tree | d26996245c3e27e3667f025a891b751fcdeaac54 /synapse/metrics | |
parent | Merge pull request #3246 from NotAFile/py3-repr-string (diff) | |
parent | replace some iteritems with six (diff) | |
download | synapse-1f6969334727787286502e8387d6803aec342f24.tar.xz |
Merge pull request #3244 from NotAFile/py3-six-4
replace some iteritems with six
Diffstat (limited to '')
-rw-r--r-- | synapse/metrics/process_collector.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/metrics/process_collector.py b/synapse/metrics/process_collector.py index 6fec3de399..50e5b48a2b 100644 --- a/synapse/metrics/process_collector.py +++ b/synapse/metrics/process_collector.py @@ -15,6 +15,7 @@ import os +from six import iteritems TICKS_PER_SEC = 100 BYTES_PER_PAGE = 4096 @@ -55,7 +56,7 @@ def update_resource_metrics(): # line is PID (command) more stats go here ... raw_stats = line.split(") ", 1)[1].split(" ") - for (name, index) in STAT_FIELDS.iteritems(): + for (name, index) in iteritems(STAT_FIELDS): # subtract 3 from the index, because proc(5) is 1-based, and # we've lost the first two fields in PID and COMMAND above stats[name] = int(raw_stats[index - 3]) |