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

Side by Side Diff: mojo/tools/mopy/perf_data_uploader.py

Issue 863263004: Add a link to the perf dashboard in the test output. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """A tool that uploads data to the performance dashboard.""" 6 """A tool that uploads data to the performance dashboard."""
7 7
8 import argparse 8 import argparse
9 import httplib 9 import httplib
10 import json 10 import json
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 print "Server: %s" % server_url 122 print "Server: %s" % server_url
123 print "Data:" 123 print "Data:"
124 pprint.pprint(formatted_data) 124 pprint.pprint(formatted_data)
125 else: 125 else:
126 print "Uploading data to %s ..." % server_url 126 print "Uploading data to %s ..." % server_url
127 try: 127 try:
128 _Upload(server_url, json.dumps(formatted_data)) 128 _Upload(server_url, json.dumps(formatted_data))
129 except _UploadException as e: 129 except _UploadException as e:
130 print e 130 print e
131 return False 131 return False
132 print "Done successfully." 132
133 print "Done."
134
135 dashboard_params = urllib.urlencode({
136 "masters": master_name,
137 "bots": perf_id,
138 "tests": test_name,
139 "rev": point_id
140 })
141 print "Results Dashboard: %s/report?%s" % (server_url, dashboard_params)
133 142
134 return True 143 return True
135 144
136 145
137 def main(): 146 def main():
138 parser = argparse.ArgumentParser( 147 parser = argparse.ArgumentParser(
139 description="A tool that uploads data to the performance dashboard.") 148 description="A tool that uploads data to the performance dashboard.")
140 149
141 parser.add_argument( 150 parser.add_argument(
142 "--master-name", required=True, 151 "--master-name", required=True,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 191
183 result = UploadPerfData(args.master_name, args.perf_id, args.test_name, 192 result = UploadPerfData(args.master_name, args.perf_id, args.test_name,
184 args.builder_name, args.build_number, args.revision, 193 args.builder_name, args.build_number, args.revision,
185 args.perf_data, args.point_id, args.dry_run, 194 args.perf_data, args.point_id, args.dry_run,
186 args.testing_dashboard) 195 args.testing_dashboard)
187 return 0 if result else 1 196 return 0 if result else 1
188 197
189 198
190 if __name__ == '__main__': 199 if __name__ == '__main__':
191 sys.exit(main()) 200 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698