OLD | NEW |
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 logging | 9 import logging |
10 import sys | 10 import sys |
(...skipping 18 matching lines...) Expand all Loading... |
29 # List of measurements to make. | 29 # List of measurements to make. |
30 'measurements': [ | 30 'measurements': [ |
31 '<measurement type>/<event category>/<event name>', | 31 '<measurement type>/<event category>/<event name>', |
32 ] | 32 ] |
33 } | 33 } |
34 | 34 |
35 Available measurement types are: | 35 Available measurement types are: |
36 | 36 |
37 - 'time_until' - time until the first occurence of the targeted event | 37 - 'time_until' - time until the first occurence of the targeted event |
38 - 'avg_duration' - average duration of the targeted event | 38 - 'avg_duration' - average duration of the targeted event |
| 39 - 'percentile_duration' - value at XXth percentile of the targeted event where |
| 40 XX is from the measurement spec, i.e. .../<event name>/0.XX |
39 | 41 |
40 |benchmark_list_file| may reference the |target_os| global that will be any of | 42 |benchmark_list_file| may reference the |target_os| global that will be any of |
41 ['android', 'linux'], indicating the system on which the benchmarks are to be | 43 ['android', 'linux'], indicating the system on which the benchmarks are to be |
42 run. | 44 run. |
43 """ | 45 """ |
44 | 46 |
45 _logger = logging.getLogger() | 47 _logger = logging.getLogger() |
46 | 48 |
47 _BENCHMARK_APP = 'https://core.mojoapps.io/benchmark.mojo' | 49 _BENCHMARK_APP = 'https://core.mojoapps.io/benchmark.mojo' |
48 _CACHE_SERVICE_URL = 'mojo:url_response_disk_cache' | 50 _CACHE_SERVICE_URL = 'mojo:url_response_disk_cache' |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 save_traces=script_args.save_traces) | 161 save_traces=script_args.save_traces) |
160 _run_benchmark(shell, shell_args, name, app, duration, measurements, | 162 _run_benchmark(shell, shell_args, name, app, duration, measurements, |
161 cold_start=False, verbose=script_args.verbose, | 163 cold_start=False, verbose=script_args.verbose, |
162 android=script_args.android, | 164 android=script_args.android, |
163 save_traces=script_args.save_traces) | 165 save_traces=script_args.save_traces) |
164 | 166 |
165 return 0 if succeeded else 1 | 167 return 0 if succeeded else 1 |
166 | 168 |
167 if __name__ == '__main__': | 169 if __name__ == '__main__': |
168 sys.exit(main()) | 170 sys.exit(main()) |
OLD | NEW |