| Index: tracing/tracing/value/chart_json_converter.html
|
| diff --git a/tracing/tracing/value/chart_json_converter.html b/tracing/tracing/value/chart_json_converter.html
|
| index f0c4609cccfb5cd176e77ea3845f626751f5ace1..fee52b3c27d7336f4fa2f5682e47206b79d9f3bb 100644
|
| --- a/tracing/tracing/value/chart_json_converter.html
|
| +++ b/tracing/tracing/value/chart_json_converter.html
|
| @@ -29,11 +29,21 @@ tr.exportTo('tr.v', function() {
|
|
|
| const unitInfo = tr.v.LEGACY_UNIT_INFO.get(value.units) || {};
|
| const unitName = unitInfo.name || 'unitlessNumber';
|
| - const unitNameSuffix = tr.b.Unit.nameSuffixForImprovementDirection(
|
| - ChartJsonConverter.convertImprovementDirection(
|
| - value.improvement_direction));
|
| const conversionFactor = unitInfo.conversionFactor || 1;
|
|
|
| + let improvementDirection = tr.b.ImprovementDirection.DONT_CARE;
|
| + if (unitInfo.defaultImprovementDirection !== undefined) {
|
| + improvementDirection = unitInfo.defaultImprovementDirection;
|
| + }
|
| + // Metrics have the final say.
|
| + if (value.improvement_direction !== undefined) {
|
| + improvementDirection =
|
| + ChartJsonConverter.convertImprovementDirection(
|
| + value.improvement_direction);
|
| + }
|
| + const unitNameSuffix = tr.b.Unit.nameSuffixForImprovementDirection(
|
| + improvementDirection);
|
| +
|
| const hist = new tr.v.Histogram(
|
| value.name,
|
| tr.b.Unit.byName[unitName + unitNameSuffix],
|
|
|