From 77baab0be154bd03fb39e81ee07ecb184511eb30 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 2 Nov 2026 14:04:45 +0000 Subject: [PATCH] Use attribute comments --- synapse/metrics/_thread_cpu.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/synapse/metrics/_thread_cpu.py b/synapse/metrics/_thread_cpu.py index 84c74a83f9..16069854dc 100644 --- a/synapse/metrics/_thread_cpu.py +++ b/synapse/metrics/_thread_cpu.py @@ -35,12 +35,16 @@ logger = logging.getLogger(__name__) class _ThreadSample: """A thread's CPU usage as of one scrape.""" - # When the thread started, in ticks since boot. Tells apart a new thread - # that reuses the ID of one that exited. start_time: int - # The user and system CPU the thread had used, in ticks. + """When the thread started, in ticks since boot. Used to distinguish a new + thread that reuses the ID of one that exited. + """ + utime: int + """User CPU time used by the thread, in ticks.""" + stime: int + """System CPU time used by the thread, in ticks.""" class ThreadCPUMetrics(Collector):