diff options
-rw-r--r-- | meta/lib/oeqa/buildperf/base.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py index 5987bfbe4a..95a0abfa5d 100644 --- a/meta/lib/oeqa/buildperf/base.py +++ b/meta/lib/oeqa/buildperf/base.py | |||
@@ -340,6 +340,11 @@ class BuildPerfTestCase(unittest.TestCase): | |||
340 | ret = runCmd2(cmd, **kwargs) | 340 | ret = runCmd2(cmd, **kwargs) |
341 | etime = datetime.now() - start_time | 341 | etime = datetime.now() - start_time |
342 | rusage_struct = resource.getrusage(resource.RUSAGE_CHILDREN) | 342 | rusage_struct = resource.getrusage(resource.RUSAGE_CHILDREN) |
343 | iostat = {} | ||
344 | with open('/proc/{}/io'.format(os.getpid())) as fobj: | ||
345 | for line in fobj.readlines(): | ||
346 | key, val = line.split(':') | ||
347 | iostat[key] = int(val) | ||
343 | rusage = {} | 348 | rusage = {} |
344 | # Skip unused fields, (i.e. 'ru_ixrss', 'ru_idrss', 'ru_isrss', | 349 | # Skip unused fields, (i.e. 'ru_ixrss', 'ru_idrss', 'ru_isrss', |
345 | # 'ru_nswap', 'ru_msgsnd', 'ru_msgrcv' and 'ru_nsignals') | 350 | # 'ru_nswap', 'ru_msgsnd', 'ru_msgrcv' and 'ru_nsignals') |
@@ -350,7 +355,8 @@ class BuildPerfTestCase(unittest.TestCase): | |||
350 | data_q.put({'ret': ret, | 355 | data_q.put({'ret': ret, |
351 | 'start_time': start_time, | 356 | 'start_time': start_time, |
352 | 'elapsed_time': etime, | 357 | 'elapsed_time': etime, |
353 | 'rusage': rusage}) | 358 | 'rusage': rusage, |
359 | 'iostat': iostat}) | ||
354 | except Exception as err: | 360 | except Exception as err: |
355 | data_q.put(err) | 361 | data_q.put(err) |
356 | 362 | ||
@@ -378,7 +384,8 @@ class BuildPerfTestCase(unittest.TestCase): | |||
378 | 'legend': legend} | 384 | 'legend': legend} |
379 | measurement['values'] = {'start_time': data['start_time'], | 385 | measurement['values'] = {'start_time': data['start_time'], |
380 | 'elapsed_time': etime, | 386 | 'elapsed_time': etime, |
381 | 'rusage': data['rusage']} | 387 | 'rusage': data['rusage'], |
388 | 'iostat': data['iostat']} | ||
382 | self.measurements.append(measurement) | 389 | self.measurements.append(measurement) |
383 | 390 | ||
384 | # Append to 'times' array for globalres log | 391 | # Append to 'times' array for globalres log |