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

Unified Diff: infra/bots/recipe_modules/core/resources/upload_bench_results.py

Issue 2371883004: Delete unused upload_*_results.py (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | infra/bots/recipe_modules/core/resources/upload_dm_results.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/recipe_modules/core/resources/upload_bench_results.py
diff --git a/infra/bots/recipe_modules/core/resources/upload_bench_results.py b/infra/bots/recipe_modules/core/resources/upload_bench_results.py
deleted file mode 100755
index cf0ec7a5adbccc6ee0a447d188741a47b8e558b3..0000000000000000000000000000000000000000
--- a/infra/bots/recipe_modules/core/resources/upload_bench_results.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-""" Upload benchmark performance data results. """
-
-import gzip
-import os
-import os.path
-import re
-import subprocess
-import sys
-import tempfile
-
-from datetime import datetime
-
-
-def _UploadJSONResults(builder_name, build_number, dest_gsbase, gs_subdir,
- full_json_path, gzipped=True, gsutil_path='gsutil',
- issue_number=None):
- now = datetime.utcnow()
- gs_json_path = '/'.join((str(now.year).zfill(4), str(now.month).zfill(2),
- str(now.day).zfill(2), str(now.hour).zfill(2)))
- gs_dir = '/'.join((gs_subdir, gs_json_path, builder_name))
- if builder_name.endswith('-Trybot'):
- if not issue_number:
- raise Exception('issue_number build property is missing!')
- gs_dir = '/'.join(('trybot', gs_dir, build_number, issue_number))
- full_path_to_upload = full_json_path
- file_to_upload = os.path.basename(full_path_to_upload)
- gzip_args = []
- if gzipped:
- gzip_args = ['-z', 'json']
- cmd = ['python', gsutil_path, 'cp', '-a', 'public-read']
- cmd.extend(gzip_args)
- cmd.extend([full_path_to_upload,
- '/'.join((dest_gsbase, gs_dir, file_to_upload))])
- print ' '.join(cmd)
- subprocess.check_call(cmd)
-
-
-def main(builder_name, build_number, perf_data_dir, got_revision, gsutil_path,
- issue_number=None):
- """Uploads gzipped nanobench JSON data."""
- # Find the nanobench JSON
- file_list = os.listdir(perf_data_dir)
- RE_FILE_SEARCH = re.compile(
- 'nanobench_({})_[0-9]+\.json'.format(got_revision))
- nanobench_name = None
-
- for file_name in file_list:
- if RE_FILE_SEARCH.search(file_name):
- nanobench_name = file_name
- break
-
- if nanobench_name:
- dest_gsbase = 'gs://skia-perf'
- nanobench_json_file = os.path.join(perf_data_dir,
- nanobench_name)
- _UploadJSONResults(builder_name, build_number, dest_gsbase, 'nano-json-v1',
- nanobench_json_file, gsutil_path=gsutil_path,
- issue_number=issue_number)
-
-
-if __name__ == '__main__':
- main(*sys.argv[1:])
-
« no previous file with comments | « no previous file | infra/bots/recipe_modules/core/resources/upload_dm_results.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698