Commit 3269695c authored by Emily Hanley's avatar Emily Hanley Committed by Commit Bot

Adding logging of perf data type and adding error messaging

Change-Id: I349768cec84b3545ca35f8836fdbd83fda6c2bc2
Reviewed-on: https://chromium-review.googlesource.com/1054193Reviewed-by: default avatarSimon Hatch <simonhatch@chromium.org>
Commit-Queue: Emily Hanley <eyaich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557602}
parent bac1ab5c
...@@ -130,7 +130,6 @@ def _SendResultsFromCache(cache_file_name, url, oauth_token): ...@@ -130,7 +130,6 @@ def _SendResultsFromCache(cache_file_name, url, oauth_token):
line = line.strip() line = line.strip()
if not line: if not line:
continue continue
print 'Sending result %d of %d to dashboard.' % (index + 1, total_results)
# We need to check whether we're trying to upload histograms. If the JSON # We need to check whether we're trying to upload histograms. If the JSON
# is invalid, we should not try to send this data or re-try it later. # is invalid, we should not try to send this data or re-try it later.
# Instead, we'll print an error. # Instead, we'll print an error.
...@@ -141,6 +140,8 @@ def _SendResultsFromCache(cache_file_name, url, oauth_token): ...@@ -141,6 +140,8 @@ def _SendResultsFromCache(cache_file_name, url, oauth_token):
continue continue
data_type = ('histogram' if is_histogramset else 'chartjson') data_type = ('histogram' if is_histogramset else 'chartjson')
print 'Sending %s result %d of %d to dashboard.' % (
data_type, index + 1, total_results)
try: try:
if is_histogramset: if is_histogramset:
...@@ -490,7 +491,7 @@ def _SendResultsJson(url, results_json): ...@@ -490,7 +491,7 @@ def _SendResultsJson(url, results_json):
# If the remote app rejects the JSON, it's probably malformed, # If the remote app rejects the JSON, it's probably malformed,
# so we don't want to retry it. # so we don't want to retry it.
raise SendResultsFatalException('Discarding JSON, error:\n%s' % error) raise SendResultsFatalException('Discarding JSON, error:\n%s' % error)
raise SendResultsRetryException() raise SendResultsRetryException(error)
def _Httplib2Request(url, data, oauth_token): def _Httplib2Request(url, data, oauth_token):
data = zlib.compress(data) data = zlib.compress(data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment