diff options
author | Adrian Tschira <nota@notafile.com> | 2018-04-28 13:19:12 +0200 |
---|---|---|
committer | Adrian Tschira <nota@notafile.com> | 2018-05-19 17:59:26 +0200 |
commit | 933bf2dd357842b0e7c3fc7a1111d89ab52f5329 (patch) | |
tree | 3a40de02b5227d0cb2ee4725b1c70b33868c45f9 /synapse/metrics | |
parent | Merge pull request #3241 from matrix-org/fix_user_visits_insertion (diff) | |
download | synapse-933bf2dd357842b0e7c3fc7a1111d89ab52f5329.tar.xz |
replace some iteritems with six
Signed-off-by: Adrian Tschira <nota@notafile.com>
Diffstat (limited to 'synapse/metrics')
-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]) |