1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-10-29 22:24:51 +00:00

wa: pep8 fixes

This commit is contained in:
Marc Bonnici
2018-07-04 17:44:55 +01:00
parent 4b86fa5aee
commit 925bc8b719
36 changed files with 88 additions and 86 deletions

View File

@@ -55,7 +55,7 @@ class Antutu(ApkUiautoWorkload):
try:
result = float(match.group(1))
except ValueError:
result = 'NaN' #pylint: disable=redefined-variable-type
result = 'NaN' # pylint: disable=redefined-variable-type
entry = regex.pattern.rsplit(None, 1)[0]
context.add_metric(entry, result, lower_is_better=False)
expected_results -= 1

View File

@@ -15,11 +15,11 @@
from __future__ import division
import os
#pylint: disable=wrong-import-order,wrong-import-position
# pylint: disable=wrong-import-order,wrong-import-position
from future.standard_library import install_aliases
install_aliases()
from urllib.request import urlopen #pylint: disable=import-error
from urllib.request import urlopen # pylint: disable=import-error
from wa import Workload, Parameter, Alias, WorkloadError
from wa.utils.exec_control import once
@@ -99,7 +99,7 @@ class ApacheBenchmark(Workload):
wfh.write(self.output)
context.add_artifact('ab-output', outfile, kind='raw')
def update_output(self, context): #pylint: disable=too-many-locals
def update_output(self, context): # pylint: disable=too-many-locals
with open(context.get_artifact_path('ab-output')) as fh:
server_software = get_line(fh, 'Server Software').split(':')[1].strip()
context.add_metadata('server-software', server_software)

View File

@@ -92,7 +92,7 @@ class Applaunch(ApkUiautoWorkload):
def init_resources(self, context):
super(Applaunch, self).init_resources(context)
self.workload_params['markers_enabled'] = True
#pylint: disable=no-member
# pylint: disable=no-member
self.workload = pluginloader.get_workload(self.workload_name, self.target,
**self.workload_params)
self.workload.init_resources(context)

View File

@@ -13,7 +13,7 @@
# limitations under the License.
#
#pylint: disable=E1101,W0201
# pylint: disable=E1101,W0201
import os
import re

View File

@@ -13,7 +13,7 @@
# limitations under the License.
#
#pylint: disable=E1101,W0201
# pylint: disable=E1101,W0201
import os
import re

View File

@@ -19,11 +19,11 @@ import re
import os
import time
#pylint: disable=wrong-import-position
# pylint: disable=wrong-import-position
from future.standard_library import install_aliases
install_aliases()
#pylint: disable=import-error, wrong-import-order
# pylint: disable=import-error, wrong-import-order
import urllib.request
import urllib.parse
import urllib.error
@@ -113,7 +113,7 @@ class ExoPlayer(ApkWorkload):
"""),
]
#pylint: disable=access-member-before-definition
# pylint: disable=access-member-before-definition
def validate(self):
if self.format and self.filename:
raise ConfigError('Either format *or* filename must be specified; but not both.')
@@ -156,7 +156,7 @@ class ExoPlayer(ApkWorkload):
'"format" to specify a different file.')
return files[0]
def init_resources(self, context): #pylint: disable=unused-argument
def init_resources(self, context): # pylint: disable=unused-argument
# Needs to happen first, as it sets self.format, which is required by
# _find_host_video_file
self.validate()

View File

@@ -291,33 +291,31 @@ class GBScoreCalculator(object):
'memory': 0.1926489,
'stream': 0.1054738,
}
#pylint: disable=C0326
# pylint: disable=C0326
workloads = [
# ID Name Power Mac ST Power Mac MT
GBWorkload(101, 'Blowfish', 43971, 40979),
GBWorkload(102, 'Text Compress', 3202, 3280),
GBWorkload(103, 'Text Decompress', 4112, 3986),
GBWorkload(104, 'Image Compress', 8272, 8412),
GBWorkload(105, 'Image Decompress', 16800, 16330),
GBWorkload(107, 'Lua', 385, 385),
GBWorkload(101, 'Blowfish', 43971, 40979), # NOQA
GBWorkload(102, 'Text Compress', 3202, 3280), # NOQA
GBWorkload(103, 'Text Decompress', 4112, 3986), # NOQA
GBWorkload(104, 'Image Compress', 8272, 8412), # NOQA
GBWorkload(105, 'Image Decompress', 16800, 16330), # NOQA
GBWorkload(107, 'Lua', 385, 385), # NOQA
GBWorkload(201, 'Mandelbrot', 665589, 653746),
GBWorkload(202, 'Dot Product', 481449, 455422),
GBWorkload(203, 'LU Decomposition', 889933, 877657),
GBWorkload(204, 'Primality Test', 149394, 185502),
GBWorkload(205, 'Sharpen Image', 2340, 2304),
GBWorkload(206, 'Blur Image', 791, 787),
GBWorkload(201, 'Mandelbrot', 665589, 653746), # NOQA),
GBWorkload(202, 'Dot Product', 481449, 455422), # NOQA,
GBWorkload(203, 'LU Decomposition', 889933, 877657), # NOQA
GBWorkload(204, 'Primality Test', 149394, 185502), # NOQA
GBWorkload(205, 'Sharpen Image', 2340, 2304), # NOQA
GBWorkload(206, 'Blur Image', 791, 787), # NOQA
GBWorkload(302, 'Read Sequential', 1226708, None),
GBWorkload(304, 'Write Sequential', 683782, None),
GBWorkload(306, 'Stdlib Allocate', 3739, None),
GBWorkload(307, 'Stdlib Write', 2070681, None),
GBWorkload(308, 'Stdlib Copy', 1030360, None),
GBWorkload(401, 'Stream Copy', 1367892, None),
GBWorkload(402, 'Stream Scale', 1296053, None),
GBWorkload(403, 'Stream Add', 1507115, None),
GBWorkload(404, 'Stream Triad', 1384526, None),
GBWorkload(302, 'Read Sequential', 1226708, None), # NOQA
GBWorkload(304, 'Write Sequential', 683782, None), # NOQA
GBWorkload(306, 'Stdlib Allocate', 3739, None), # NOQA
GBWorkload(307, 'Stdlib Write', 2070681, None), # NOQA
GBWorkload(401, 'Stream Copy', 1367892, None), # NOQA
GBWorkload(402, 'Stream Scale', 1296053, None), # NOQA
GBWorkload(403, 'Stream Add', 1507115, None), # NOQA
GBWorkload(404, 'Stream Triad', 1384526, None), # NOQA
]
def __init__(self):
@@ -389,7 +387,7 @@ class GBScoreCalculator(object):
context.add_metric('Geekbench Score', int(overall_score))
class GeekbenchCorproate(Geekbench): #pylint: disable=too-many-ancestors
class GeekbenchCorproate(Geekbench): # pylint: disable=too-many-ancestors
name = "geekbench-corporate"
is_corporate = True
requires_network = False

View File

@@ -13,7 +13,7 @@
# limitations under the License.
#
#pylint: disable=E1101,W0201
# pylint: disable=E1101,W0201
import os
import re

View File

@@ -129,7 +129,7 @@ class Jankbench(ApkWorkload):
else:
self.extract_metrics_from_logcat(context)
def extract_metrics_from_db(self, context): #pylint: disable=no-self-use
def extract_metrics_from_db(self, context): # pylint: disable=no-self-use
dbfile = context.get_artifact_path('jankbench-results')
with sqlite3.connect(dbfile) as conn:
df = pd.read_sql('select name, iteration, total_duration, jank_frame from ui_results', conn)

View File

@@ -13,7 +13,7 @@
# limitations under the License.
#
#pylint: disable=E1101,W0201
# pylint: disable=E1101,W0201
import os

View File

@@ -41,9 +41,9 @@ class Mongoperf(Workload):
parameters = [
Parameter('duration', kind=int, default=300,
description="""
Duration of of the workload.
"""),
description="""
Duration of of the workload.
"""),
Parameter('threads', kind=int, default=16,
description="""
Defines the number of threads mongoperf will use in the test.

View File

@@ -13,7 +13,7 @@
# limitations under the License.
#
#pylint: disable=E1101,W0201
# pylint: disable=E1101,W0201
import os
import re