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

Side by Side Diff: tools/android/loading/cloud/backend/report_task_handler.py

Issue 1969373002: tools/android/loading Move LoadingTraceDatabase under cloud/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@report
Patch Set: Rebase Created 4 years, 7 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 | tools/android/loading/cloud/backend/trace_task_handler.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import json 5 import json
6 import uuid 6 import uuid
7 7
8 from googleapiclient import errors 8 from googleapiclient import errors
9 9
10 from common.loading_trace_database import LoadingTraceDatabase
10 import common.google_error_helper as google_error_helper 11 import common.google_error_helper as google_error_helper
11 from failure_database import FailureDatabase 12 from failure_database import FailureDatabase
12 from loading_trace import LoadingTrace 13 from loading_trace import LoadingTrace
13 from loading_trace_database import LoadingTraceDatabase
14 from report import LoadingReport 14 from report import LoadingReport
15 15
16 16
17 def LoadRemoteTrace(storage_accessor, remote_trace_path, logger): 17 def LoadRemoteTrace(storage_accessor, remote_trace_path, logger):
18 """Loads and returns the LoadingTrace located at the remote trace path. 18 """Loads and returns the LoadingTrace located at the remote trace path.
19 19
20 Args: 20 Args:
21 storage_accessor: (GoogleStorageAccessor) Used to download the trace from 21 storage_accessor: (GoogleStorageAccessor) Used to download the trace from
22 CloudStorage. 22 CloudStorage.
23 remote_trace_path: (str) Path to the trace file. 23 remote_trace_path: (str) Path to the trace file.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 self._failure_database.AddFailure('report_generation_failed', path) 131 self._failure_database.AddFailure('report_generation_failed', path)
132 continue 132 continue
133 rows.append(report) 133 rows.append(report)
134 134
135 if rows: 135 if rows:
136 tag = clovis_task.BackendParams()['tag'] 136 tag = clovis_task.BackendParams()['tag']
137 # BigQuery table names can contain only alpha numeric characters and 137 # BigQuery table names can contain only alpha numeric characters and
138 # underscores. 138 # underscores.
139 table_id = ''.join(c for c in tag if c.isalnum() or c == '_') 139 table_id = ''.join(c for c in tag if c.isalnum() or c == '_')
140 self._StreamRowsToBigQuery(rows, table_id) 140 self._StreamRowsToBigQuery(rows, table_id)
OLDNEW
« no previous file with comments | « no previous file | tools/android/loading/cloud/backend/trace_task_handler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698