aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/python_utils/jobset.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/run_tests/python_utils/jobset.py')
-rwxr-xr-xtools/run_tests/python_utils/jobset.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/run_tests/python_utils/jobset.py b/tools/run_tests/python_utils/jobset.py
index d01e82a76b..4e97128d46 100755
--- a/tools/run_tests/python_utils/jobset.py
+++ b/tools/run_tests/python_utils/jobset.py
@@ -222,7 +222,8 @@ class JobResult(object):
self.num_failures = 0
self.retries = 0
self.message = ''
-
+ self.cpu_estimated = 1
+ self.cpu_measured = 0
class Job(object):
"""Manages one job."""
@@ -312,7 +313,9 @@ class Job(object):
sys = float(m.group(3))
if real > 0.5:
cores = (user + sys) / real
- measurement = '; cpu_cost=%.01f; estimated=%.01f' % (cores, self._spec.cpu_cost)
+ self.result.cpu_measured = float('%.01f' % cores)
+ self.result.cpu_estimated = float('%.01f' % self._spec.cpu_cost)
+ measurement = '; cpu_cost=%.01f; estimated=%.01f' % (self.result.cpu_measured, self.result.cpu_estimated)
if not self._quiet_success:
message('PASSED', '%s [time=%.1fsec; retries=%d:%d%s]' % (
self._spec.shortname, elapsed, self._retries, self._timeout_retries, measurement),