aboutsummaryrefslogtreecommitdiff
path: root/crosperf
diff options
context:
space:
mode:
authorcmtice <cmtice@google.com>2014-04-27 22:28:42 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-04-29 03:10:50 +0000
commit226e3e08106dffd3086a7eee7007950a1d8ddfaf (patch)
tree56107d8bddb9cfac25c48ec978e00c0d2400bfcf /crosperf
parent4375f760cb471a09b410d4034028eb8e45b1ba24 (diff)
downloadtoolchain-utils-226e3e08106dffd3086a7eee7007950a1d8ddfaf.tar.gz
Fix small bugs with non-autotest Telemetry; other cleanups.
This CL fixes various small problems found during recent testing: - Force show_all_results to be true for 'pure' telemetry case (the results filtering needs the autotest results to work properly) - Fix bug that was inserting extra 'src' into Chrome src path sometimes - Since non-autotest Telemetry and non-Telemetry-Crosperf tests can't handle 'perf' make it a Fatal error to call them with perf args. - Add missing field to example experiment file. - Add status output messages to downlaod_images.py for non-verbose logging. BUG=None TEST=Tested all these fixes on multiple test runs. Change-Id: If8209356c695dc8b21f8627399a1cbd4a858df23 Reviewed-on: https://chrome-internal-review.googlesource.com/161759 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
Diffstat (limited to 'crosperf')
-rw-r--r--crosperf/benchmark.py2
-rw-r--r--crosperf/download_images.py12
-rw-r--r--crosperf/experiment_files/telemetry-crosperf-with-external-chrome-src.exp4
-rw-r--r--crosperf/label.py4
-rw-r--r--crosperf/suite_runner.py9
5 files changed, 26 insertions, 5 deletions
diff --git a/crosperf/benchmark.py b/crosperf/benchmark.py
index c8a26bbb..93462fa4 100644
--- a/crosperf/benchmark.py
+++ b/crosperf/benchmark.py
@@ -29,3 +29,5 @@ class Benchmark(object):
self.iteration_adjusted = False
self.suite = suite
self.show_all_results = show_all_results
+ if self.suite == "telemetry":
+ self.show_all_results = True
diff --git a/crosperf/download_images.py b/crosperf/download_images.py
index ac8fd3a4..3927000a 100644
--- a/crosperf/download_images.py
+++ b/crosperf/download_images.py
@@ -26,6 +26,9 @@ class ImageDownloader(object):
build_id_tuple = eval(build_id_tuple_str)
build_id = build_id_tuple[0]
+ if self.log_level == "average":
+ self._logger.LogOutput ("Preparing to download %s image to local directory." % build_id)
+
# Make sure the directory for downloading the image exists.
download_path = os.path.join(chromeos_root, "chroot/tmp",
build_id)
@@ -42,11 +45,20 @@ class ImageDownloader(object):
"/chromiumos_test_image.tar.xz /tmp/%s" % (build_id,
build_id))
+ if self.log_level != "verbose":
+ self._logger.LogOutput ("CMD: %s" % command)
retval = self._ce.ChrootRunCommand(chromeos_root, command)
# Uncompress and untar the downloaded image.
command = ("cd /tmp/%s ;unxz chromiumos_test_image.tar.xz; "
"tar -xvf chromiumos_test_image.tar" % build_id)
+ if self.log_level != "verbose":
+ self._logger.LogOutput("CMD: %s" % command)
+ print("(Uncompressing and un-tarring may take a couple of minutes..."
+ "please be patient.)")
retval = self._ce.ChrootRunCommand(chromeos_root, command)
+ if retval == 0 and self.log_level != "quiet":
+ self._logger.LogOutput("Using image from %s." % image_path)
+
return retval, image_path
diff --git a/crosperf/experiment_files/telemetry-crosperf-with-external-chrome-src.exp b/crosperf/experiment_files/telemetry-crosperf-with-external-chrome-src.exp
index 551fac67..517c13f1 100644
--- a/crosperf/experiment_files/telemetry-crosperf-with-external-chrome-src.exp
+++ b/crosperf/experiment_files/telemetry-crosperf-with-external-chrome-src.exp
@@ -23,5 +23,9 @@ benchmark: octane {
# Replace the chromeos image below with the actual path to your test imnage.
test_image {
chromeos_image:<path-to-your-chroot>/src/build/images/<board>/test-image/chromiumos_test_image.bin
+ # Replace '/usr/local/google/chrome-top' with the path to the
+ # top of your Chrome source tree. From that directory
+ # "./src/tools/perf/run_benchmark" should be a valid file path.
+ chrome_src:/usr/local/google/chrome-top
}
diff --git a/crosperf/label.py b/crosperf/label.py
index 52f98cef..bbcf18ae 100644
--- a/crosperf/label.py
+++ b/crosperf/label.py
@@ -45,10 +45,10 @@ class Label(object):
self.chromeos_root = chromeos_root
if not chrome_src:
self.chrome_src = os.path.join(self.chromeos_root,
- ".cache/distfiles/target/chrome-src-internal/src")
+ ".cache/distfiles/target/chrome-src-internal")
if not os.path.exists(self.chrome_src):
self.chrome_src = os.path.join(self.chromeos_root,
- ".cache/distfiles/target/chrome-src/src")
+ ".cache/distfiles/target/chrome-src")
else:
chromeos_src = misc.CanonicalizePath(chrome_src)
if not chromeos_src:
diff --git a/crosperf/suite_runner.py b/crosperf/suite_runner.py
index 8e2847ef..1f816e42 100644
--- a/crosperf/suite_runner.py
+++ b/crosperf/suite_runner.py
@@ -53,7 +53,7 @@ class SuiteRunner(object):
def Run(self, machine, label, benchmark, test_args, profiler_args):
self.PinGovernorExecutionFrequencies(machine, label.chromeos_root)
if benchmark.suite == "telemetry":
- return self.Telemetry_Run(machine, label, benchmark)
+ return self.Telemetry_Run(machine, label, benchmark, profiler_args)
elif benchmark.suite == "telemetry_Crosperf":
return self.Telemetry_Crosperf_Run(machine, label, benchmark,
test_args, profiler_args)
@@ -126,7 +126,7 @@ class SuiteRunner(object):
if test_args:
options += " %s" % test_args
if profiler_args:
- self._logger.LogError("test_that does not support profiler.")
+ self._logger.LogFatal("test_that does not support profiler.")
command = "rm -rf /usr/local/autotest/results/*"
self._ce.CrosRunCommand(command, machine=machine, username="root",
chromeos_root=label.chromeos_root)
@@ -188,7 +188,7 @@ class SuiteRunner(object):
cros_sdk_options=chrome_root_options)
- def Telemetry_Run(self, machine, label, benchmark):
+ def Telemetry_Run(self, machine, label, benchmark, profiler_args):
telemetry_run_path = ""
if not os.path.isdir(label.chrome_src):
self._logger.LogFatal("Cannot find chrome src dir to"
@@ -198,6 +198,9 @@ class SuiteRunner(object):
if not os.path.exists(telemetry_run_path):
self._logger.LogFatal("Cannot find %s directory." % telemetry_run_path)
+ if profiler_args:
+ self._logger.LogFatal("Telemetry does not support the perf profiler.")
+
rsa_key = os.path.join(label.chromeos_root,
"src/scripts/mod_for_test_scripts/ssh_keys/testing_rsa")