Perf dashboard doesn’t show the right unit for Safari UI tests
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Feb 2015 18:16:39 +0000 (18:16 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Feb 2015 18:16:39 +0000 (18:16 +0000)
commit3127988177e6937b46ab80b7f1701f7a5e104315
treee59976f692eb3cb38025ce0a8888de46e4012028
parent04555ce1dee0163ee9bcac0f7fc7c9bcefa21216
Perf dashboard doesn’t show the right unit for Safari UI tests
https://bugs.webkit.org/show_bug.cgi?id=141238

Reviewed by Darin Adler.

Safari UI tests use custom metrics that end with "Time". This patch teaches the perf dashboard how to
get the unit for a given metric based on the suffix of the metric name instead of hard-coding the mapping
between metrics and their units.

* public/js/helper-classes.js:
(PerfTestRuns): Use the suffix of the metric name to compute the unit.
* public/v2/manifest.js:
(App.Manifest.fetchRunsWithPlatformAndMetric): Ditto. Also set "useSI" property iff for "bytes".
* public/v2/interactive-chart.js:
(App.InteractiveChartComponent._constructGraphIfPossible): Respect useSI. Use toPrecision(3) otherwise.
(App.InteractiveChartComponent._relayoutDataAndAxes): Place the unit vertically on the left of ticks.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/js/helper-classes.js
Websites/perf.webkit.org/public/v2/interactive-chart.js
Websites/perf.webkit.org/public/v2/manifest.js