Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: testing/scripts/run_telemetry_benchmark_as_googletest.py

Issue 2290373002: Adding perf test isolate and gn build target for swarming the benchmarks. (Closed)
Patch Set: Review comments addressed Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/buildbot/manage.py ('k') | tools/mb/mb_config.pyl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/scripts/run_telemetry_benchmark_as_googletest.py
diff --git a/testing/scripts/run_telemetry_benchmark_as_googletest.py b/testing/scripts/run_telemetry_benchmark_as_googletest.py
index 387c5c8da95993f984f20522253b471eca93a58d..dcf2e72239d7acce4118f85aa949283b2d94e786 100755
--- a/testing/scripts/run_telemetry_benchmark_as_googletest.py
+++ b/testing/scripts/run_telemetry_benchmark_as_googletest.py
@@ -18,7 +18,7 @@ This script is intended to be the base command invoked by the isolate,
followed by a subsequent Python script. It could be generalized to
invoke an arbitrary executable.
"""
-
+import logging
import argparse
import json
import os
@@ -40,12 +40,14 @@ CHROME_SANDBOX_ENV = 'CHROME_DEVEL_SANDBOX'
CHROME_SANDBOX_PATH = '/opt/chromium/chrome_sandbox'
def main():
+ logging.info("1: IN THE SCRIPT")
dtu 2016/09/01 05:18:38 Are these intentional?
eyaich1 2016/09/01 14:19:35 lol definitely not. this file sholdn't be include
parser = argparse.ArgumentParser()
parser.add_argument(
'--isolated-script-test-output', type=argparse.FileType('w'),
required=True)
parser.add_argument('--xvfb', help='Start xvfb.', action='store_true')
args, rest_args = parser.parse_known_args()
+ logging.info("2: PARSED ARGS")
xvfb_proc = None
openbox_proc = None
xcompmgr_proc = None
@@ -58,18 +60,22 @@ def main():
xvfb_proc, openbox_proc, xcompmgr_proc = xvfb.start_xvfb(env=env,
build_dir='.')
assert xvfb_proc and openbox_proc and xcompmgr_proc, 'Failed to start xvfb'
+ logging.info("3: ABOUT TO TRY")
try:
tempfile_dir = tempfile.mkdtemp('telemetry')
valid = True
failures = []
try:
+ logging.info("4: TRY AGAIN")
rc = common.run_command([sys.executable] + rest_args + [
'--output-dir', tempfile_dir,
'--output-format=json'
], env=env)
+ logging.info("5: AFTER COMMAND")
tempfile_name = os.path.join(tempfile_dir, 'results.json')
with open(tempfile_name) as f:
results = json.load(f)
+ logging.info("6: ABOUT TO WRITE RESULTS")
for value in results['per_page_values']:
if value['type'] == 'failure':
failures.append(results['pages'][str(value['page_id'])]['name'])
@@ -85,6 +91,7 @@ def main():
if rc == 0:
rc = 1 # Signal an abnormal exit.
+ logging.info("7: ABOUT TO DUMP")
json.dump({
'valid': valid,
'failures': failures,
« no previous file with comments | « testing/buildbot/manage.py ('k') | tools/mb/mb_config.pyl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698