mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-04 11:17:51 +00:00
Clean up proc comment
This commit is contained in:
1 parent
ce5d3cae56
commit
afffba457f
1 file changed
+7
-1
@@ -157,7 +157,13 @@ class ThreadCPUMetrics(Collector):
|
||||
continue
|
||||
|
||||
# The thread name may contain spaces or brackets, so split after
|
||||
# its closing bracket. See `man 5 proc` for the field numbers.
|
||||
# its closing bracket. See `man 5 proc_pid_stat` for the field
|
||||
# numbers (note they're off by three due to zero-based indexing
|
||||
# and we have split off the first two fields).
|
||||
#
|
||||
# Example of the start of such a line:
|
||||
#
|
||||
# 171453 (cat) R 30798 171453 ...
|
||||
fields = line.rsplit(")", 1)[1].split()
|
||||
utime = int(fields[11])
|
||||
stime = int(fields[12])
|
||||
|
||||
Reference in new issue
Block a user