mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 20:38:57 +00:00
Added target_config option to telemetry
This commit is contained in:
parent
65ab86221b
commit
2d3be33bb0
@ -17,13 +17,11 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import csv
|
import csv
|
||||||
import math
|
|
||||||
import shutil
|
import shutil
|
||||||
import json
|
import json
|
||||||
import urllib
|
import urllib
|
||||||
import stat
|
import stat
|
||||||
from zipfile import is_zipfile, ZipFile
|
from zipfile import is_zipfile, ZipFile
|
||||||
from collections import defaultdict
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
@ -33,7 +31,7 @@ except ImportError:
|
|||||||
from wlauto import Workload, Parameter
|
from wlauto import Workload, Parameter
|
||||||
from wlauto.exceptions import WorkloadError, ConfigError
|
from wlauto.exceptions import WorkloadError, ConfigError
|
||||||
from wlauto.utils.misc import check_output, get_null, get_meansd
|
from wlauto.utils.misc import check_output, get_null, get_meansd
|
||||||
from wlauto.utils.types import numeric, identifier
|
from wlauto.utils.types import numeric
|
||||||
|
|
||||||
|
|
||||||
RESULT_REGEX = re.compile(r'RESULT ([^:]+): ([^=]+)\s*=\s*' # preamble and test/metric name
|
RESULT_REGEX = re.compile(r'RESULT ([^:]+): ([^=]+)\s*=\s*' # preamble and test/metric name
|
||||||
@ -113,6 +111,12 @@ class Telemetry(Workload):
|
|||||||
description="""
|
description="""
|
||||||
if ``True``, FPS for the run will be computed from the trace (must be enabled).
|
if ``True``, FPS for the run will be computed from the trace (must be enabled).
|
||||||
"""),
|
"""),
|
||||||
|
Parameter('target_config', kind=str, default=None,
|
||||||
|
description="""
|
||||||
|
Manually specify target configuration for telemetry. This must contain
|
||||||
|
--browser option plus any addition options Telemetry requires for a particular
|
||||||
|
target (e.g. --device or --remote)
|
||||||
|
"""),
|
||||||
]
|
]
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
@ -177,18 +181,22 @@ class Telemetry(Workload):
|
|||||||
|
|
||||||
def build_command(self):
|
def build_command(self):
|
||||||
device_opts = ''
|
device_opts = ''
|
||||||
if self.device.platform == 'chromeos':
|
if self.target_config:
|
||||||
if '--remote' not in self.run_benchmark_params:
|
device_opts = self.target_config
|
||||||
device_opts += '--remote={} '.format(self.device.host)
|
|
||||||
if '--browser' not in self.run_benchmark_params:
|
|
||||||
device_opts += '--browser=cros-chrome '
|
|
||||||
elif self.device.platform == 'android':
|
|
||||||
if '--device' not in self.run_benchmark_params and self.device.adb_name:
|
|
||||||
device_opts += '--device={} '.format(self.device.adb_name)
|
|
||||||
if '--browser' not in self.run_benchmark_params:
|
|
||||||
device_opts += '--browser=android-webview-shell '
|
|
||||||
else:
|
else:
|
||||||
raise WorkloadError('Currently, telemetry workload supports only ChromeOS or Android devices.')
|
if self.device.platform == 'chromeos':
|
||||||
|
if '--remote' not in self.run_benchmark_params:
|
||||||
|
device_opts += '--remote={} '.format(self.device.host)
|
||||||
|
if '--browser' not in self.run_benchmark_params:
|
||||||
|
device_opts += '--browser=cros-chrome '
|
||||||
|
elif self.device.platform == 'android':
|
||||||
|
if '--device' not in self.run_benchmark_params and self.device.adb_name:
|
||||||
|
device_opts += '--device={} '.format(self.device.adb_name)
|
||||||
|
if '--browser' not in self.run_benchmark_params:
|
||||||
|
device_opts += '--browser=android-webview-shell '
|
||||||
|
else:
|
||||||
|
raise WorkloadError('Unless you\'re running Telemetry on a ChromeOS or Android device, '
|
||||||
|
'you mast specify target_config option')
|
||||||
return '{} {} {} {}'.format(self.run_benchmark_path,
|
return '{} {} {} {}'.format(self.run_benchmark_path,
|
||||||
self.test,
|
self.test,
|
||||||
device_opts,
|
device_opts,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user