From 85037bca98ccf07ed1843768faccd4a204db60e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20H=C3=B6glund?= Date: Fri, 13 Mar 2020 09:56:58 +0100 Subject: [PATCH] Hack in allBins into perf results. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's see if this makes the perf dashboard accept the upload. The proper fix requires some catapult work + a couple rolls. Tbr: mbonadei@webrtc.org Bug: chromium:1029452 Change-Id: I5fb94a08784620a423c4bd7a5bb6dc7f7c05cdc9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170363 Reviewed-by: Patrik Höglund Reviewed-by: Mirko Bonadei Commit-Queue: Patrik Höglund Cr-Commit-Position: refs/heads/master@{#30786} --- tools_webrtc/perf/webrtc_dashboard_upload.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools_webrtc/perf/webrtc_dashboard_upload.py b/tools_webrtc/perf/webrtc_dashboard_upload.py index 7fc0f1a3cc..0c61400373 100644 --- a/tools_webrtc/perf/webrtc_dashboard_upload.py +++ b/tools_webrtc/perf/webrtc_dashboard_upload.py @@ -71,7 +71,15 @@ def _SendHistogramSet(url, histograms, oauth_token): oauth_token: An oauth token to use for authorization. """ headers = {'Authorization': 'Bearer %s' % oauth_token} - serialized = json.dumps(histograms.AsDicts(), indent=4) + + # TODO(https://crbug.com/1029452): HACKHACK + # Remove once we set bin bounds correctly in the proto writer. + dicts = histograms.AsDicts() + for d in dicts: + if 'name' in d: + d['allBins'] = [[1]] + + serialized = json.dumps(dicts, indent=4) if url.startswith('http://localhost'): # The catapult server turns off compression in developer mode.