Move threads_delta

This commit is contained in:
Erik Johnston committed 2026-11-06 16:14:19 +00:00
1 parent 9a1b2e1106
commit 948fb6de93
1 file changed
+1 -1
+1 -1
View File
@@ -116,7 +116,6 @@ class ThreadCPUMetricsTestCase(unittest.TestCase):
secs = after[thread_type] - before.get(thread_type, 0.0)
return Duration(seconds=secs)
threads_delta = sum(after.values()) - sum(before.values())
self.assertGreaterEqual(delta("main"), BURN - TOLERANCE)
self.assertGreaterEqual(delta("test-thread"), BURN - TOLERANCE)
@@ -128,4 +127,5 @@ class ThreadCPUMetricsTestCase(unittest.TestCase):
tick = 1 / os.sysconf("SC_CLK_TCK")
slack = (len(os.listdir("/proc/self/task")) + 2) * tick
threads_delta = sum(after.values()) - sum(before.values())
self.assertLessEqual(abs(threads_delta - process_delta), slack)