Also apply all bins hack to the out file.
To avoid confusion what we're actually uploading. The out file is for debugging. Bug: chromium:1029452 Change-Id: I6856a8466b58bb4b8d2eac35df7c629af7002b2c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170441 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30791}
This commit is contained in:

committed by
Commit Bot

parent
f6767ed71c
commit
457c8cfd47
@ -41,14 +41,7 @@ def _SendHistogramSet(url, histograms, oauth_token):
|
|||||||
"""
|
"""
|
||||||
headers = {'Authorization': 'Bearer %s' % oauth_token}
|
headers = {'Authorization': 'Bearer %s' % oauth_token}
|
||||||
|
|
||||||
# TODO(https://crbug.com/1029452): HACKHACK
|
serialized = json.dumps(_ApplyAllBinsHack(histograms.AsDicts()), indent=4)
|
||||||
# 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'):
|
if url.startswith('http://localhost'):
|
||||||
# The catapult server turns off compression in developer mode.
|
# The catapult server turns off compression in developer mode.
|
||||||
@ -64,6 +57,16 @@ def _SendHistogramSet(url, histograms, oauth_token):
|
|||||||
return response, content
|
return response, content
|
||||||
|
|
||||||
|
|
||||||
|
# TODO(https://crbug.com/1029452): HACKHACK
|
||||||
|
# Remove once we set bin bounds correctly in the proto writer.
|
||||||
|
def _ApplyAllBinsHack(dicts):
|
||||||
|
for d in dicts:
|
||||||
|
if 'name' in d:
|
||||||
|
d['allBins'] = [[1]]
|
||||||
|
|
||||||
|
return dicts
|
||||||
|
|
||||||
|
|
||||||
def _LoadHistogramSetFromProto(options):
|
def _LoadHistogramSetFromProto(options):
|
||||||
hs = histogram_set.HistogramSet()
|
hs = histogram_set.HistogramSet()
|
||||||
with options.input_results_file as f:
|
with options.input_results_file as f:
|
||||||
@ -89,7 +92,7 @@ def _AddBuildInfo(histograms, options):
|
|||||||
|
|
||||||
def _DumpOutput(histograms, output_file):
|
def _DumpOutput(histograms, output_file):
|
||||||
with output_file:
|
with output_file:
|
||||||
json.dump(histograms.AsDicts(), output_file, indent=4)
|
json.dump(_ApplyAllBinsHack(histograms.AsDicts()), output_file, indent=4)
|
||||||
|
|
||||||
|
|
||||||
# TODO(https://crbug.com/1029452): Remove this once
|
# TODO(https://crbug.com/1029452): Remove this once
|
||||||
|
Reference in New Issue
Block a user