[MotionMark] Add support for version numbers
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jun 2018 15:38:03 +0000 (15:38 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jun 2018 15:38:03 +0000 (15:38 +0000)
commit71fd2484fa8d63b173340826587d0f3240811049
tree200265768e8f37a0c674cd70661ae6720e842506
parent6f74c8507edb030cc1c0bae3cb97913ba09c315e
[MotionMark] Add support for version numbers
https://bugs.webkit.org/show_bug.cgi?id=186479

Reviewed by Said Abou-Hallawa.

Add support for displaying the version number as well as including it in the JSON results.

When loading the front page, script replaces any element with classname version with the
version number of the benchmark, which is stored in Strings.version.

The JSON structure for the results includes a new version property:
    {
      "version": "1.0",
      "options": { ... },
      "data": [ ... ]
    }

When dragging a results file, the version listed will come from the JSON file. Older
results will not have had the version property, in which case it will default to "1.0".

* MotionMark/index.html: Update title to some other default. Script will update it.
Include the version number in the logo title.
* MotionMark/developer.html: Ditto.
* MotionMark/about.html: Ditto.

* MotionMark/resources/runner/motionmark.js:
(ResultsDashboard): Update constructor to include version. This is used when serializing
results out to JSON, and displaying the results panel in developer mode.
(ResultsDashboard._processData): When running the benchmark, include benchmark version string
in the results object.
(ResultsDashboard.version):
(window.benchmarkRunnerClient.willStartFirstIteration): When running the benchmark, pass the
benchmark version string to the dashboard, which holds the results.
(window.sectionsManager.setSectionVersion): Helper function to update the element in the
section with the class name version.
(window.benchmarkController.initialize): Populate all DOM elements with class name "version"
with the version string. Update the page title.
(window.benchmarkController.showResults): When showing results, update the version string
based on what is included in the JSON results, which would be the same as the benchmark version.
* MotionMark/resources/runner/motionmark.css: Include missing copyright. Wrap the SVG logo
in a div and include the version string.
* MotionMark/resources/strings.js: Add strings for the page title template, and the version.

* MotionMark/resources/debug-runner/motionmark.css:
* MotionMark/resources/debug-runner/motionmark.js:
(window.benchmarkRunnerClient.willStartFirstIteration): When running the benchmark, pass the
benchmark version string to the dashboard, which holds the results.
(window.benchmarkController.initialize): Populate all DOM elements with class name "version"
with the version string. Update the page title. When dragging in JSON results, look for
version to pass to the dashboard. If it doesn't exist, default to "1.0".
(window.benchmarkController.showResults): When showing results, update the version string
based on what is included in the JSON results, instead of the current benchmark version.
* MotionMark/resources/debug-runner/tests.js: Update page title template.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PerformanceTests/ChangeLog
PerformanceTests/MotionMark/about.html
PerformanceTests/MotionMark/developer.html
PerformanceTests/MotionMark/index.html
PerformanceTests/MotionMark/resources/debug-runner/motionmark.css
PerformanceTests/MotionMark/resources/debug-runner/motionmark.js
PerformanceTests/MotionMark/resources/debug-runner/tests.js
PerformanceTests/MotionMark/resources/runner/motionmark.css
PerformanceTests/MotionMark/resources/runner/motionmark.js
PerformanceTests/MotionMark/resources/strings.js