| 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 """A tool that runs a perf test and uploads the resulting data to the | 6 """A tool that runs a perf test and uploads the resulting data to the |
| 7 performance dashboard. | 7 performance dashboard. |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 import argparse | 10 import argparse |
| 11 from mopy import perf_data_uploader | |
| 12 from mopy.version import Version | |
| 13 import subprocess | 11 import subprocess |
| 14 import sys | 12 import sys |
| 15 | 13 |
| 14 from mopy_internal import perf_data_uploader |
| 15 from mopy_internal.version import Version |
| 16 | 16 |
| 17 def _GetCurrentCommitCount(): | 17 def _GetCurrentCommitCount(): |
| 18 return subprocess.check_output( | 18 return subprocess.check_output( |
| 19 ["git", "rev-list", "HEAD", "--count"]).strip() | 19 ["git", "rev-list", "HEAD", "--count"]).strip() |
| 20 | 20 |
| 21 | 21 |
| 22 def main(): | 22 def main(): |
| 23 parser = argparse.ArgumentParser( | 23 parser = argparse.ArgumentParser( |
| 24 description="A tool that runs a perf test and uploads the resulting data " | 24 description="A tool that runs a perf test and uploads the resulting data " |
| 25 "to the performance dashboard.") | 25 "to the performance dashboard.") |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 result = perf_data_uploader.UploadPerfData( | 76 result = perf_data_uploader.UploadPerfData( |
| 77 args.master_name, args.perf_id, args.test_name, args.builder_name, | 77 args.master_name, args.perf_id, args.test_name, args.builder_name, |
| 78 args.build_number, revision, perf_data, point_id, False, | 78 args.build_number, revision, perf_data, point_id, False, |
| 79 args.testing_dashboard) | 79 args.testing_dashboard) |
| 80 | 80 |
| 81 return 0 if result else 1 | 81 return 0 if result else 1 |
| 82 | 82 |
| 83 | 83 |
| 84 if __name__ == '__main__': | 84 if __name__ == '__main__': |
| 85 sys.exit(main()) | 85 sys.exit(main()) |
| OLD | NEW |