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

Side by Side Diff: mojo/devtools/common/mojo_benchmark

Issue 1422983002: Fix format produced by chart data recorder. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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 | « mojo/devtools/common/devtoolslib/perf_dashboard_unittest.py ('k') | 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 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 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 """Runner for Mojo application benchmarks.""" 6 """Runner for Mojo application benchmarks."""
7 7
8 import argparse 8 import argparse
9 import json
9 import logging 10 import logging
11 import os.path
12 import re
10 import sys 13 import sys
11 import time 14 import time
12 import os.path
13 import re
14 15
15 from devtoolslib import shell_arguments 16 from devtoolslib import shell_arguments
16 from devtoolslib import shell_config 17 from devtoolslib import shell_config
17 from devtoolslib import perf_dashboard 18 from devtoolslib import perf_dashboard
18 19
19 20
20 _DESCRIPTION = """Runner for Mojo application benchmarks. 21 _DESCRIPTION = """Runner for Mojo application benchmarks.
21 22
22 |benchmark_list_file| has to be a valid Python program that sets a |benchmarks| 23 |benchmark_list_file| has to be a valid Python program that sets a |benchmarks|
23 global variable, containing entries of the following form: 24 global variable, containing entries of the following form:
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 print 'benchmark failed: ' + benchmark_error 238 print 'benchmark failed: ' + benchmark_error
238 if some_measurements_failed: 239 if some_measurements_failed:
239 print 'some measurements failed' 240 print 'some measurements failed'
240 print 'output: ' 241 print 'output: '
241 print '-' * 72 242 print '-' * 72
242 print output 243 print output
243 print '-' * 72 244 print '-' * 72
244 exit_code = 1 245 exit_code = 1
245 246
246 if script_args.chart_data_output_file: 247 if script_args.chart_data_output_file:
247 script_args.chart_data_output_file.write(chart_data_recorder.get_json()) 248 script_args.chart_data_output_file.write(
249 json.dumps(chart_data_recorder.get_chart_data()))
248 script_args.chart_data_output_file.write('\n') 250 script_args.chart_data_output_file.write('\n')
249 251
250 return exit_code 252 return exit_code
251 253
252 if __name__ == '__main__': 254 if __name__ == '__main__':
253 sys.exit(main()) 255 sys.exit(main())
OLDNEW
« no previous file with comments | « mojo/devtools/common/devtoolslib/perf_dashboard_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698