Skip to content

Commit

Permalink
Bug 1352207 - Compare view should show a tooltip on bars saying wheth…
Browse files Browse the repository at this point in the history
…er the result was better or worse
  • Loading branch information
SJasoria committed Apr 11, 2017
1 parent ae74d14 commit c4da7ef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ui/js/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,9 @@ treeherder.filter('displayPrecision', function() {
return parseFloat(input).toFixed(2);
};
});

treeherder.filter('absoluteValue', function() {
return function(input) {
return Math.abs(input);
};
});
5 changes: 4 additions & 1 deletion ui/partials/perf/comparetable.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@
replicates="compareResult.newRuns"></ph-average>
</td>
<td ng-class="$ctrl.getCompareClasses(compareResult)">
<span ng-if="compareResult.delta" class="detail-hint" uib-tooltip="Mean difference: {{compareResult.delta|displayPrecision}} (= {{compareResult.deltaPercentage|displayPrecision}}%)">
<span ng-if="compareResult.delta && compareResult.newIsBetter" class="detail-hint" uib-tooltip="Mean difference: {{compareResult.delta|displayPrecision}} (= {{compareResult.deltaPercentage|displayPrecision |absoluteValue}}% better)">
{{compareResult.deltaPercentage|displayPrecision}}%
</span>
<span ng-if="compareResult.delta && !compareResult.newIsBetter" class="detail-hint" uib-tooltip="Mean difference: {{compareResult.delta|displayPrecision}} (= {{compareResult.deltaPercentage|displayPrecision |absoluteValue}}% worse)">
{{compareResult.deltaPercentage|displayPrecision}}%
</span>
</td>
Expand Down

0 comments on commit c4da7ef

Please sign in to comment.