mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-22 02:29:10 +00:00
iozone: Whitespace cleanup
Cleanup whitespace and reorganize code. Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
This commit is contained in:
parent
8e84e4a230
commit
361f1a0f0c
@ -15,11 +15,11 @@
|
||||
from wlauto import Workload, Parameter, Executable
|
||||
from wlauto.exceptions import ConfigError
|
||||
from wlauto.utils.types import list_of_ints
|
||||
from collections import OrderedDict
|
||||
from itertools import izip_longest
|
||||
import os
|
||||
import re
|
||||
import csv
|
||||
from collections import OrderedDict
|
||||
from itertools import izip_longest
|
||||
|
||||
iozone_results_txt = 'iozone_results.txt'
|
||||
|
||||
@ -74,7 +74,7 @@ class Iozone(Workload):
|
||||
Measure performance of writing a file using the
|
||||
the library function fwrite() that performs
|
||||
buffered and blocked write operations.
|
||||
`
|
||||
|
||||
11 - Fread Test
|
||||
Measure performance of reading a file using the
|
||||
library function fread() that performs buffered
|
||||
@ -158,7 +158,6 @@ class Iozone(Workload):
|
||||
self.device_output_file = os.path.join(self.device.working_directory,
|
||||
self.user_file)
|
||||
|
||||
|
||||
return iozone_command
|
||||
|
||||
def run(self, context):
|
||||
@ -250,19 +249,20 @@ class Iozone(Workload):
|
||||
record_sizes = reports[1]
|
||||
values = reports[2:]
|
||||
|
||||
for data in values:
|
||||
temp = OrderedDict(izip_longest(record_sizes, data))
|
||||
for v in values:
|
||||
templist = OrderedDict(izip_longest(record_sizes, v))
|
||||
|
||||
for reclen,value in temp.items():
|
||||
for reclen,value in templist.items():
|
||||
if reclen is '0':
|
||||
fs = value
|
||||
|
||||
if value is None:
|
||||
value = '0'
|
||||
|
||||
classifier = {'reclen': reclen, 'file_size': fs}
|
||||
classifiers = {'reclen': reclen, 'file_size': fs}
|
||||
if reclen != '0':
|
||||
context.add_metric(report_name, int(value), 'kb/s', classifiers=classifier)
|
||||
context.add_metric(report_name, int(value), 'kb/s',
|
||||
classifiers=classifiers)
|
||||
|
||||
# parse thread-mode results
|
||||
def parse_thread_results(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user