Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: tools/perf/metrics/cpu_unittest.py

Issue 2560543002: [telemetry] Fix CPU metric jiffie overflow correction. (Closed)
Patch Set: Typo. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/metrics/cpu.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/metrics/cpu_unittest.py
diff --git a/tools/perf/metrics/cpu_unittest.py b/tools/perf/metrics/cpu_unittest.py
index c2157b318ec026d0843bf8ad50e71db7d91d17e2..7749bc4640a409b65908bd0164d183020d3d6665 100644
--- a/tools/perf/metrics/cpu_unittest.py
+++ b/tools/perf/metrics/cpu_unittest.py
@@ -35,7 +35,7 @@ class CpuMetricTest(unittest.TestCase):
cpu._SubtractCpuStats(end, start))
# Test 32-bit overflow.
- start = {'Browser': {'CpuProcessTime': 0, 'TotalTime': 2 ** 32 - 20}}
+ start = {'Browser': {'CpuProcessTime': 0, 'TotalTime': 2 ** 32 / 100. - 20}}
end = {'Browser': {'CpuProcessTime': 5, 'TotalTime': 20}}
self.assertEqual({'Browser': 0.125}, cpu._SubtractCpuStats(end, start))
self.assertRaises(AssertionError, cpu._SubtractCpuStats, start, end)
« no previous file with comments | « tools/perf/metrics/cpu.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698