Proper fix to the summary options problem.
It's better to set this to the right value in the C++ API rather than the hack in catapult_uploader.py. Bug: chromium:1029452 Change-Id: Ia942ff22f8422874cd226e6a7fdce20333ac4a50 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170632 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30817}
This commit is contained in:
committed by
Commit Bot
parent
4c07605f8d
commit
6725b648c8
@ -113,6 +113,10 @@ class PerfTestHistogramWriter : public PerfTestResultWriter {
|
|||||||
proto::UnitAndDirection unit = ParseUnit(units, improve_direction);
|
proto::UnitAndDirection unit = ParseUnit(units, improve_direction);
|
||||||
std::unique_ptr<catapult::HistogramBuilder> builder =
|
std::unique_ptr<catapult::HistogramBuilder> builder =
|
||||||
std::make_unique<catapult::HistogramBuilder>(graph_name, unit);
|
std::make_unique<catapult::HistogramBuilder>(graph_name, unit);
|
||||||
|
|
||||||
|
// Set all summary options as false - we don't want to generate
|
||||||
|
// metric_std, metric_count, and so on for all metrics.
|
||||||
|
builder->SetSummaryOptions(proto::SummaryOptions());
|
||||||
histograms_[measurement_and_story] = std::move(builder);
|
histograms_[measurement_and_story] = std::move(builder);
|
||||||
|
|
||||||
proto::Diagnostic stories;
|
proto::Diagnostic stories;
|
||||||
|
|||||||
@ -102,25 +102,9 @@ def _DumpOutput(histograms, output_file):
|
|||||||
json.dump(_ApplyHacks(histograms.AsDicts()), output_file, indent=4)
|
json.dump(_ApplyHacks(histograms.AsDicts()), output_file, indent=4)
|
||||||
|
|
||||||
|
|
||||||
# TODO(https://crbug.com/1029452): Remove this once
|
|
||||||
# https://chromium-review.googlesource.com/c/catapult/+/2094312 lands.
|
|
||||||
def _HackSummaryOptions(histograms):
|
|
||||||
for h in histograms:
|
|
||||||
h.CustomizeSummaryOptions({
|
|
||||||
'avg': False,
|
|
||||||
'std': False,
|
|
||||||
'count': False,
|
|
||||||
'sum': False,
|
|
||||||
'min': False,
|
|
||||||
'max': False,
|
|
||||||
'nans': False,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
def UploadToDashboard(options):
|
def UploadToDashboard(options):
|
||||||
histograms = _LoadHistogramSetFromProto(options)
|
histograms = _LoadHistogramSetFromProto(options)
|
||||||
_AddBuildInfo(histograms, options)
|
_AddBuildInfo(histograms, options)
|
||||||
_HackSummaryOptions(histograms)
|
|
||||||
|
|
||||||
if options.output_json_file:
|
if options.output_json_file:
|
||||||
_DumpOutput(histograms, options.output_json_file)
|
_DumpOutput(histograms, options.output_json_file)
|
||||||
|
|||||||
Reference in New Issue
Block a user