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

Unified Diff: mojo/tools/perf_test_runner.py

Issue 1418193005: Push more upload arguments logic from perf_test_runner -> devtools. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 2 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 | « mojo/devtools/common/devtoolslib/perf_dashboard.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/perf_test_runner.py
diff --git a/mojo/tools/perf_test_runner.py b/mojo/tools/perf_test_runner.py
index 6d6601b9a422b472071b9e8caa79e63082168f8b..89728648cf4223f207797d7a6b3218a00e28cb88 100755
--- a/mojo/tools/perf_test_runner.py
+++ b/mojo/tools/perf_test_runner.py
@@ -21,8 +21,6 @@ import subprocess
import sys
import re
-from mopy.version import Version
-
import devtools
devtools.add_lib_to_path()
from devtoolslib import perf_dashboard
@@ -37,11 +35,6 @@ _PERF_LINE_FORMAT = r"""^\s*([^\s/]+) # chart name
_PERF_LINE_REGEX = re.compile(_PERF_LINE_FORMAT, re.VERBOSE)
-def _GetCurrentCommitCount():
- return subprocess.check_output(
- ["git", "rev-list", "HEAD", "--count"]).strip()
-
-
def _ConvertPerfDataToChartFormat(perf_data, test_name):
"""Converts the perf data produced by a perf test to the "chart_data" format
accepted by the performance dashboard, see:
@@ -91,25 +84,17 @@ def main():
if not args.upload:
return 0
- if args.master_name is None or \
- args.bot_name is None or \
- args.test_name is None or \
- args.builder_name is None or \
- args.build_number is None or \
- args.perf_data_path is None:
- print "Can't upload perf data to the dashboard because not all of the " \
- "following values are specified: master-name, perf-id, test-name, " \
- "builder-name, build-number, perf-data-path."
+ if not args.test_name or not args.perf_data_path:
+ print ("Can't upload perf data to the dashboard because not all of the "
+ "following values are specified: test-name, perf-data-path.")
return 1
- revision = Version().version
- point_id = _GetCurrentCommitCount()
with open(args.perf_data_path, "r") as perf_data:
chart_data = _ConvertPerfDataToChartFormat(perf_data, args.test_name)
result = perf_dashboard.upload_chart_data(
args.master_name, args.bot_name, args.test_name, args.builder_name,
- args.build_number, revision, chart_data, point_id, args.server_url,
+ args.build_number, chart_data, args.server_url,
args.dry_run)
return 0 if result else 1
« no previous file with comments | « mojo/devtools/common/devtoolslib/perf_dashboard.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698