Split benchmark into two different pages
[WebKit-https.git] / PerformanceTests / ChangeLog
1 2015-12-23  Jon Lee  <jonlee@apple.com>
2
3         Split benchmark into two different pages
4         https://bugs.webkit.org/show_bug.cgi?id=152458
5
6         Reviewed by Simon Fraser.
7
8         Add tests to 'animometer' suite.
9
10         * Animometer/resources/runner/tests.js:
11         * Animometer/tests/master/canvas-stage.html: Added.
12         * Animometer/tests/master/resources/canvas-stage.js: Added.
13         * Animometer/tests/master/resources/canvas-tests.js: Added.
14         * Animometer/tests/master/resources/stage.css: Added.
15
16 2015-12-23  Jon Lee  <jonlee@apple.com>
17
18         Split benchmark into two different pages
19         https://bugs.webkit.org/show_bug.cgi?id=152458
20
21         Reviewed by Simon Fraser.
22
23         Address comments.
24
25         * Animometer/resources/debug-runner/benchmark-runner.js:
26         (BenchmarkRunner.prototype._runTestAndRecordResults): When the testing is complete the frame owning the
27         sampler goes away, and a later call to get the JSON data is no longer available. Process the data
28         right here, instead, and just reference it when displaying the results in ResultsDashboard.prototype._processData.
29         * Animometer/resources/extensions.js:
30         (Array.prototype.fill.Array.prototype.fill): Add a null check. Remove braces around single-line clause.
31         (Array.prototype.find.Array.prototype.find): Update the null check.
32         (ResultsDashboard.prototype._processData): Use the already-processed data.
33         * Animometer/resources/runner/animometer.css:
34         (.frame-container > iframe): Remove calc().
35
36         Move Array functions to extensions.js since that is included by the harness.
37         Add ES6 Array polyfills.
38
39         * Animometer/resources/algorithm.js:
40         (Array.prototype.swap): Moved to extensions.js.
41         * Animometer/resources/extensions.js:
42         (Array.prototype.swap):
43         (Array.prototype.fill): Added.
44         (Array.prototype.find): Added.
45
46         Adjust styles for iPad.
47
48         * Animometer/resources/runner/animometer.css:
49         (@media screen and (min-device-width: 768px)): Apply to iPad as well.
50         (@media screen and (max-device-width: 1024px)): Update width for iPads.
51
52         Adjustment styles for iOS.
53
54         * Animometer/developer.html: Different divs contain the iframe, so use a class instead and
55         update the style rules.
56         * Animometer/index.html:
57         * Animometer/resources/debug-runner/animometer.css: Remove extraneous rules.
58         (@media screen and (min-device-width: 1800px)): Move this up.
59         * Animometer/resources/runner/animometer.css: Add rules to accomodate iOS.
60
61         Get rid of prefixed flex properties for now.
62
63         * Animometer/resources/debug-runner/animometer.css:
64         * Animometer/resources/runner/animometer.css:
65
66         Update the structure of the harness. Remove the JSON-per-test but keep
67         the JSON of the whole test run. Use the full page in order to display
68         the graph.
69
70         * Animometer/developer.html: Update several of the JS file includes to UTF-8. Remove header and footer. Test results screen includes score,
71         average, and worst 5% statistics.
72         * Animometer/index.html: Make structure similar to developer.html.
73         * Animometer/resources/debug-runner/animometer.css: Remove most of the
74         button rules since they are superfluous. Move the progress bar to the
75         top, fixed. Update the results page rules.
76         * Animometer/resources/debug-runner/animometer.js: Remove most of the
77         additions to sectionsManager since they are no longer needed.
78         (setSectionHeader): Updates header of the section.
79         (window.suitesManager._updateStartButtonState): Update selector.
80         (showResults): Add keypress event for selecting different data for
81         copy/paste. Update how the results are populated. Include full test
82         JSON in a textarea, rather than requiring a button press.
83         (showTestGraph):
84         * Animometer/resources/debug-runner/tests.js: Update structure of Headers. Define different kinds of headers. Headers can control their
85         title, and the text used as the cell contents, including class name.
86         * Animometer/resources/extensions.js:
87         (ResultsTable): Update to include a flattened version of the headers,
88         used while populating table contents. Remove unneeded helper functions
89         for creating the table. Rename "show" to "add".
90         * Animometer/resources/runner/animometer.css: Update rules to
91         accommodate the new structure.
92         * Animometer/resources/runner/animometer.js:
93         (window.sectionsManager.setSectionScore): Helper function to set the
94         score and mean for a section.
95         (window.sectionsManager.populateTable): Helper function to set the table.
96         (window.benchmarkController.showResults): Refactor.
97         (window.benchmarkController.selectResults): Update selectors.
98         * Animometer/resources/runner/tests.js: Set Headers. Debug harness
99         extends it.
100
101         Update debug runner to have similar names to the basic runner. Include
102         that page's CSS and remove extraneous CSS rules.
103
104         Get rid of the statistics table #record.
105
106         * Animometer/developer.html: Rename #home to #intro. Rename .spacer to hr.
107         * Animometer/resources/debug-runner/animometer.css: Set to flexbox when selected.
108         * Animometer/resources/debug-runner/animometer.js: Remove recordTable.
109         (window.suitesManager._updateStartButtonState): Update selector to #intro.
110         (setupRunningSectionStyle): Deleted.
111
112         * Animometer/resources/runner/animometer.css:
113         (#test-container.selected): Change to flex-box only when visible.
114
115         Remove recordTable.
116         * Animometer/resources/debug-runner/benchmark-runner.js:
117         (BenchmarkRunner.prototype._runTestAndRecordResults):
118         * Animometer/resources/runner/tests.js:
119         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js:
120         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
121         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
122         * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
123         * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
124         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
125         * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
126         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
127         * Animometer/tests/examples/resources/canvas-electrons.js:
128         * Animometer/tests/examples/resources/canvas-stars.js:
129         * Animometer/tests/misc/resources/compositing-transforms.js:
130         * Animometer/tests/resources/main.js:
131         * Animometer/tests/resources/stage.js:
132         (StageBenchmark): Remove _recordTable.
133         * Animometer/tests/simple/resources/simple-canvas-paths.js:
134         * Animometer/tests/simple/resources/simple-canvas.js:
135         * Animometer/tests/template/resources/template-canvas.js:
136         * Animometer/tests/template/resources/template-css.js:
137         * Animometer/tests/template/resources/template-svg.js:
138         * Animometer/tests/text/resources/layering-text.js:
139
140         * Animometer/resources/debug-runner/animometer.js:
141         (willStartFirstIteration): Fix selector, since results-table is used
142         in multiple places, so it cannot be an id.
143
144         Make it possible to select the scores, or the whole table data,
145         by cycling through different selections through key press of 's'.
146
147         * Animometer/resources/runner/animometer.js:
148         (window.benchmarkController.showResults): Attach a keypress handler
149         if it hasn't been added already.
150         (window.benchmarkController.selectResults):
151         * Animometer/resources/runner/tests.js: Cycle through different
152         ranges.
153
154         Fix a few fly-by errors.
155
156         * Animometer/resources/debug-runner/benchmark-runner.js:
157         (BenchmarkRunnerState.prototype.prepareCurrentTest): Update the frame relative path
158         since the files are now in the top directory instead of inside runner/.
159         (BenchmarkRunner.prototype._runTestAndRecordResults): Incorrect reference to function.
160         (BenchmarkRunner.prototype.step): Member variable is never used.
161
162         A little stylistic cleanup.
163
164         * Animometer/resources/debug-runner/benchmark-runner.js:
165         * Animometer/resources/extensions.js:
166         (window.DocumentExtension.createElement):
167         * Animometer/tests/resources/main.js:
168         (Benchmark.prototype.record):
169         * Animometer/tests/resources/stage.js:
170         (StageBenchmark.prototype.showResults): Reverse progress and message.
171         The message appears less frequently than the progress.
172         * Animometer/tests/simple/resources/simple-canvas.js:
173         (SimpleCanvasBenchmark): Remove unused options.
174
175         Add newer version of harness in a new page. Consolidate differences between the two
176         pages.
177
178         * Animometer/developer.html: Include runner/animometer.js. Rename the JS function
179         to run the benchmark to startBenchmark() instead of startTest(). Rename #running to
180         #test-container.
181         * Animometer/index.html: Added. Similarly calls startBenchmark() and has #test-container.
182         * Animometer/resources/debug-runner/animometer.css: Make the canvas 2:1 (1200px x 800px)
183         instead of 4:3.
184
185         Split out benchmarkRunnerClient and benchmarkController.
186
187         * Animometer/resources/debug-runner/animometer.js: Move needed functions out of
188         benchmarkRunnerClient, and leave the rest here to extend that object. Get rid of _resultsTable
189         and move populating the results table into benchmarkController. Rename _resultsDashboard
190         to results and make it accessible for other objects to use.
191         (willAddTestFrame): This is unnecessary. Remove.
192
193         (window.sectionsManager.showScore): Grab it from the results object instead of
194         benchmarkRunnerClient.
195         (window.sectionsManager.showSection): Deleted. Moved to runner/animometer.js.
196
197         (window.benchmarkController._runBenchmark): Deleted. Mostly moved into _startBenchmark.
198         (window.benchmarkController.startBenchmark): Refactor to call _startBenchmark.
199         (window.benchmarkController.showResults): Include most of benchmarkRunnerClient.didFinishLastIteration()
200         here.
201
202         * Animometer/resources/debug-runner/benchmark-runner.js:
203         (BenchmarkRunner.prototype._appendFrame): Remove unneeded call to willAddTestFrame.
204         * Animometer/resources/extensions.js:
205         (ResultsDashboard): Change the class to process the sampler data on-demand and hold onto that data
206         for later referencing.
207         (ResultsDashboard.prototype.toJSON): Deleted.
208         (ResultsDashboard.prototype._processData): Rename toJSON to _processData since it's not really
209         outputting JSON. Store the processed data into a member variable that can be referenced later.
210         (ResultsDashboard.prototype.get data): Process the data if it hasn't already.
211         (ResultsDashboard.prototype.get score): Process the data if it hasn't already, then return the
212         aggregate score.
213         (ResultsTable.prototype._showHeader): When outputting the results to a table, don't force the
214         need for an empty children array. This was to allow for a header row in the table that spanned
215         multiple columns. In the simpler harness, this is not needed.
216         (ResultsTable.prototype._showEmptyCells):
217         (ResultsTable.prototype._showTest): This hardcoded the columns. At least for the name and score,
218         which is the bare minimum needed for the simpler harness, key off of the header name provided.
219         * Animometer/resources/runner/animometer.css: Added. Use a similar 2:1 ratio. The score tables are
220         split into the data and the headers, and are also displayed RTL so that a later patch allows a
221         user to copy-paste the data easily.
222         * Animometer/resources/runner/animometer.js: Added. Use a simpler version of benchmarkRunnerClient.
223         The debug harness will extend these classes.
224         (window.benchmarkController._startBenchmark): Used by both harnesses.
225         (window.benchmarkController.startBenchmark): Set hard-coded options.
226         (window.benchmarkController.showResults): Includes most of benchmarkRunnerClient.didFinishLastIteration()
227         here.
228
229         Get rid of utilities.js. Move it all into extensions.js.
230
231         * Animometer/resources/extensions.js:
232         * Animometer/tests/resources/utilities.js: Removed.
233
234         * Animometer/tests/bouncing-particles/bouncing-canvas-images.html: Remove script link.
235         * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html: Ditto.
236         * Animometer/tests/bouncing-particles/bouncing-css-images.html: Ditto.
237         * Animometer/tests/bouncing-particles/bouncing-css-shapes.html: Ditto.
238         * Animometer/tests/bouncing-particles/bouncing-svg-images.html: Ditto.
239         * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html: Ditto.
240         * Animometer/tests/examples/canvas-electrons.html: Ditto.
241         * Animometer/tests/examples/canvas-stars.html: Ditto.
242         * Animometer/tests/misc/compositing-transforms.html: Ditto.
243         * Animometer/tests/simple/simple-canvas-paths.html: Ditto.
244         * Animometer/tests/template/template-canvas.html: Ditto.
245         * Animometer/tests/template/template-css.html: Ditto.
246         * Animometer/tests/template/template-svg.html: Ditto.
247         * Animometer/tests/text/layering-text.html: Ditto.
248
249         Split tests.js into two. Add a new suite to runner/tests.js.
250
251         * Animometer/developer.html: Update the script order. Scripts from
252         debug-runner/ will always build on those from runner/, and have the
253         same name.
254         * Animometer/resources/debug-runner/tests.js: Move "complex examples"
255         suite into "miscellaneous tests".
256         (Suite): Deleted.
257         (Suite.prototype.prepare): Deleted.
258         (Suite.prototype.run): Deleted.
259         (suiteFromName): Deleted.
260         * Animometer/resources/runner/tests.js: Added. Take definitions and
261         functions needed by the test harness. Leave the test suites behind.
262         (Suite): Moved from debug script.
263         (Suite.prototype.prepare): Ditto.
264         (Suite.prototype.run): Ditto.
265         (suiteFromName): Ditto.
266         (testFromName): Ditto.
267
268         Move benchmark resources out into resources/debug-runner, and update URLs.
269
270         * Animometer/developer.html: Renamed from PerformanceTests/Animometer/runner/animometer.html.
271         * Animometer/resources/debug-runner/animometer.css: Renamed from PerformanceTests/Animometer/runner/resources/animometer.css.
272         * Animometer/resources/debug-runner/animometer.js: Renamed from PerformanceTests/Animometer/runner/resources/animometer.js.
273         * Animometer/resources/debug-runner/benchmark-runner.js: Renamed from PerformanceTests/Animometer/runner/resources/benchmark-runner.js.
274         * Animometer/resources/debug-runner/d3.min.js: Renamed from PerformanceTests/Animometer/runner/resources/d3.min.js.
275         * Animometer/resources/debug-runner/graph.js: Renamed from PerformanceTests/Animometer/runner/resources/graph.js.
276         * Animometer/resources/debug-runner/tests.js: Renamed from PerformanceTests/Animometer/runner/resources/tests.js.
277
278 2015-12-11  Jon Lee  <jonlee@apple.com>
279
280         Improve Animometer on iOS
281         https://bugs.webkit.org/show_bug.cgi?id=152180
282
283         Reviewed by Simon Fraser.
284
285         Improve experience on phones. Make the canvas take
286         up the whole screen.
287
288         * Animometer/runner/animometer.html: Add meta viewport.
289         Remove the container div.
290         * Animometer/runner/resources/animometer.css: Have buttons lay
291         out vertically. Update detail arrow glyph. Make the suites and
292         options section lay out vertically. Remove the top spacers since
293         we want the canvas to take over the whole screen. Minimal display
294         is recommended for use.
295
296 2015-12-07  Jon Lee  <jonlee@apple.com>
297
298         Update suites for benchmark
299         https://bugs.webkit.org/show_bug.cgi?id=151957
300
301         Reviewed by Simon Fraser.
302
303         * Animometer/runner/animometer.html: Use spacers instead of relying on
304         justify-content center to center the content. That allows the opening screen
305         to grow downward when expanding the list of choices, otherwise it expands
306         from the center, and off the top edge of the screen.
307         * Animometer/runner/resources/animometer.css:
308         (.tree): Don't overflow scroll.
309         (.tree > li > label.tree-label:before): Use better glyphs.
310         (.tree > li > :checked ~ label.tree-label:before):
311         (main): Using flex-start for justify-content so that if the section grows too
312         big it gets pinned to the top edge of the document instead of growing past it.
313         (.spacer): Make the spacers have a minimum 20px and grow evenly.
314         (section#home): Add a min-height so that the border will expand if the suite
315         tests shown make the section grow past the height.
316         * Animometer/runner/resources/animometer.js: Update the selectors.
317         (window.suitesManager._treeElement):
318         (window.suitesManager._suitesElements):
319         (window.suitesManager._editsElements):
320
321 2015-12-07  Jon Lee  <jonlee@apple.com>
322
323         Update options for benchmark
324         https://bugs.webkit.org/show_bug.cgi?id=151956
325
326         Reviewed by Simon Fraser.
327
328         Move "Fix test complexity" and "Adaptive" checkboxes into a radio group.
329
330         Move "Show running results" into a radio group, and add options to remove the HUD.
331
332         * Animometer/runner/animometer.html: Get rid of the preamble. Wrap the options
333         in a form for easier referencing in JS.
334         * Animometer/runner/resources/animometer.css: Show the surrounding border if the
335         body's display-minimal class name is set.
336         * Animometer/runner/resources/animometer.js:
337
338         Update the way optionsManager gets and sets default values. Include support for
339         radio groups.
340         (window.optionsManager.valueForOption):
341         (window.optionsManager.updateUIFromLocalStorage):
342         (window.optionsManager.updateLocalStorageFromUI):
343
344         (window.benchmarkRunnerClient.willStartFirstIteration):
345         (window.sectionsManager.setupRunningSectionStyle):
346         (window.suitesManager._treeElement): Fly-by whitespace fix.
347         (window.suitesManager._suitesElements): Ditto.
348         (window.suitesManager.updateEditsElementsState): Update options check.
349         (window.suitesManager.updateDisplay): Add a new update function for the HUD.
350         Attach a class to the body depending on the user's choice.
351         (window.benchmarkController.initialize): Add an event listener when the form
352         radio buttons update.
353         (window.benchmarkController.onFormChanged):
354         (window.optionsManager._optionsElements): Deleted.
355         (window.optionsManager._adaptiveTestElement): Deleted.
356         (window.benchmarkController.onChangeAdaptiveTestCheckbox): Deleted.
357         * Animometer/tests/resources/main.js:
358         (Benchmark.prototype.update): Update options checks.
359         * Animometer/tests/resources/stage.js: Update option check.
360         (StageBenchmark.prototype.showResults):
361
362 2015-12-01  Simon Fraser  <simon.fraser@apple.com>
363
364         Add a basic compositing Animometer test
365         https://bugs.webkit.org/show_bug.cgi?id=151724
366
367         Reviewed by Dean Jackson.
368         
369         Add a "bouncing particles" test that moves composited layers around, optionally with a filter.
370         
371         This is added under a new "Miscellaneous" category.
372         
373         Remove the test templates category from the UI.
374
375         * Animometer/runner/resources/tests.js:
376         * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
377         (BouncingCssShape.prototype.animate):
378         * Animometer/tests/misc/compositing-transforms.html: Added.
379         * Animometer/tests/misc/resources/compositing-transforms.js: Added.
380         (BouncingCompositedImage):
381         (BouncingCompositedImage.prototype._move):
382         (BouncingCompositedImage.prototype.animate):
383         (CompositingTransformsStage):
384         (CompositingTransformsStage.prototype.createParticle):
385         (CompositingTransformsStage.prototype.particleWillBeRemoved):
386         (CompositedTransformsBenchmark):
387         (CompositedTransformsBenchmark.prototype.createStage):
388         (window.benchmarkClient.create):
389
390 2015-11-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
391
392         Fix the graphics benchmark complexity bounds adjustment
393         https://bugs.webkit.org/show_bug.cgi?id=151670
394
395         Reviewed by Simon Fraser.
396
397         Make sure the graphics benchmark complexity bounds adjustment is applied
398         to the absolute lower bound.
399
400         * Animometer/tests/resources/math.js:
401         (PIDController.prototype._saturate):
402
403 2015-11-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
404
405         Add an option to select the results form the graphics benchmark
406         https://bugs.webkit.org/show_bug.cgi?id=151666
407
408         Reviewed by Ryosuke Niwa.
409
410         We need an easy way to select the graphics benchmark results table such
411         that when it is copied to the clipboard, rich text format is set to the
412         clipboard.
413
414         * Animometer/runner/animometer.html: Add a new button to select the results table or JSON.
415         
416         * Animometer/runner/resources/animometer.js:
417         (window.sectionsManager._sectionDataElement): Selects the container <data> element.
418         (window.sectionsManager._sectionDataDivElement): Replace a literal string with a string table entry.
419         (window.sectionsManager.showTestName): Replace a literal string with a string table entry.
420         (window.sectionsManager.selectData): Selects the container <data> element in a selection.
421         (window.sectionsManager.selectDataContents): Select the contents of container <data> element in a selection.
422         (window.benchmarkController.selectResults): Selects the results table.
423         (window.benchmarkController.showJSON): Function rename.
424         (window.benchmarkController.selectJSON): Selects the contents of the results JSON.
425         (window.benchmarkController.showJson): Deleted.
426
427 2015-11-20  Simon Fraser  <simon.fraser@apple.com>
428
429         Animometer: graphs should not do interpolation
430         https://bugs.webkit.org/show_bug.cgi?id=151526
431
432         Reviewed by Simon Fraser.
433         
434         Having the graphs do interpolation is misleading, because you can't see the actual data.
435         
436         Also remove "shape-rendering: crispEdges;" so the lines get antialiased.
437
438         * Animometer/runner/resources/animometer.css:
439         (section#test-graph > data > svg): Deleted.
440         * Animometer/runner/resources/graph.js:
441         (graph): Deleted.
442
443 2015-11-19  Said Abou-Hallawa  <sabouhallawa@apple.com>
444
445         Calculate the graphics benchmark test gain adaptively
446         https://bugs.webkit.org/show_bug.cgi?id=151208
447
448         Reviewed by Darin Adler.
449
450         We need to calculate the gain of the graphics benchmark tests adaptively
451         and get rid of the gain and limits parameters we have to choose manually
452         for every test. We are going to use the classic Ziegler–Nichols method for
453         calculating the gain and integral and derivative times. We are going to
454         try moving on a cubic curve during the manual stage from y0 to reach ysp.
455         We also going to use a saturation actuator to ensure the system does not
456         fluctuate.
457
458         * Animometer/resources/extensions.js:
459         (ResultsTable.prototype._isNoisyMeasurement): Fix a parameter name.
460         (ResultsTable.prototype._isNoisyTest): Since score is a member of testResults, we need to limit our search to frame rate and complexity.
461         (ResultsTable.prototype._showTest): Pass the correct parameter to _isNoisyMeasurement(). 
462         
463         * Animometer/resources/strings.js: Fix the indentation and name and value of a string.
464
465         * Animometer/runner/resources/tests.js: Remove all the manual gains and limits parameters which had to be passed to every test.
466         
467         * Animometer/tests/resources/main.js:
468         (BenchmarkState.prototype.currentStage): Fix an enum name.
469         (Benchmark): Get rid of manual gain and limits.
470         (Benchmark.prototype.update): Simplify the calculation by having all the times in ms.
471         
472         * Animometer/tests/resources/math.js:
473         (PIDController): Get rid of the manual gain and limits and the magic numbers for Ti and Td.
474         (PIDController.prototype._yPosition): Tells whether the test current output is moving towards the set-point or away from it.
475         (PIDController.prototype._distanceUltimate): Calculates the ultimate distance from y0 after time t using a cubic formula.
476         (PIDController.prototype._distance): Calculates the distance of y relative to y0.
477         (PIDController.prototype._gainIncrement): Decides how much the proportional gain should be increased during the manual gain stage.
478         (PIDController.prototype._updateStage): Updates the stage of the controller based on its current stage and the system output.
479         (PIDController.prototype._tuneP): Tunes the system before calculating the PID controller gains.
480         (PIDController.prototype._tunePID): PID tuning function.
481         (PIDController.prototype._tune):
482         (PIDController.prototype._saturate):
483         (PIDController.prototype.tune): Manages calculating the controller parameters. It then returns a PID tuning value.
484         (PIDController.prototype._sat): Deleted. We may need to return it back but the limits have to be calculated adaptively not manually. 
485
486 2015-11-17  Said Abou-Hallawa  <sabouhallawa@apple.com>
487
488         Reorganize the graphics benchmark string table
489         https://bugs.webkit.org/show_bug.cgi?id=151334
490
491         Reviewed by Simon Fraser.
492         
493         Make the graphics benchmark string table be an object of sub-objects. Each
494         sub-object represents an associative array, the key is the string name and
495         the value is the string data.
496
497         * Animometer/resources/extensions.js:
498         (ResultsDashboard.prototype.toJSON):
499         (ResultsTable.prototype._showGraph):
500         (ResultsTable.prototype._showJSON):
501         (ResultsTable.prototype._isNoisyMeasurement):
502         (ResultsTable.prototype._isNoisyTest):
503         (ResultsTable.prototype._showTest):
504         (ResultsTable.prototype._showSuite):
505         (ResultsTable.prototype._showIteration):
506         * Animometer/resources/sampler.js:
507         (Sampler.prototype.toJSON):
508         * Animometer/resources/strings.js:
509         * Animometer/runner/resources/animometer.js:
510         (window.benchmarkRunnerClient.didFinishLastIteration):
511         (window.suitesManager.updateLocalStorageFromJSON):
512         (window.benchmarkController.showResults):
513         (window.benchmarkController.showJson):
514         (window.benchmarkController.showTestGraph):
515         (window.benchmarkController.showTestJSON):
516         * Animometer/runner/resources/tests.js:
517         * Animometer/tests/resources/main.js:
518
519 2015-11-17  Said Abou-Hallawa  <sabouhallawa@apple.com>
520
521         Disable flattening the stage iframe of the graphics benchmark when running on iOS
522         https://bugs.webkit.org/show_bug.cgi?id=151361
523
524         Reviewed by Simon Fraser.
525         
526         Use fixed size for stage iframe of the graphics benchmark to disable
527         flattening the iframe while animating the particles. Also ensure the
528         bouncing particles do not go outside the iframe's boundaries.
529
530         * Animometer/runner/resources/animometer.css:
531         (section#running > #running-test > iframe):
532         (@media screen and (min-device-width: 1800px)):
533         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
534         (BouncingParticle.prototype.animate):
535
536 2015-11-17  Said Abou-Hallawa  <sabouhallawa@apple.com>
537
538         Use the media queries to dynamically set the stage for the graphics benchmark
539         https://bugs.webkit.org/show_bug.cgi?id=151327
540
541         Reviewed by Simon Fraser.
542
543         Clean setting the benchmark css rules by using the media queries. Accessing
544         document.stylesheets.cssRules seems to be unreliable. Fix the test harness
545         load event listener invocation. And also remove the options for normalizing
546         the stage resolution for retina display.
547
548         * Animometer/resources/extensions.js:
549         (window.DocumentExtension.insertCssRuleAfter): Deleted.
550         * Animometer/runner/animometer.html:
551         * Animometer/runner/resources/animometer.css:
552         (@media screen and (min-device-width: 1800px)):
553         * Animometer/runner/resources/animometer.js:
554         (window.sectionsManager.setupRunningSectionStyle):
555         (window.benchmarkController.initialize):
556         (window.sectionsManager.setupSectionStyle): Deleted.
557         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
558         (BouncingParticlesStage):
559         * Animometer/tests/text/layering-text.html:
560         * Animometer/tests/text/resources/layering-text.js:
561         (LayeringTextStage):
562         (LayeringTextStage.prototype._setFontSize): Deleted.
563
564 2015-11-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
565
566         Remove the option for animating using setInterval from the graphics benchmark
567         https://bugs.webkit.org/show_bug.cgi?id=151283
568
569         Reviewed by Darin Adler.
570         
571         Get rid of the option to run animation using setInterval().
572
573         * Animometer/tests/resources/main.js:
574         (Animator.prototype.animate):
575         (Benchmark):
576         (Benchmark.prototype.start):
577         (Animator.prototype.start): Deleted.
578
579 2015-11-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
580
581         Highlight the alarming test results in the graphics benchmark results page
582         https://bugs.webkit.org/show_bug.cgi?id=151286
583
584         Reviewed by Simon Fraser.
585         
586         When showing the results of a test in the graphics benchmark the following
587         criteria is going to be applied:
588         
589         1. If the standard deviation of the test complexity or the frame rate is
590            equal to or more than 10%, the standard deviation and the test name
591            will be displayed in red.
592         2. If the average frame rate is not in the range = [(desired_frame_rate - 2)
593            .. (desired_frame_rate + 2)], the average frame rate and the test name will
594            be displayed in red.
595
596         * Animometer/resources/extensions.js:
597         (ResultsTable.prototype._showHeaderRow):
598         (ResultsTable.prototype._showHeader):
599         (ResultsTable.prototype._showEmptyCell):
600         (ResultsTable.prototype._showText):
601         (ResultsTable.prototype._showFixedNumber):
602         (ResultsTable.prototype.):
603         (ResultsTable.prototype._showGraph):
604         (ResultsTable.prototype._showJSON):
605         (ResultsTable.prototype._isAlarmingMeasurement):
606         (ResultsTable.prototype._isAlarmingTestResults):
607         (ResultsTable.prototype._showEmptyCells):
608         (ResultsTable.prototype._showEmptyRow):
609         (ResultsTable.prototype._showTest):
610         (ResultsTable.prototype._showSuite):
611         (ResultsTable.prototype._showIteration):
612         (ResultsTable.prototype.showRecord):
613         (ResultsTable.prototype.showIterations):
614         (ResultsTable.prototype._showEmpty): Deleted.
615         * Animometer/runner/resources/animometer.js:
616         (window.benchmarkRunnerClient.didFinishLastIteration):
617         * Animometer/tests/resources/stage.js:
618         (StageBenchmark.prototype.showResults):
619
620 2015-11-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
621
622         Clean referencing the options object in the graphics benchmark
623         https://bugs.webkit.org/show_bug.cgi?id=151284
624
625         Reviewed by Simon Fraser.
626
627         Get rid of the Benchmark.options member and rely only on the private member
628         Benchmark._options. The animator need to have its own options member instead
629         of accessing it from its reference to Benchmark object.
630
631         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
632         (BouncingCanvasParticlesAnimator):
633         (BouncingCanvasParticlesBenchmark.prototype.createAnimator):
634         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
635         (BouncingParticle.prototype.animate):
636         (BouncingParticlesAnimator):
637         (BouncingParticlesBenchmark.prototype.createAnimator):
638         * Animometer/tests/examples/resources/canvas-electrons.js:
639         (CanvasElectronsStage.prototype.animate):
640         (CanvasElectronsAnimator):
641         (CanvasElectronsBenchmark.prototype.createAnimator):
642         (window.benchmarkClient.create):
643         * Animometer/tests/examples/resources/canvas-stars.js:
644         (CanvasStarsStage.prototype.animate):
645         (CanvasStarsAnimator):
646         (CanvasStarsBenchmark.prototype.createAnimator):
647         (window.benchmarkClient.create):
648         * Animometer/tests/resources/main.js:
649         (BenchmarkState.prototype.currentProgress):
650         (Animator):
651         (Animator.prototype.animate):
652         (Benchmark):
653         (Benchmark.prototype.update):
654         * Animometer/tests/resources/stage.js:
655         (Stage.prototype.clear):
656         (StageAnimator):
657         (StageBenchmark.prototype.createAnimator):
658         (StageBenchmark.prototype.tune):
659         (StageBenchmark.prototype.showResults):
660         * Animometer/tests/simple/resources/simple-canvas.js:
661         (SimpleCanvasStage.prototype.animate):
662         (SimpleCanvasAnimator):
663         (SimpleCanvasAnimator.prototype.animate):
664         (SimpleCanvasBenchmark.prototype.createAnimator):
665         * Animometer/tests/template/resources/template-canvas.js:
666         (TemplateCanvasStage.prototype.animate):
667         (TemplateCanvasBenchmark.prototype.createAnimator):
668         (window.benchmarkClient.create):
669
670 2015-11-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
671
672         Eliminate a request for layout every time an item is added to the stage of the graphics benchmark
673         https://bugs.webkit.org/show_bug.cgi?id=151289
674
675         Reviewed by Simon Fraser.
676         
677         Cache the stage size when it is created instead of requesting every time
678         an object is added via clientWidth and clientHeight.
679
680         * Animometer/resources/extensions.js:
681         (Insets.elementPadding):
682         * Animometer/tests/resources/stage.js:
683         (Stage):
684         (Stage.prototype.get size):
685
686 2015-11-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
687
688         Initialize the graphics benchmark's Kalman filter with estimated 60 FPS
689         https://bugs.webkit.org/show_bug.cgi?id=150965
690
691         Reviewed by Darin Adler.
692
693         This should give the benchmark more accurate reading at warmup time. And
694         hence we can safely reduce the test running time to be 10 seconds.
695
696         * Animometer/runner/animometer.html:
697         Add "defer" back when loading resources/animometer.js since this script
698         depends on many other scripts and we need to wait till the page is parsed.
699         Also change the default test interval to be 10 seconds.
700         
701         * Animometer/runner/resources/graph.js:
702         (graph): Make the test results curves smoother.
703         
704         * Animometer/tests/resources/main.js:
705         (Animator): Initialize the Kalman filter with 60 FPS which should be true
706         if the test page is empty.
707         
708         (Animator.prototype.animate):
709         * Animometer/tests/resources/math.js:
710         (KalmanEstimator): Fix the initial value of _vecX_est.
711             _vecX_est[0] = current FPS (= 60FPS when the test page is empty)
712             _vecX_est[1] = first time derivative of FPS (=0; FPS has been constant).
713             _vecX_est[2] = second time derivative of FPS (=0; since _vecX_est[1]=0).
714         (KalmanEstimator.prototype.estimate): Add some comments.
715
716 2015-11-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
717
718         Remove "defer" from the scripts' references in the graphics benchmark home page 
719         https://bugs.webkit.org/show_bug.cgi?id=150915
720
721         Reviewed by Simon Fraser.
722
723         It causes the benchmark to be very flakey.
724
725         * Animometer/runner/animometer.html:
726
727 2015-11-01  Said Abou-Hallawa  <sabouhallawa@apple,com>
728
729         Add an option to make the graphics benchmark runs a specific test with fixed complexity
730         https://bugs.webkit.org/show_bug.cgi?id=150529
731
732         Reviewed by Darin Adler.
733
734         Beside each test in the suites tree, we are going to show the complexity
735         arithmetic mean of the of the last run in an edit control. Based on a
736         new option these edit controls will all be visible or hidden. If they are
737         visible their values can be changed. The benchmark runner if it run in
738         the non-adaptive mode will set the complexity of the test to the passed
739         value and will not change it ever. The animator will animate the test and
740         frame rate will also be measured.
741
742         * Animometer/runner/animometer.html: Add a new option for the non-adaptive mode.
743         
744         * Animometer/runner/resources/animometer.css:
745         (section#home input[type="number"]): Define the width of all the edit control in the <home> section.
746         (section#home > suites input[type="number"]): The edit controls in the <suites> box will be right aligned and hidden by default.
747         (section#home > suites input[type="number"].selected): When the class "selected" is added, the edit controls will be visible.
748         (section#home > options > label > input[type="number"]): Deleted.
749         
750         * Animometer/runner/resources/animometer.js:
751         (window.benchmarkRunnerClient.didFinishLastIteration): Update the local storage with the results of each test.
752         (window.optionsManager._adaptiveTestElement): Returns the checkbox for setting the adaptive test option.
753         (window.suitesManager._editElement):  Returns the edit element associated with each test element in the suites tree.
754         (window.suitesManager._editsElements): Returns a list of all the elements in the <suites> box.
755         (window.suitesManager._localStorageNameForTest): Change this function to take strings.
756         (window.suitesManager._createTestElement): Adds an edit control beside each test.
757         (window.suitesManager.updateEditsElementsState): Adds/Removes the 'selected' class to/from all the tests edit elements.
758         (window.suitesManager.updateUIFromLocalStorage): Reads the edit control value from the local storage.
759         (window.suitesManager.updateLocalStorageFromUI): Saves the edit control value to the local storage.
760         (window.suitesManager.updateLocalStorageFromJSON): Saves the last run results to the local storage.
761         (window.benchmarkController.initialize): Shows/Hides the test edit controls based on the adaptive test option.
762         (window.benchmarkController.onChangeAdaptiveTestCheckbox): An onchange event handler for the adaptive test checkbox.
763         
764         * Animometer/tests/resources/main.js: 
765         (Benchmark.prototype.update): Fix the complexity of the test if the running mode is non-adaptive test and desired complexity is not zero.
766         (window.runBenchmark): Add the test complexity as a new benchmark option.
767
768 2015-11-01  Said Abou-Hallawa  <sabouhallawa@apple,com>
769
770         Make the size of the benchmark canvas adaptive to the screen size and screen resolution
771         https://bugs.webkit.org/show_bug.cgi?id=150530
772
773         Reviewed by Darin Adler.
774         
775         We want to set the size of the benchmark stage dynamically such that it
776         depends on the screen resolution and the device scale factor. This patch 
777         does more than that because the home page css was not done properly. To
778         use the flex box layout, the animometer.css has to be rewritten almost from
779         scratch. The suites tree has to be rewritten also because it was not collapsing
780         and with the flex box layout it was going outside of the window area. The 
781         options handling and the local storage handling had to be rewritten to
782         allow more flexibility with this patch and the future patches. The code
783         in animometer.js was reorganized into objects to allow distributing the code
784         nicely among separate entities.
785
786         * Animometer/resources/extensions.js:
787         (Point.elementClientSize): Returns the client size of an HTMLElement as a Point object.
788         (Insets.prototype.get width): Follow the function opening brace style guidelines.
789         (Insets.prototype.get height):
790         (Insets.prototype.get size): Returns the size of an Insets as a Point object.
791         
792         (window.DocumentExtension): Provides document helper functions. It should be assailable from the runner and the tests.
793         (window.DocumentExtension.createElement): Creates an HTMLElement given its name, attributes and parentElement. 
794         (window.DocumentExtension.createSvgElement): Creates an SVGElement given its name, attributes and parentElement (moved from utilities.js). 
795         (window.DocumentExtension.insertCssRuleAfter): Inserts a CSS rule after an exiting rule given its text.
796         
797         (ResultsTable.prototype._showHeader): Use DocumentExtension functions.
798         (ResultsTable.prototype._showGraph): Use DocumentExtension functions and create a real button for "Graph..." option.
799         (ResultsTable.prototype._showJSON): Use DocumentExtension functions and create a real button for "JSON..." option.
800         (Options): Deleted.
801         
802         * Animometer/runner/animometer.html: Restructure the page to use the flex box layout.
803         
804         * Animometer/runner/resources/animometer.css:
805         (html,body):
806         (button):
807         
808         (button.large-button):The large button appears in the animometer.html.
809         (button.large-button:active):
810         (button.large-button:disabled):
811         
812         (button.small-button): The small button appears in the results table.
813         (button.small-button:active):
814         
815         (.tree): The tree class is used to list the suites and their tests.
816         (.tree .expand-button): This button expands a tree element.
817         (.tree .expand-button ~ ul): Hide the children (<ul>...</ul>) of a parent node by default.
818         (.tree .expand-button:checked ~ ul): Show the children of a parent node only when checked.
819         (.tree ul): Hide the list bullets.
820         (.tree li): Indent every node in the tree relative to its parent.
821         (.tree ul li): Indent all the non top level nodes only (the tests nodes in our case).
822         (.tree > li:last-child): Do not indent the bottom of the last child node.
823         (.tree-label): Style for all the labels in the tree.
824         (label.tree-label): Style for the labels in the top level only (the suites nodes in our case).
825         (label.tree-label:before): Style the unchecked case of the expand-button.
826         (:checked ~ label.tree-label:before): Style the checked case of the expand-button.
827         
828         (table.results-table): The results table appears while running the test and at the end.
829         (.results-table td):
830         (.results-table th):
831         
832         (div.results-json): The JSON div appears per test or for the whole run.
833         
834         (main): This is the flex box container.
835         
836         (section): A section is displayed exclusively inside the <main>. It is hidden by default.
837         (section.selected): When it is selected, its layout is flex layout.
838         (section > footer): The header or the footer of a section should not take more than 15% of the container.
839         
840         (section#home): The home section has <suites> and <options> parts to be laid out in the middle.
841         (section#home > options): 
842         (section#home > suites): The <suites> should not take more than 40% of the width.
843         (section#home > options > label): The benchmark title.
844         (section#home > header > h2): The benchmark title.
845         (section#home > options > label > input[type="number"]): Sets the width of the option edit control.
846         
847         (section#running): The running section contain the runner <iframe> which takes the whole area of the <main>.
848         (section#running > #running-test): This is the <iframe> container.
849         (section#running > #running-test > iframe): The <iframe> is created by the runner for each test.
850         (section#running > #progress): This is the progress bar.
851         (section#running > #progress > #progress-completed): This is another element which grows while the runner is progressing.
852         (section#running > #record): This the container of the record results table which is shown while running a test.
853         
854         (section#results):
855         (section#json):
856         (section#test-json):
857         (section#test-graph): All these sections have the same layout. A <data> element is laid out between <header> and <footer>.
858
859         (section#results > data):
860         (section#json > data):
861         (section#test-json > data):
862         (section#test-graph > data): The <data> element should take 70% of the <section>.
863         
864         (section#test-graph > data > svg):
865         (.axis line):
866         (.left-samples): These styles are for the d3 graph.
867         
868         (section#test-json > data): This is the style of the JSON <data> element.
869         
870         (iframe): Deleted.
871         (label, p): Deleted.
872         (section > p): Deleted.
873         (section#home > p): Deleted.
874         (section#home > p:first-child): Deleted.
875         (#testContainer): Deleted.
876         (section#running #progress-completed): Deleted.
877         (section#results > table): Deleted.
878         (section#results > table td, th): Deleted.
879         (section#results > table tr.alt, td): Deleted.
880         (section#results > table th): Deleted.
881         (section#json > textarea): Deleted.
882         (.options): Deleted.
883         (.options p): Deleted.
884         (#suites ul): Deleted.
885         (#suites ul ul): Deleted.
886         (#suites ul ul input, #suites ul ul label): Deleted.
887         (#suites.showTests ul ul): Deleted.
888         (.column): Deleted.
889         (input[type="number"]): Deleted.
890         (.buttons): Deleted.
891         (.small-button): Deleted.
892         (#graphContainer): Deleted.
893         (.right-samples): Deleted.
894         (.sample-time): Deleted.
895         (.left-mean): Deleted.
896         (.right-mean): Deleted.
897         
898         * Animometer/runner/resources/animometer.js:
899         (window.benchmarkRunnerClient.initialize): Initialize the client object with the options and the suites.
900         (window.benchmarkRunnerClient.willStartFirstIteration): Use new css selectors for results and the record table.
901         (window.benchmarkRunnerClient.didFinishLastIteration): Move the code which sets the JSON text to sectionsManager.showJSON().
902         
903         (window.sectionsManager): Responsible of managing the <section>s elements inside animometer.html.
904         (window.sectionsManager._sectionHeaderH1Element): Return the <h1> inside the <header> of a given section.
905         (window.sectionsManager._sectionDataDivElement): Return the <div> inside the <data> of a given section.
906         (window.sectionsManager.showScore): Show the score of the last benchmark run.
907         (window.sectionsManager.showTestName): Show the test name for detailed results <section>.
908         (window.sectionsManager.showJSON): Shows the JSON text of the last benchmark or for a specific test.
909         (window.sectionsManager.showSection): Shows a specific <section> in the <main> container.
910         (window.sectionsManager.setupSectionStyle): Sets css attributes for all the <section>s.
911         (window.sectionsManager.setupRunningSectionStyle): Sets the css attributes for the running <section> only.
912         
913         (window.optionsManager): Responsible of managing the user options and streaming them to/form the localStorage.
914         (window.optionsManager._optionsElements): Returns the children <input> elements of the <options>.
915         (window.optionsManager.updateUIFromLocalStorage): Restore the values of the <options> UI elements from the local storage.
916         (window.optionsManager.updateLocalStorageFromUI): Saves the values of the <options> UI elements to the local storage.
917         
918         (window.suitesManager): Responsible of managing the user suites and streaming them to/form the localStorage.
919         (window.suitesManager._treeElement): Returns the suites tree container element.
920         (window.suitesManager._suitesElements): Returns a list of the suites elements.
921         (window.suitesManager._checkboxElement): Returns the checkbox element of a given suite.
922         (window.suitesManager._localStorageNameForTest): Generates a string for the tuple <suite, test> to be saved in the localStorage.
923         (window.suitesManager._updateSuiteCheckboxState): Updates the state of a suite checkbox from the state of its tests' checkboxes.
924         (window.suitesManager._updateStartButtonState): Updates the state of the start button from the state of the suites' checkboxes.
925         (window.suitesManager._onChangeSuiteCheckbox): Called when a suite checkbox is clicked.
926         (window.suitesManager._onChangeTestCheckbox): Called when a test checkbox is clicked.
927         (window.suitesManager._createSuiteElement): Creates suite node in the suites tree.
928         (window.suitesManager._createTestElement): Creates test node in the suites tree.
929         (window.suitesManager.createElements): Creates the suites tree dynamically from the array Suites.
930         (window.suitesManager.updateUIFromLocalStorage): Restore the values of the <suites> UI elements from the local storage.
931         (window.suitesManager.updateLocalStorageFromUI): aves the values of the <suites> UI elements to the local storage.
932         
933         (window.benchmarkController): This is the UI controller of the animometer.html page.
934         (window.benchmarkController.initialize): Called when the animometer.html page is loaded.
935         (window.benchmarkController._runBenchmark): Starts a benchmark run.
936         (window.benchmarkController.startTest): Called when the "Start Test" button is clicked.
937         (window.benchmarkController.showResults): Called at the end of the test to show the final results.
938         (window.benchmarkController.showJson): Called from the results page to show the JSON of the last benchmark run.
939         (window.benchmarkController.showTestGraph): Called from the results the table to show a graph for the samples of a specific test.
940         (window.benchmarkController.showTestJSON): Called from the results the table to show a JSON for the samples of a specific test.
941         
942         (showSection): Deleted.
943         (startTest): Deleted.
944         (showResults): Deleted.
945         (showJson): Deleted.
946         (showTestGraph): Deleted.
947         (showTestJSON): Deleted.
948         (initialize.toggleTestsCheckbox.onchange): Deleted.
949         (initialize): Deleted.
950         (updateSuiteSelection): Deleted.
951         (updateTestSelection): Deleted.
952         (updateSuiteCheckbox): Deleted.
953         (localStorageNameForTest): Deleted.
954         (populateSettings.): Deleted.
955         (populateSettings): Deleted.
956         
957         * Animometer/runner/resources/benchmark-runner.js:
958         (BenchmarkRunner): Pass the frameContainer element to the BenchmarkRunner.
959         (BenchmarkRunner.prototype._appendFrame): Remove unused parameter unwanted styling code.
960         (BenchmarkRunner.prototype.runMultipleIterations):  Use the this._client.iterationCount instead of passing it as a parameter also.
961
962         * Animometer/runner/resources/graph.js:
963         (graph): Calculate the size of the chart from the container element.
964         
965         * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
966         (BouncingSvgImage):
967         * Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js:
968         (BouncingSvgParticlesStage.prototype._createDefs):
969         (BouncingSvgParticlesStage.prototype._createClipStar):        
970         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
971         (BouncingSvgShape.prototype._createShape):
972         (BouncingSvgShapesStage.prototype.createGradient):
973         Call DocumentExtension.createSvgElement() instead of calling Utilities.createSvgElement().
974         
975         * Animometer/tests/resources/main.js:
976         (Animator.prototype.animate):
977         (Benchmark):
978         (Benchmark.prototype.update):
979         * Animometer/tests/resources/stage.js:
980         (StageBenchmark.prototype.showResults):
981         Rename the options to match the <input> ids in animometer.html.
982         
983         * Animometer/tests/resources/utilities.js:
984         (window.Utilities.createSvgElement): Deleted.
985         
986         * Animometer/tests/text/layering-text.html:
987         * Animometer/tests/text/resources/layering-text.js:
988         (LayeringTextStage):
989         (LayeringTextStage.prototype._setFontSize): Sets the size of the text dynamically such that they all fit in one stage.
990
991 2015-10-29  Simon Fraser  <simon.fraser@apple.com>
992
993         Animometer computes frame rate incorrectly
994         https://bugs.webkit.org/show_bug.cgi?id=150698
995
996         Reviewed by Tim Horton.
997         
998         The existing code incremented this._frameCount after checking against this._dropFrameCount.
999         This has the effect of setting this._measureTimeOffset one frame too late, so
1000         we were measuring only two frames, not three, and thus computing an incorrect fps.
1001
1002         * Animometer/tests/resources/main.js:
1003         (Animator.prototype.animate):
1004
1005 2015-10-27  Jon Lee  <jonlee@apple.com>
1006
1007         Add an option to make the graphics benchmark runs a specific test
1008         https://bugs.webkit.org/show_bug.cgi?id=150528
1009         rdar://problem/23246614
1010
1011         Reviewed by Zalan Bujtas.
1012
1013         Add a checkbox that lets the user list all of the available tests, and select
1014         the ones to run repeatedly. The test checkboxes will update the state of the suite
1015         checkbox. The selected tests are stored in localStorage to make it easy to do
1016         repeated runs.
1017
1018         * Animometer/runner/animometer.html: Add a checkbox to show individual tests.
1019         Update other markup.
1020         * Animometer/runner/resources/animometer.css: Make the settings area a little wider
1021         to accommodate the longer names of the tests
1022         * Animometer/runner/resources/animometer.js:
1023         (startBenchmark): Change the way that the suites are fed into the benchmark
1024         runner. Go through each of the suites and their tests, and create a new Suite
1025         with just the enabled tests. While enumerating store the enabled tests into
1026         localStorage.
1027         (initialize): Initialization routine (taking over populateSettings). When the
1028         checkbox for showing tests is toggled, add or remove a class on #suites to show
1029         the individual tests.
1030         (updateSuiteSelection): Called whenever the user toggles the checkbox for a suite.
1031         Either select all or none of the tests.
1032         (updateTestSelection): Called whenever the user toggles the checkbox for a test.
1033         (updateSuiteCheckbox): Update the state of the test's suite's checkbox to
1034         indeterminate if there is at least one enabled test, unchecked if none are selected,
1035         and checked if all are selected.
1036         (localStorageNameForTest): Helper function to get the name of the test to use as
1037         a key to localStorage.
1038         (populateSettings): Add the tests for each suite into an inner list.
1039
1040 2015-10-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
1041
1042         Add an option to output the results of the graphics benchmark in JSON format
1043         https://bugs.webkit.org/show_bug.cgi?id=150484
1044         <rdar://problem/23243721>
1045
1046         Reviewed by Darin Adler.
1047
1048         * Animometer/resources/extensions.js:
1049         (ResultsDashboard): A new class to hold the iterations results.
1050         (ResultsDashboard.prototype.push): Appends an iteration results;
1051         (ResultsDashboard.prototype.toJSON): Converts the iterations results to JSON format.
1052
1053         (RecordTable.prototype.clear): Clears the results table.
1054         (RecordTable.prototype._showTitles): Shows the header titles and appends the sub-titles to a queue.
1055         (RecordTable.prototype._showHeader): Shows the table header titles.
1056         (RecordTable.prototype._showEmpty): Shows an empty table cell.
1057         (RecordTable.prototype._showValue): Shows a number value in the results table.
1058         (RecordTable.prototype._showSamples): Shows a button for the sampled data graph.
1059         (RecordTable.prototype._showTest): Shows the results of a single test.
1060         (RecordTable.prototype._showSuite): Shows the results of a single suite.
1061         (RecordTable.prototype.showRecord): Shows a single iteration for a single test.
1062         (RecordTable.prototype.showIterations): Shows the results of all the suites of the iterations. 
1063         
1064         (ResultsTable): RecordTable was renamed to ResultsTable.
1065         (ResultsTable.prototype.clear): Clears the table element.
1066         (ResultsTable.prototype._showHeaderRow): Shows a row in the results table header.
1067         (ResultsTable.prototype._showHeader): Shows the results table header.
1068         (ResultsTable.prototype._showEmpty): Shows an empty table cell.
1069         (ResultsTable.prototype._showText): Shows a string in a new table cell.
1070         (ResultsTable.prototype._showFixedNumber): Shows a number in a new table cell.
1071         (ResultsTable.prototype._showGraph): Shows a button for the sampled data graph.
1072         (ResultsTable.prototype._showJSON): Shows a button for the sampled data JSON.
1073         (ResultsTable.prototype._showTest): Shows the results of a single test.
1074         (ResultsTable.prototype._showSuite): Shows the results of a single suite.
1075         (ResultsTable.prototype._showIteration): Shows the results of a single iteration.
1076         (ResultsTable.prototype.showRecord): Shows a single iteration for a single test.
1077         (ResultsTable.prototype.showIterations): Shows all the results.
1078         (RecordTable): Deleted.
1079         (RecordTable.prototype.clear): Deleted.
1080         (RecordTable.prototype._showTitles): Deleted.
1081         (RecordTable.prototype._showHeader): Deleted.
1082         (RecordTable.prototype._showEmpty): Deleted.
1083         (RecordTable.prototype._showValue): Deleted.
1084         (RecordTable.prototype._showSamples): Deleted.
1085         (RecordTable.prototype._showTest): Deleted.
1086         (RecordTable.prototype._showSuite): Deleted.
1087         (RecordTable.prototype.showRecord): Deleted.
1088         (RecordTable.prototype.showIterations): Deleted.
1089         
1090         * Animometer/resources/sampler.js:
1091         (Sampler.prototype.startSampling): Use forEach.
1092         (Sampler.prototype.sample): Use forEach.
1093         (Sampler.prototype.toJSON): Converts the sampler data to JSON format.
1094         
1095         * Animometer/resources/strings.js: Added.
1096         This new file will be used to associate the strings used by the benchmark
1097         with IDs. A string can be changed in one place without having to change
1098         all the instances of this string in multiple files. There two groups of
1099         strings in this file. The first one is used by the UI elements and the second
1100         group is used when constructing the results JSON.
1101         
1102         * Animometer/runner/animometer.html:
1103         * Animometer/runner/resources/animometer.css:
1104         
1105         * Animometer/runner/resources/animometer.js:
1106         (window.benchmarkRunnerClient.willAddTestFrame):
1107         (window.benchmarkRunnerClient.willStartFirstIteration):
1108         (window.benchmarkRunnerClient.didRunSuites):
1109         (window.benchmarkRunnerClient.didFinishLastIteration):
1110         Make benchmarkRunnerClient uses ResultsDashboard instead of _iterationsSamplers
1111         Get the JSON from ResultsDashboard.toJSON() and pass it to ResultsTable.showIterations().
1112         Also set the textContent of the "#json" textarea with the results JSON.
1113         
1114         (showResults): Delete unneeded code.
1115         (showJson): Shows the "json" section.
1116         (showTestGraph): Rename showGraph() to be showTestGraph().
1117         (showTestJSON): Shows the JSON of a single testResults.
1118         (showGraph): Deleted.
1119         
1120         * Animometer/runner/resources/tests.js:
1121         Use the string table instead of putting literal strings.
1122
1123         * Animometer/tests/resources/stage.js:
1124         (StageBenchmark.prototype.showResults):
1125         Fix the parameters which are passed to RecordTable.showRecord().
1126         
1127         * Animometer/tests/bouncing-particles/bouncing-canvas-images.html:
1128         * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html:
1129         * Animometer/tests/bouncing-particles/bouncing-css-images.html:
1130         * Animometer/tests/bouncing-particles/bouncing-css-shapes.html:
1131         * Animometer/tests/bouncing-particles/bouncing-svg-images.html:
1132         * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html:
1133         * Animometer/tests/examples/canvas-electrons.html:
1134         * Animometer/tests/examples/canvas-stars.html:
1135         * Animometer/tests/simple/simple-canvas-paths.html:
1136         * Animometer/tests/template/template-canvas.html:
1137         * Animometer/tests/template/template-css.html:
1138         * Animometer/tests/template/template-svg.html:
1139         * Animometer/tests/text/layering-text.html:
1140         Include the new strings.js file in all the test files.
1141
1142 2015-10-12  Jon Lee  <jonlee@apple.com>
1143
1144         Add canvas line dash test
1145         https://bugs.webkit.org/show_bug.cgi?id=150078
1146         <rdar://problem/23082347>
1147
1148         Reviewed by Dean Jackson.
1149
1150         * Animometer/runner/resources/tests.js: Add line dash test.
1151         * Animometer/tests/simple/resources/simple-canvas-paths.js:
1152         (CanvasLineDashStage): Create a new stage with a default dash pattern and stroke style.
1153         Maintain a step which will animate the dash.
1154         (CanvasLineDashStage.prototype.animate): Render the line path with the dash. Increment
1155         the dash offset to animate.
1156         (CanvasPathBenchmark.prototype.createStage): Add the test.
1157
1158 2015-10-12  Jon Lee  <jonlee@apple.com>
1159
1160         Add canvas line path tests
1161         https://bugs.webkit.org/show_bug.cgi?id=150076
1162         <rdar://problem/23082285>
1163
1164         Reviewed by Dean Jackson.
1165
1166         * Animometer/runner/resources/tests.js: Add new line path tests, with different
1167         line joins.
1168         * Animometer/tests/simple/resources/simple-canvas-paths.js:
1169         (CanvasLinePathStage): The stage is the same as the SimpleCanvasPathStrokeStage
1170         but sets the lineJoin on the context.
1171         (CanvasPathBenchmark.prototype.createStage): Add the tests.
1172
1173 2015-10-12  Jon Lee  <jonlee@apple.com>
1174
1175         Add missing paint objects for arc and arcTo fills
1176         https://bugs.webkit.org/show_bug.cgi?id=150075
1177         <rdar://problem/23082233>
1178
1179         Reviewed by Dean Jackson.
1180
1181         * Animometer/tests/simple/resources/simple-canvas-paths.js: Add missing paint objects
1182         for arcTo and arc segment fills.
1183         (CanvasArcToSegmentFill):
1184         (CanvasArcToSegmentFill.prototype.draw):
1185         (CanvasArcSegmentFill):
1186         (CanvasArcSegmentFill.prototype.draw):
1187
1188 2015-10-12  Jon Lee  <jonlee@apple.com>
1189
1190         Add canvas line segment tests
1191         https://bugs.webkit.org/show_bug.cgi?id=150073
1192         <rdar://problem/23082138>
1193
1194         Reviewed by Dean Jackson.
1195
1196         * Animometer/runner/resources/tests.js: Add new line segment tests, with different
1197         line caps.
1198         * Animometer/tests/simple/resources/simple-canvas-paths.js:
1199         (CanvasLineSegment): Add new line segment paint object.
1200         (CanvasLineSegmentStage): Create a new stage that sets the lineCap.
1201
1202 2015-10-12  Jon Lee  <jonlee@apple.com>
1203
1204         Add canvas path fill tests
1205         https://bugs.webkit.org/show_bug.cgi?id=150071
1206         <rdar://problem/23082001>
1207
1208         Reviewed by Dean Jackson.
1209
1210         * Animometer/runner/resources/tests.js: Add new pathTypes for path fills.
1211         * Animometer/tests/simple/resources/simple-canvas-paths.js:
1212         (CanvasLinePoint): Add basic point for a line, and call lineTo.
1213         (SimpleCanvasPathFillStage): Add a new stage similar to SimpleCanvasPathStrokeStage.
1214         (CanvasPathBenchmark.prototype.createStage): Add the tests.
1215
1216 2015-10-12  Jon Lee  <jonlee@apple.com>
1217
1218         Add canvas path tests
1219         https://bugs.webkit.org/show_bug.cgi?id=150067
1220         rdar://problem/23081463
1221
1222         Reviewed by Dean Jackson.
1223
1224         * Animometer/runner/resources/tests.js: Add a quadratic and bezier path test.
1225
1226         * Animometer/tests/simple/resources/simple-canvas.js:
1227         (SimpleCanvasStage.prototype.tune): This kind of test joins all of the segments
1228         into one long path, and tries to render that one path. Random points make it
1229         difficult to tell what is going on, so add a parameter to the constructor to
1230         confine the area where the random coordinates can land. The more complicated the
1231         case is, the larger an area the path will cover. Add an artificial minimum so
1232         that the first 200 points aren't confined to a space that is too small.
1233
1234         * Animometer/tests/simple/resources/simple-canvas-paths.js:
1235         (SimpleCanvasPathStrokeStage): Add a new kind of stage that inherits from
1236         SimpleCanvasStage. Each time the frame animates a random line width and stroke
1237         color are chosen. The path setup is done outside of each paint object.
1238         (CanvasQuadraticPoint): This point just calls quadraticCurveTo.
1239         (CanvasPathBenchmark.prototype.createStage): Add the tests.
1240
1241 2015-10-12  Jon Lee  <jonlee@apple.com>
1242
1243         Add basic canvas tests
1244         https://bugs.webkit.org/show_bug.cgi?id=150066
1245         rdar://problem/23081143
1246
1247         Reviewed by Dean Jackson.
1248
1249         This adds a new test suite that will cover all of the path-based canvas calls.
1250         The patch will be divided up to cover tests with similar techniques.
1251
1252         The simplest version uses a SimpleCanvasStage.
1253
1254         * Animometer/runner/resources/tests.js: Add tests for quadratic, bezier, arcTo,
1255         arc, and rect segments. Also include arcTo, arc, and rect fills.
1256         * Animometer/tests/resources/stage.js:
1257         (Stage.prototype.randomBool): Added for counterclockwise property for arc segments.
1258         (Stage.prototype.randomInt): Fix how values are rounded, used by randomBool. It should
1259         round instead of flooring everything.
1260         * Animometer/tests/simple/resources/simple-canvas.js: Added. Defines common classes
1261         used by all simple canvas tests. The page reads best bottom to top.
1262         (SimpleCanvasStage): Basic stage. Pass a canvasObject which will be used to create new
1263         objects as needed in tune().
1264         (SimpleCanvasStage.prototype.tune): Modeled on other tests. Adds and removed objects
1265         as specified by the provided |count|.
1266         (SimpleCanvasStage.prototype.animate): Iterate over all the objects and ask them to draw.
1267         There is no "animating" of the objects; they will just paint statically on the canvas.
1268         (SimpleCanvasAnimator): Basic animator clears the canvas prior to painting.
1269         (SimpleCanvasBenchmark): Hard-code the feedback loop parameters instead of including
1270         them in the query parameters to the test URLs.
1271         (SimpleCanvasBenchmark.prototype.createAnimator):
1272         * Animometer/tests/simple/simple-canvas-paths.html: Added.
1273
1274         * Animometer/tests/simple/resources/simple-canvas-paths.js: Added. There is no "animating"
1275         of these objects--they just paint statically on the canvas.
1276         (CanvasQuadraticSegment): Paint a quadratic segment stroke.
1277         (CanvasBezierSegment): Paint a bezier segment stroke.
1278         (CanvasArcToSegment): Paint an arcTo stroke.
1279         (CanvasArcSegment): Paint an arc stroke.
1280         (CanvasRect): Paint a rect.
1281         (CanvasRectFill): Paint a filled rect.
1282
1283         (CanvasPathBenchmark):
1284         (CanvasPathBenchmark.prototype.createStage): Look for the pathType and create the
1285         stage using the right paint object.
1286         (window.benchmarkClient.create):
1287
1288 2015-10-12  Jon Lee  <jonlee@apple.com>
1289
1290         Refactor tune() to pass in an integer-based count
1291         https://bugs.webkit.org/show_bug.cgi?id=150060
1292         <rdar://problem/23079425>
1293
1294         Reviewed by Dean Jackson.
1295
1296         All of the tune functions do an initial step of flooring the
1297         # of painting objects to add or remove. Factor that out since
1298         the complexity of all of these tests is always expressed in terms
1299         of countable items.
1300
1301         * Animometer/tests/resources/main.js:
1302         (Benchmark.prototype.update): Update the tuneValue.
1303
1304         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
1305         (BouncingParticlesStage.prototype.tune): Remove the count adjustment.
1306         * Animometer/tests/examples/resources/canvas-electrons.js:
1307         (CanvasElectronsStage.prototype.tune): Ditto.
1308         * Animometer/tests/examples/resources/canvas-stars.js:
1309         (CanvasStarsStage.prototype.tune): Ditto.
1310         * Animometer/tests/text/resources/layering-text.js:
1311         (LayeringTextStage.prototype.tune): Ditto.
1312
1313 2015-10-12  Jon Lee  <jonlee@apple.com>
1314
1315         Store test-interval in localStorage
1316         https://bugs.webkit.org/show_bug.cgi?id=150055
1317         <rdar://problem/23078879>
1318
1319         Reviewed by Dean Jackson.
1320
1321         * Animometer/runner/resources/animometer.js:
1322         (populateSettings): Keep track of the specified test interval in localStorage
1323         to make it easy to repeat a test suite.
1324
1325 2015-10-12  Jon Lee  <jonlee@apple.com>
1326
1327         Remove "../tests/" from the URLs of all tests
1328         https://bugs.webkit.org/show_bug.cgi?id=150054
1329         <rdar://problem/23078784>
1330
1331         Reviewed by Dean Jackson.
1332
1333         Presumably all tests will be running from the tests/ directory,
1334         so we don't have to specify it in all of the test URLs.
1335
1336         * Animometer/runner/resources/benchmark-runner.js:
1337         (BenchmarkRunnerState.prototype.prepareCurrentTest): Prepend
1338         "../tests/" to all tests.
1339         * Animometer/runner/resources/tests.js: Remove "../tests/" from
1340         all URLs.
1341
1342 2015-10-12  Jon Lee  <jonlee@apple.com>
1343
1344         Refactor test suites to a separate class.
1345         https://bugs.webkit.org/show_bug.cgi?id=150053
1346         <rdar://problem/23078645>
1347
1348         Reviewed by Dean Jackson.
1349
1350         Create a Suite class to refactor out prepare() and run().
1351         Generate the checkboxes representing the suites using Suites
1352         instead of maintaining a separate list. Also, save the
1353         selections out to localStorage.
1354
1355         * Animometer/runner/animometer.html: Remove the explicitly listed
1356         suites. These will be generated from Suites instead.
1357         * Animometer/runner/resources/animometer.js:
1358         (populateSettings): Iterate through Suites, and create the
1359         label and checkbox. Attach the Suite object to the checkbox so
1360         when the benchmark is started, we get direct access. Initialize
1361         the checkmark based on its value in localStorage. Set this to
1362         run when DOMContentLoaded is dispatched.
1363         (startBenchmark): Grab all of the checkboxes, inspect their
1364         values, add it to enabledSuites if selected. Remember whether
1365         the suite was enabled in localStorage, so that it's easy to do
1366         repeated runs.
1367         * Animometer/runner/resources/tests.js:
1368         (Suite): Create a new Suite class. Refactor out prepare() and
1369         run(), since all of them have the same implementation. Populate
1370         Suites with Suite instances instead of generic objects.
1371
1372 2015-10-12  Jon Lee  <jonlee@apple.com>
1373
1374         Update graph styles for legibility.
1375         https://bugs.webkit.org/show_bug.cgi?id=150052
1376         <rdar://problem/23078503>
1377
1378         Reviewed by Dean Jackson.
1379
1380         * Animometer/runner/resources/animometer.css: Update colors and
1381         stroke thicknesses to make the graphs easier to read.
1382         (.smaple-time): Correct to .sample-time
1383         * Animometer/runner/resources/graph.js:
1384         (graph): Ditto.
1385
1386 2015-10-12  Jon Lee  <jonlee@apple.com>
1387
1388         Update graph styles for legibility.
1389         https://bugs.webkit.org/show_bug.cgi?id=150052
1390         <rdar://problem/23078503>
1391
1392         Reviewed by Dean Jackson.
1393
1394         * Animometer/runner/resources/animometer.css: Update colors and
1395         stroke thicknesses to make the graphs easier to read.
1396         (.smaple-time): Correct to .sample-time
1397         * Animometer/runner/resources/graph.js:
1398         (graph): Ditto.
1399
1400 2015-10-12  Filip Pizlo  <fpizlo@apple.com>
1401
1402         Unreviewed, revert an unintended commit.
1403
1404         * JetStream/Octane2/crypto.js:
1405         (montRevert):
1406         (montReduce):
1407
1408 2015-10-05  Said Abou-Hallawa  <sabouhallawa@apple.com>
1409
1410         Add a graphics benchmark
1411         https://bugs.webkit.org/show_bug.cgi?id=149053
1412         <rdar://problem/18984169>
1413
1414         Reviewed by Dean Jackson.
1415
1416         Instead of measuring the FPS of the animation, this benchmark measures the
1417         test complexity when rendering at a set-point FPS which should be lower
1418         than 60 FPS. This benchmark tries to stay at the set-point FPS by using
1419         a closed loop control system PID function. The gain of the system is passed
1420         as a parameter when running the test. Measuring the FPS faithfully results
1421         very fluctuating values. A Kalman filter is used to give a better estimate
1422         for the current FPS.
1423
1424         The animation of the tests is done manually. requestAnimationFrame() is
1425         called with a callback. Inside this callback, the test is animating by
1426         changing the positions of the elements inside the page. The test complexity
1427         may change also if the current FPS is not equal to the desired FPS.
1428
1429         In this patch, the benchmark and the tests are included. The shared code
1430         and the tests runner are included in separate patches.
1431
1432         * Animometer/runner/animometer.html:
1433         * Animometer/runner/resources/animometer.js:
1434         Add two new examples for more complex animation techniques.
1435         Add an option to show/hide the test running results which is off by default.
1436
1437         * Animometer/runner/resources/tests.js: Added.
1438         (suiteFromName): Returns a suite given its name.
1439         (testFromName): Returns a test given its suite and name.
1440
1441         * Animometer/tests: Added.
1442         This directory includes all the test suites to be run by the benchmark.
1443         runner. All the tests should try to run on three stages: CSS, canvas and
1444         SVG.
1445         
1446         * Animometer/tests/bouncing-particles: Added.
1447         * Animometer/tests/bouncing-particles/resources: Added.
1448         The bouncing particles test is an example of a simple animation technique.
1449         
1450         * Animometer/tests/bouncing-particles/bouncing-canvas-images.html: Added.
1451         * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html: Added.
1452         * Animometer/tests/bouncing-particles/bouncing-css-images.html: Added.
1453         * Animometer/tests/bouncing-particles/bouncing-css-shapes.html: Added.
1454         * Animometer/tests/bouncing-particles/bouncing-svg-images.html: Added.
1455         * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html: Added.
1456         Bouncing particles test pages.
1457
1458         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js: Added.
1459         (BouncingParticle): Base class for a bouncing particle.
1460         (BouncingParticle.prototype.center): Returns the center point or the particle.
1461         (BouncingParticle.prototype.animate): Moves the particle based on its current position, angle and velocity.
1462         
1463         (BouncingParticlesAnimator): A sub class of Animator.
1464         
1465         (BouncingParticlesStage): Represents the container of all the bouncing particles.
1466         (BouncingParticlesStage.prototype.parseShapeParamters): Gets the shape parameters for shape animating tests.
1467         (BouncingParticlesStage.prototype.randomRotater): Creates a rotater for the particles.
1468         (BouncingParticlesStage.prototype.animate): Animates all the particles.
1469         (BouncingParticlesStage.prototype.tune): Changes the test by adding or removing particles.
1470         
1471         (BouncingParticlesBenchmark): Runs the benchmark for bouncing particles test.
1472         (BouncingParticlesBenchmark.prototype.createAnimator): Creates an animator of type BouncingParticlesAnimator.
1473
1474         * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js: Added.
1475         (BouncingCssShape): A sub class of BouncingParticle for animating CSS shapes.
1476         (BouncingCssShape.prototype._createSpan): Creates a <span> element and takes the shape and clipping classes into consideration.
1477         (BouncingCssShape.prototype._move): Moves the particle to a new location. Apply transform since it does not require layout.
1478         (BouncingCssShape.prototype.animate): Rotates and moves the shape to a new location.
1479         
1480         (BouncingCssShapesStage): A sub class of BouncingParticlesStage for animating CSS shapes.
1481         (BouncingCssShapesStage.prototype.createParticle): Creates a particle of type BouncingCssShape.
1482         (BouncingCssShapesStage.prototype.particleWillBeRemoved): Removes the corresponding element form the parent children list.
1483         
1484         (BouncingCssShapesBenchmark): A sub class of BouncingParticlesBenchmark for animating CSS shapes.
1485         (BouncingCssShapesBenchmark.prototype.createStage): Creates a stage of type BouncingCssShapesStage.
1486         (window.benchmarkClient.create): Creates a benchmark of type BouncingCssShapesBenchmark.
1487         
1488         * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js: Added.
1489         (BouncingCssImage): A sub class of BouncingParticle for animating CSS images.
1490         (BouncingCssImage.prototype._move): Move the particle to a new location. Apply transform since it does not require layout.
1491         (BouncingCssImage.prototype.animate): Rotates and moves the shape to a new location.
1492         
1493         (BouncingCssImagesStage): A sub class of BouncingParticlesStage for animating CSS images.
1494         (BouncingCssImagesStage.prototype.createParticle): Creates a particle of type BouncingCssImage.
1495         (BouncingCssImagesStage.prototype.particleWillBeRemoved): Removes the corresponding element form the parent children list.
1496         
1497         (BouncingCssImagesBenchmark): A sub class of BouncingParticlesBenchmark for animating CSS images.
1498         (BouncingCssImagesBenchmark.prototype.createStage): Creates a stage of type BouncingCssImagesStage.
1499         (window.benchmarkClient.create): Creates a benchmark of type BouncingCssImagesBenchmark.
1500         
1501         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js: Added.
1502         (BouncingCanvasParticle): A base sub-class of BouncingParticle for animating canvas particles.
1503         (BouncingCanvasParticle.prototype._applyRotation): Apply the particle rotation-around-center transform to the canvas context.
1504         (BouncingCanvasParticle.prototype._applyClipping): Apply the particle clipping to the canvas context.
1505         (BouncingCanvasParticle.prototype._draw): A non-implemented version of the drawing function.
1506         (BouncingCanvasParticle.prototype.animate): Carries out all the steps to redraw the canvas particle.
1507         
1508         (BouncingCanvasParticlesStage): A base sub-class of BouncingParticlesStage for animating canvas particles.
1509         
1510         (BouncingCanvasParticlesAnimator): A concrete sub-class of BouncingParticlesAnimator for animating canvas particles.
1511         (BouncingCanvasParticlesAnimator.prototype.animate): Overrides the base class method to clear the canvas before redrawing the stage.
1512         
1513         (BouncingCanvasParticlesBenchmark): A base sub-class of StageBenchmark for animating canvas particles.
1514         (BouncingCanvasParticlesBenchmark.prototype.createAnimator): Creates the canvas particles animator.
1515         
1516         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js: Added.
1517         (BouncingCanvasShape): A concrete sub-class of BouncingCanvasParticle for animating canvas shapes.
1518         (BouncingCanvasShape.prototype._applyFill): Sets the fillStyle in the canvas context.
1519         (BouncingCanvasShape.prototype._drawShape): Carries out the actual drawing.
1520         (BouncingCanvasShape.prototype._draw): Carries out all the steps to draw the shape.
1521         
1522         (BouncingCanvasShapesStage): A concrete sub-class of BouncingCanvasParticle for animating canvas shapes.
1523         (BouncingCanvasShapesStage.prototype.createParticle): Creates a particle of type BouncingCanvasShape.
1524         
1525         (BouncingCanvasShapesBenchmark): A concrete sub-class of BouncingCanvasParticlesBenchmark for animating canvas shapes.
1526         (BouncingCanvasShapesBenchmark.prototype.createStage): Creates a stage of type BouncingCanvasShapesStage.
1527         (window.benchmarkClient.create): Creates a benchmark of type BouncingCanvasShapesBenchmark.
1528
1529         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js: Added.
1530         (BouncingCanvasImage): A concrete sub-class of BouncingCanvasParticle for animating canvas images.
1531         (BouncingCanvasImage.prototype._draw): Draws an image on the context of a canvas.
1532         
1533         (BouncingCanvasImagesStage): A concrete sub-class of BouncingCanvasParticlesBenchmark for animating canvas images.
1534         (BouncingCanvasImagesStage.prototype.createParticle): Creates a particle of type BouncingCanvasImage.
1535         
1536         (BouncingCanvasImagesBenchmark): A concrete sub-class of BouncingCanvasParticlesBenchmark for animating canvas images.
1537         (BouncingCanvasImagesBenchmark.prototype.createStage): Creates a stage of type BouncingCanvasImagesStage.
1538         (window.benchmarkClient.create): Creates a benchmark of type BouncingCanvasImagesBenchmark.
1539
1540         * Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js: Added.
1541         (BouncingSvgParticle): A base sub-class of BouncingParticle for animating SVG particles.
1542         (BouncingSvgParticle.prototype._applyClipping): Apply the particle clipping by setting the 'clip-path' attribute of the SVGElement.
1543         (BouncingSvgParticle.prototype._move): Moves the particle to a new location. Apply transform since it does not require layout.
1544         (BouncingSvgParticle.prototype.animate): Rotates and moves the shape to a new location.
1545         (BouncingSvgParticlesStage): A sub class of BouncingParticlesStage for animating SVGElements.
1546         (BouncingSvgParticlesStage.prototype._createDefs): Creates an SVGDefsElement.
1547         (BouncingSvgParticlesStage.prototype._ensureDefsIsCreated): Ensures there is only one SVGDefsElement is created.
1548         (BouncingSvgParticlesStage.prototype._createClipStar): Creates an SVGClipPathElement and sets its 'd' attribute to a star like shape.
1549         (BouncingSvgParticlesStage.prototype.ensureClipStarIsCreated): Ensure there is only one star SVGClipPathElement is created.
1550         (BouncingSvgParticlesStage.prototype.particleWillBeRemoved): Remove the corresponding element form the parent children list.
1551
1552         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js: Added.
1553         (BouncingSvgShape): A concrete sub-class of BouncingSVGParticle for animating SVG shapes.
1554         (BouncingSvgShape.prototype._createShape): Creates an SVG shape.
1555         (BouncingSvgShape.prototype._applyFill): Applies the selected fill style to the SVG shape.
1556         
1557         (BouncingSvgShapesStage): A concrete sub-class of BouncingSvgParticlesStage for animating SVG shapes.
1558         (BouncingSvgShapesStage.prototype.createGradient): Creates an SVGLinearGradientElement.
1559         (BouncingSvgShapesStage.prototype.createParticle): Creates a particle of type BouncingSvgShape.
1560         (BouncingSvgShapesStage.prototype.particleWillBeRemoved): Ensures the attached SVGLinearGradientElement is removed from the SVGDefsElement.
1561         
1562         (BouncingSvgShapesBenchmark): A concrete sub-class of BouncingParticlesBenchmark for animating SVG images.
1563         (BouncingSvgShapesBenchmark.prototype.createStage): Creates a stage of type BouncingSvgShapesStage.
1564         (window.benchmarkClient.create): Creates a benchmark of type BouncingSvgShapesBenchmark.
1565         
1566         * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js: Added.
1567         (BouncingSvgImage): A concrete sub-class of BouncingSVGParticle for animating SVG images.
1568         
1569         (BouncingSvgImagesStage): A concrete sub-class of BouncingSVGParticlesBenchmark for animating SVG images.
1570         (BouncingSvgImagesStage.prototype.createParticle): Creates a particle of type BouncingSvgImage.
1571         
1572         (BouncingSvgImagesBenchmark): A concrete sub-class of BouncingParticlesBenchmark for animating SVG images.
1573         (BouncingSvgImagesBenchmark.prototype.createStage): Creates a stage of type BouncingSvgImagesStage.
1574         (window.benchmarkClient.create): Creates a benchmark of type BouncingSvgImagesBenchmark.
1575
1576         * Animometer/tests/examples: Added.
1577         * Animometer/tests/examples/canvas-electrons.html: Added.
1578         * Animometer/tests/examples/canvas-stars.html: Added.
1579         Examples test pages. 
1580         
1581         * Animometer/tests/examples/resources: Added.
1582         * Animometer/tests/examples/resources/canvas-electrons.js: Added.
1583         (CanvasElectron): An object which draws and animate a electron object on a canvas stage.
1584         (CanvasElectron.prototype._draw): Draws the electron object.
1585         (CanvasElectron.prototype.animate): Animates the electron object.
1586         
1587         (CanvasElectronsStage): A concrete sub-class of Stage for animating electrons.
1588         (CanvasElectronsStage.prototype.tune): Changes the test by adding or removing elements.
1589         (CanvasElectronsStage.prototype.animate): Animates the test elements.
1590         
1591         (CanvasElectronsAnimator): A concrete sub-class of StageAnimator for animating canvas electrons.
1592         (CanvasElectronsAnimator.prototype.animate): Overrides the base class method to clear the canvas before redrawing the stage.
1593         
1594         (CanvasElectronsBenchmark): A concrete sub-class of StageBenchmark for animating electrons.
1595         (CanvasElectronsBenchmark.prototype.createStage): Creates a stage of CanvasElectronsStage.
1596         (CanvasElectronsBenchmark.prototype.createAnimator): Creates an animator of type CanvasElectronsAnimator.
1597         (window.benchmarkClient.create): Creates a benchmark of type CanvasElectronsBenchmark.
1598         
1599         * Animometer/tests/examples/resources/canvas-stars.js: Added.
1600         (CanvasStar): An object which draws and animate a star object on a canvas stage.
1601         (CanvasStar.prototype._draw): Draws the star object.
1602         (CanvasStar.prototype.animate): Animates the star object.
1603         
1604         (CanvasStarsStage): A concrete sub-class of Stage for animating stars.
1605         (CanvasStarsStage.prototype.tune): Changes the test by adding or removing elements.
1606         (CanvasStarsStage.prototype.animate): Animates the test elements.
1607         
1608         (CanvasStarsAnimator): A concrete sub-class of StageAnimator for animating canvas stars.
1609         (CanvasStarsAnimator.prototype.animate): Overrides the base class method to clear the canvas before redrawing the stage.
1610         
1611         (CanvasStarsBenchmark): A concrete sub-class of Benchmark for animating stars.
1612         (CanvasStarsBenchmark.prototype.createStage): Creates a stage of CanvasStarsStage.
1613         (CanvasStarsBenchmark.prototype.createAnimator): Creates an animator of type CanvasStarsAnimator.
1614         (window.benchmarkClient.create): Creates a benchmark of type CanvasStarsBenchmark.
1615
1616         * Animometer/tests/resources: Added.
1617         This directory includes the script which is required to run an adaptive 
1618         graphics benchmark. From an empty test page, the set of classes in this
1619         directory are responsible for measuring the current frame rate and
1620         changing the test to reach a desired FPS. It keeps asking the test page
1621         to tune itself by a certain value to increase or decrease the frame rate.
1622         It's also responsible for sampling the test state and the corresponding
1623         frame rate.
1624         
1625         * Animometer/tests/resources/main.js: Added.
1626         (BenchmarkState): Tracks the state of the benchmark test.
1627         (BenchmarkState.prototype._timeOffset): Returns the timeOffset of a stage.
1628         (BenchmarkState.prototype._message): Returns the message of a stage.
1629         (BenchmarkState.prototype.update): Sets the currentTimeOffset to a new value.
1630         (BenchmarkState.prototype.samplingTimeOffset): Returns the timeOffset of the sampling stage.
1631         (BenchmarkState.prototype.currentStage): Returns the current stage of the benchmark.
1632         (BenchmarkState.prototype.currentMessage): Returns the message of the current stage and timeOffset.
1633         (BenchmarkState.prototype.currentProgress): Returns a percentage of how much the benchmark is running.
1634         
1635         (Animator): Manages animating the test.
1636         (Animator.prototype.start): Called if animating using setInterval is requested.
1637         (Animator.prototype.timeDelta): Returns the current timeDelta 
1638         (Animator.prototype.animate): Manages the test animation.
1639         (Animator.prototype.animateLoop): Called if animating using requestAnimationFrame is requested. 
1640
1641         (Benchmark): Manages running the test benchmark and recording the sampled data.
1642         (Benchmark.prototype.start): Starts the benchmark.
1643         (Benchmark.prototype.update): Called from the animator.animate() to change the complexity of the test.
1644         (Benchmark.prototype.record): Shows the current (not final) results of the benchmark.
1645         (Benchmark.prototype.resolveWhenFinished): Spins until the benchmark is finished and returns its results.
1646         (Benchmark.prototype.run): Starts the test, runs it, waits until it is finished and return its results.
1647         (window.runBenchmark): Called from the benchmark runner through the suite controller run-callback.
1648
1649         * Animometer/tests/resources/math.js: Added.
1650         (Matrix): A matrix object.
1651         (Vector3): A vector of size 3 object.
1652         (Matrix3): A matrix of size 3x3 object.
1653         
1654         (PIDController): Closed-loop controller for a set-point y.
1655         (PIDController.prototype._sat): Limits the output to a certain range.
1656         (PIDController.prototype.tune): Given the current output of a system, it produces a new pid value for tuning it.
1657         
1658         (KalmanEstimator): Implement Kalman filter to get an estimate for a sampled data point.
1659         (KalmanEstimator.prototype.estimate): Returns an estimate for for a sampled data point.
1660
1661         * Animometer/tests/resources/utilities.js: Added.
1662         (window.Utilities._parse): Given a separator character, it pareses a string to a set of <key, value> pairs.
1663         (window.Utilities.parseParameters): Parses a test parameters.
1664         (window.Utilities.parseArguments): Parses a tag arguments.
1665         (window.Utilities.extendObject): Adds the attributes and their values of an object to another object.
1666         (window.Utilities.copyObject): Copies the attributes and their values of an object to a new object.
1667         (window.Utilities.mergeObjects): Copies the attributes and their values of two objects to a new object.
1668         (window.Utilities.createSvgElement): Creates an SVGElement given its name and its attributes.
1669         
1670         * Animometer/tests/resources/stage.css: Added.
1671         * Animometer/tests/resources/stage.js: Added.
1672         (Rotater): Manages rotating an angle within a fixed time interval.
1673         (Rotater.prototype.get interval): Returns the time interval which is required to rotate 360 degrees.
1674         (Rotater.prototype.next): Moves the current time by a delta.
1675         (Rotater.prototype.degree): Returns the current rotating degree.
1676         (Rotater.prototype.rotateZ): Returns CSS formatted transform rotateZ() string for the current degree.
1677         (Rotater.prototype.rotate): Returns SVG formatted transform rotate() string for the current degree.
1678         
1679         (Stage): A base class for managing the test complexity and test animation.
1680         (Stage.prototype.get size): Returns the size of the stage excluding the CSS padding.
1681         (Stage.prototype.random): Returns a random float.
1682         (Stage.prototype.randomInt): Returns a random integer.
1683         (Stage.prototype.randomPosition): Returns a random position.
1684         (Stage.prototype.randomSquareSize): Returns a square size.
1685         (Stage.prototype.randomVelocity): Returns a random velocity.
1686         (Stage.prototype.randomAngle): Returns a random angle.
1687         (Stage.prototype.randomColor): Returns a random color not too dark and not too light.
1688         (Stage.prototype.randomRotater): Creates a random rotater. Its velocity depends on choosing a random rotation time interval.
1689         (Stage.prototype.tune): A not-implemented version of this function.
1690         (Stage.prototype.animate): A not-implemented version of this function.
1691         (Stage.prototype.clear): Clears the stage from all its animation elements.
1692         
1693         (StageAnimator): A base class for the stage-based animators.
1694         (StageAnimator.prototype.animate): Calls Animator.animate() which updates the test page and then calls Stage.animate() to force redraw.
1695         
1696         (StageBenchmark): A base class for the stage-based benchmarks.
1697         (StageBenchmark.prototype.createStage): Creates the default stage.
1698         (StageBenchmark.prototype.createAnimator): Creates the default animator.
1699         (StageBenchmark.prototype.tune): Delegates the call to stage.
1700         (StageBenchmark.prototype.clear): Delegates the call to stage.
1701         (StageBenchmark.prototype.showResults): Shows the results/progress through its recordTable and progressBar.
1702         
1703         * Animometer/tests/resources/yin-yang.png: Added.
1704         * Animometer/tests/resources/yin-yang.svg: Added.
1705         These images are shared among all the tests.
1706         
1707         * Animometer/tests/template: Added.
1708         * Animometer/tests/template/resources: Added.
1709         This directory includes template tests which do nothing. They can be used
1710         to author new tests. Animated items can be created, moved and redrawn by
1711         removing the TODO comments in the script files and writing actual code.
1712
1713         * Animometer/tests/template/template-css.html: Added.
1714         * Animometer/tests/template/template-canvas.html: Added.
1715         * Animometer/tests/template/template-svg.html: Added.
1716         Template test pages. They can be used as they are. CSS attributes or hidden
1717         elements can be added to these derived test pages if needed.
1718         
1719         * Animometer/tests/template/resources/template-css.js: Added.
1720         
1721         (TemplateCssStage): A stage to create and animate HTMLElements.
1722         (TemplateCssStage.prototype.tune): Changes the test by adding or removing elements.
1723         (TemplateCssStage.prototype.animate): Animates the test elements.
1724         (TemplateCssBenchmark): 
1725         (TemplateCssBenchmark.prototype.createStage): Creates the test stage.
1726         (window.benchmarkClient.create): Creates a benchmark of type TemplateCssBenchmark.
1727         
1728         * Animometer/tests/template/resources/template-canvas.js: Added.
1729         (TemplateCanvasObject):
1730         (TemplateCanvasObject.prototype._draw): Draws the objects on the canvas context.
1731         (TemplateCanvasObject.prototype.animate): Moves and redraws the object.
1732         (TemplateCanvasStage): A stage to create and animate drawing elements.
1733         (TemplateCanvasStage.prototype.tune): hanges the test by adding or removing elements.
1734         (TemplateCanvasStage.prototype.animate):  Animates the test elements.
1735         (TemplateCanvasAnimator.prototype.animate): Starts the animation every frame.
1736         (TemplateCanvasBenchmark): 
1737         (TemplateCanvasBenchmark.prototype.createStage): Creates a stage of type TemplateCanvasStage.
1738         (TemplateCanvasBenchmark.prototype.createAnimator): Creates a animator of type TemplateCanvasAnimator.
1739         (window.benchmarkClient.create): Creates a benchmark of type TemplateCanvasBenchmark.
1740         
1741         * Animometer/tests/template/resources/template-svg.js: Added.
1742         (TemplateSvgStage): A stage to create and animate SVGElements.
1743         (TemplateSvgStage.prototype.tune): Changes the test by adding or removing elements.
1744         (TemplateSvgStage.prototype.animate): Animates the test elements.
1745         (TemplateSvgBenchmark.prototype.createStage): Creates a stage of type TemplateSvgStage.
1746         (window.benchmarkClient.create): Creates a benchmark of type TemplateSvgBenchmark.
1747         
1748         * Animometer/tests/text: Added.
1749         * Animometer/tests/text/resources: Added.
1750         This directory includes the text animating tests which currently runs
1751         on CSS stage only.
1752         
1753         * Animometer/tests/text/layering-text.html: Added.
1754         Text test page.
1755         
1756         * Animometer/tests/text/resources/layering-text.js: Added.
1757         (LayeringTextStage): Represents the container of all the stacked text layers.
1758         (LayeringTextStage.parseTextItem): Parses a textItem which may be an opening tag, a closing tag or a self-closing tag.
1759         (LayeringTextStage.isOpeningTextItem): Returns true if the textItem is an opening tag e.g. '<ol>'.
1760         (LayeringTextStage.isClosingTextItem): Returns true if  the textItem is an closing tag e.g. '</ol>.
1761         (LayeringTextStage.textItemsFlags.LayeringTextStage.textItems.map): Calculates and stores isOpening and isClosing flags for each textItem.
1762         (LayeringTextStage.isColorableTextItem): Returns true if the textItem is self-closing tag e.g. '<p>...</p>'.
1763         (LayeringTextStage.isInsertableTextItem): Returns true if the textItems causes a new element to be added to the text layers.
1764         (LayeringTextStage.colorableTextItems.LayeringTextStage.textItemsFlags.filter): Number of colorable textItems.
1765         (LayeringTextStage.insertableTextItems.LayeringTextStage.textItemsFlags.filter): Number of insertable textItems.
1766         (LayeringTextStage.colorIndexToTextElementIndex): Maps from colorIndex [0..colorableTextItems-1] to textElementIndex [0..insertableTextItems-1].
1767         (LayeringTextStage.prototype._nextTextItem): Moves the _textItemIndex one step forward in a loop [0..LayeringTextStage.textItems.length-1].
1768         (LayeringTextStage.prototype._previousTextItem): Moves the _textItemIndex one step backward in a loop.
1769         (LayeringTextStage.prototype._pushTextElement): Creates a new textItemElement and adds it to the topmost container <div>.
1770         (LayeringTextStage.prototype._popTextElement): Removes the last textItemElement from the topmost container <div>.
1771         (LayeringTextStage.prototype._colorTextItem): Changes the background color of a single colorable textElement. The index advances in a circle [0..colorableTextItems-1].
1772         (LayeringTextStage.prototype.animate): Changes the background color and the text color of the textElements such that a redraw is enforced.
1773         (LayeringTextStage.prototype.tune): Adds or removes textElements to the stage.
1774
1775         (LayeringTextBenchmark): Runs the benchmark for the layering text test.
1776         (LayeringTextBenchmark.prototype.createStage): Creates a stage of type LayeringTextStage.
1777         (window.benchmarkClient.create): Creates a benchmark of type LayeringTextBenchmark.
1778
1779 2015-10-02  Said Abou-Hallawa  <sabouhallawa@apple.com>
1780
1781         Add shared code for a new a graphics benchmark
1782         https://bugs.webkit.org/show_bug.cgi?id=149691
1783
1784         Reviewed by Ryosuke Niwa.
1785
1786         This set of classes will be shared and used by the tests and the runner
1787         of a new graphics benchmark.
1788
1789         * Animometer/resources: Added.
1790         * Animometer/resources/algorithm.js: Added.
1791         (Array.prototype.swap): Swaps two elements in an array.
1792         (Heap): Binary Min/Max Heap object
1793         (Heap.prototype._parentIndex): Given the child node index, it returns the parent index.
1794         (Heap.prototype._leftIndex): Given the parent node index, it returns the left node index.
1795         (Heap.prototype._rightIndex): Given the parent node index, it returns the right node index.
1796         (Heap.prototype._childIndex): Given the parent node index, it returns the child index that may violate the heap property.
1797         (Heap.prototype.init): Initializes the heap state.
1798         (Heap.prototype.top): Returns the value stored at the top of the heap.
1799         (Heap.prototype.push): Pushes a new node at the top of the heap.
1800         (Heap.prototype.pop): Extracts the top node of the heap.
1801         (Heap.prototype._bubble): Fixes the heap property by moving upward.
1802         (Heap.prototype._sink): Fixes the heap property by moving downward.
1803         (Heap.prototype.str): Prints the nodes of the heap to a string.
1804         (Heap.prototype.values): Returns the last "size" heap elements values.
1805
1806         (Algorithm.createMinHeap): Creates a size-bounded min-heap object.
1807         (Algorithm.createMaxHeap): Creates a size-bounded max-heap object.
1808         
1809         * Animometer/resources/extensions.js: Added.
1810         (Point): Point object but can be used as size also.
1811         (Point.pointOnCircle): Given, the radius of the circle and the angle of the point, it returns a point object.
1812         (Point.pointOnEllipse): Given, the radiuses of the ellipse and the angle of the point, it returns a point object.
1813         (Point.prototype.get width): Should be called when the point is used as size.
1814         (Point.prototype.get height): Should be called when the point is used as size.
1815         (Point.prototype.get center): Should be called when the point is used as size.
1816         (Point.prototype.add): Returns a new point = this + other.
1817         (Point.prototype.subtract): Returns a new point = this - other.
1818         (Point.prototype.multiply): Returns a new point = this * other.
1819         (Point.prototype.move): Moves the point in a given direction, velocity, time period.
1820
1821         (Insets): Represents borders of a container.
1822         (Insets.prototype.get width): Returns left + right.
1823         (Insets.prototype.get height): Returns top + bottom.
1824
1825         (SimplePromise):
1826         (SimplePromise.prototype.then):
1827         (SimplePromise.prototype.resolve):
1828         Moved from Animometer/runner/resources/benchmark-runner.js since tests also need it.
1829
1830         (Options): Benchmark running options as they are set by the user.
1831
1832         (ProgressBar): Manages a progress bar element. The progress bar is divided into equal length ranges.
1833         (ProgressBar.prototype._progressToPercent): Converts the progress into a percentage.
1834         (ProgressBar.prototype.incRange): Moves to the next range (a range is the running time of a single test).
1835         (ProgressBar.prototype.setPos): Draws the current progress in the current range.
1836
1837         (RecordTable): Shows the results of running a benchmark in a tabular form.
1838         (RecordTable.prototype.clear): Clears the results table.
1839         (RecordTable.prototype._showTitles): Shows the header titles and appends the sub-titles to a queue.
1840         (RecordTable.prototype._showHeader): Shows the table header titles.
1841         (RecordTable.prototype._showEmpty): Shows an empty table cell.
1842         (RecordTable.prototype._showValue): Shows a number value in the results table.
1843         (RecordTable.prototype._showSamples): Shows a button for the sampled data graph.
1844         (RecordTable.prototype._showTest): Shows the results of a single test.
1845         (RecordTable.prototype._showSuite): Shows the results of a single suite.
1846         (RecordTable.prototype.showRecord): Shows a single iteration for a single test.
1847         (RecordTable.prototype.showIterations): Shows the results of all the suites of the iterations. 
1848
1849         * Animometer/resources/sampler.js: Added.
1850         (Statistics.sampleMean): Returns the sample mean.
1851         (Statistics.unbiasedSampleStandardDeviation): Returns the unbiased sample variance (i.e. with Bessel's correction)
1852         (Statistics.geometricMean): Returns the geometric mean.
1853
1854         (Experiment): Represents a sampling experiment. 
1855         (Experiment.prototype._init): Called when the object is created and when startSampling() is called.
1856         (Experiment.prototype.startSampling): Called after warmup period. Restarts collecting sampled data points.
1857         (Experiment.prototype.sample): Add a new data point.
1858         (Experiment.prototype.mean): Returns the sample mean for the current sampled data points.
1859         (Experiment.prototype.standardDeviation): Returns the sample standard deviation for the current sampled data points.
1860         (Experiment.prototype.percentage): Returns the percentage of the standard deviation divided to the mean.
1861         (Experiment.prototype.confidenceIntervalDelta): Calculates the confidence delta for the current sampled data given a confidence level.
1862         (Experiment.prototype.concern): Returns the average of the worst given percentage from the sampled data.
1863         (Experiment.prototype.score): Returns a score for the sampled data. It is the geometric mean of sampleMean and concern.
1864
1865         (Sampler): Represents a compound experiment. It manages sampling multiple data points at the same time offset.
1866         (Sampler.prototype.startSampling): Called after warming up period. Restarts collecting sampled data points.
1867         (Sampler.prototype.sample): Add a new data vector at a given time offset.
1868         
1869 2015-10-02  Said Abou-Hallawa  <sabouhallawa@apple.com>
1870
1871         Add the test runner for a new a graphics benchmark
1872         https://bugs.webkit.org/show_bug.cgi?id=149683
1873
1874         Reviewed by Ryosuke Niwa.
1875
1876         The test runner collects the selected test suites and the running options
1877         from its home page. It loops through all the tests, runs them and collects
1878         their running results. At the end, it shows summary results and a final
1879         score. It can also show a chart for a test sampled data.
1880
1881         * Animometer: Added.
1882         * Animometer/runner: Added.
1883         * Animometer/runner/resources: Added.
1884         
1885         * Animometer/runner/animometer.html: Added.
1886         * Animometer/runner/resources/animometer.css: Added.
1887         The benchmark runner page and css.
1888
1889         * Animometer/runner/resources/animometer.js: Added.
1890         (window.benchmarkRunnerClient.willAddTestFrame): Called after the test <iframe> is created.
1891         (window.benchmarkRunnerClient.didRunTest): Called after running a test is finished.
1892         (window.benchmarkRunnerClient.willStartFirstIteration): Called at the beginning before running any test.
1893         (window.benchmarkRunnerClient.didRunSuites): Called after running all tests of a suite.
1894         (window.benchmarkRunnerClient.didFinishLastIteration): Called after running the last test.
1895         
1896         (showSection): Shows a section in the animometer.html page.
1897         (startTest): Called when the "Start Test" button is clicked.
1898         (showResults): Called after finishing all the tests.
1899         (showGraph): Called when "Click..." button in the "Samples" column of the results table is clicked
1900         
1901         * Animometer/runner/resources/benchmark-runner.js: Copied from PerformanceTests/Speedometer/resources/benchmark-runner.js.
1902         (BenchmarkRunnerState): Tracks the current running <suite, test>
1903         (BenchmarkRunnerState.prototype.currentSuite): Returns the current running suite.
1904         (BenchmarkRunnerState.prototype.currentTest): Returns the current running test.
1905         (BenchmarkRunnerState.prototype.isFirstTest): Returns true if we are running the first test in the current suite.
1906         (BenchmarkRunnerState.prototype.next): Advances to the next test.
1907         (BenchmarkRunnerState.prototype.prepareCurrentTest): Creates a new <iframe> and waits for it to load a test.
1908         
1909         (BenchmarkRunner): Manages running the tests and communicating with the benchmarkRunnerClient.
1910         (BenchmarkRunner.prototype.waitForElement): Waits for an element to be created.
1911         (BenchmarkRunner.prototype._appendFrame): Creates a new <iframe> element.
1912         (BenchmarkRunner.prototype._removeFrame): Removed the current <iframe> element.
1913         (BenchmarkRunner.prototype._runTestAndRecordResults): Runs the current test and saves its results.
1914         (BenchmarkRunner.prototype.step): Either runs the current test if there is or start a new iteration.
1915         (BenchmarkRunner.prototype.runAllSteps): Loops to run all the tests and move to the next iteration.
1916         (this._runNextIteration): Starts a new iteration or show the results.
1917         (BenchmarkRunner.prototype.runMultipleIterations): Loops to run all the iterations and show the results
1918         (BenchmarkRunner.prototype._finalize): Finalizes the current iteration and starts a new one.
1919
1920         (SimplePromise): Deleted.
1921         (SimplePromise.prototype.then): Deleted.
1922         (SimplePromise.prototype.resolve): Deleted.
1923         (BenchmarkTestStep): Deleted.
1924         (Fibonacci): Deleted.
1925         SimplePromise was moved t Animometer/resources/extensions.js because it is used by the runner and the tests.
1926         
1927         (BenchmarkRunner.prototype._waitAndWarmUp): Deleted.
1928         (BenchmarkRunner.prototype._runTest): Deleted.
1929         (BenchmarkState.prototype.currentSuite): Deleted.
1930         (BenchmarkState.prototype.currentTest): Deleted.
1931         (BenchmarkState.prototype.next): Deleted.
1932         (BenchmarkState.prototype.isFirstTest): Deleted.
1933         (BenchmarkState.prototype.prepareCurrentSuite): Deleted.
1934         BenchmarkState was renamed to BenchmarkRunnerState to not be confused with the tests BenchmarkState.
1935         
1936         * Animometer/runner/resources/d3.min.js: Copied from Websites/perf.webkit.org/public/v2/js/d3/d3.min.js.
1937         Needed for drawing charts for the sampled scores and frame rates.
1938         
1939         * Animometer/runner/resources/graph.js: Added.
1940         (graph): Draws a chart for a test sampled data. It shows two y-axes: one for the animated items and the second for FPS.
1941                 
1942         * Skipped: Skip the Animometer benchmark for now.
1943
1944 2015-08-27  Csaba Osztrogonác  <ossy@webkit.org>
1945
1946         [EFL] REGRESSION(r188793): It made 200 layout tests and Bindings/event-target-wrapper.html performance test fail
1947         https://bugs.webkit.org/show_bug.cgi?id=148470
1948
1949         Unreviewed gardening, skip the hanging test to make the performance bot work.
1950
1951         * Skipped:
1952
1953 2015-08-17  Chris Dumez  <cdumez@apple.com>
1954
1955         Add performance tests for traversal of collections returned by getElementsByClassName() / getElementsByTagName()
1956         https://bugs.webkit.org/show_bug.cgi?id=148080
1957
1958         Reviewed by Antti Koivisto.
1959
1960         Add performance tests for traversal of *uncached* collections returned
1961         by getElementsByClassName() / getElementsByTagName(). These methods
1962         will soon be updated to return an HTMLCollection instead of a
1963         NodeList and we need to make sure we don't regress performance in the
1964         process.
1965
1966         * DOM/get-elements-by-class-name-traversal-uncached.html: Added.
1967         * DOM/get-elements-by-tag-name-traversal-uncached.html: Added.
1968
1969 2015-08-14  Chris Dumez  <cdumez@apple.com>
1970
1971         Add performance tests for NodeList and HTMLCollection traversal
1972         https://bugs.webkit.org/show_bug.cgi?id=148043
1973
1974         Reviewed by Gavin Barraclough.
1975
1976         Add performance tests for NodeList and HTMLCollection traversal.
1977         Ideally, those 2 tests should be as fast. However, due to inefficiencies
1978         in our HTMLCollection bindings code, the HTMLCollection tests is ~30%
1979         slower. This will be addressed in the near future.
1980
1981         * Bindings/childNodes-traversal.html: Added.
1982         * Bindings/children-traversal.html: Added.
1983
1984 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
1985
1986         Add a second font-fallback performance test
1987         https://bugs.webkit.org/show_bug.cgi?id=147692
1988
1989         Reviewed by Ryosuke Niwa.
1990
1991         This test is smaller, but has more realistic content. Also, it uses the "lang" attribute.
1992
1993         * Layout/font-fallback-2.html: Added.
1994         * Layout/resources/font-fallback-2.html: Added.
1995
1996 2015-07-13  Filip Pizlo  <fpizlo@apple.com>
1997
1998         Update JetStream version number to 1.1.
1999
2000         Rubber stamped by Ryosuke Niwa.
2001
2002         * JetStream/create.rb:
2003
2004 2015-06-30  Filip Pizlo  <fpizlo@apple.com>
2005
2006         Update the JetStream documentation to reflect the recent changes
2007         https://bugs.webkit.org/show_bug.cgi?id=146474
2008
2009         Reviewed by Geoffrey Garen.
2010
2011         * JetStream/create.rb: Bump the version.
2012         * JetStream/in-depth-TEMPLATE.html: Add cdjs documentation. Remove cordic documentation. Change documentation for splay and mandreel.
2013
2014 2015-06-26  Filip Pizlo  <fpizlo@apple.com>
2015
2016         [JetStream] Raise the percentile of mandreel-latency and splay-latency
2017         https://bugs.webkit.org/show_bug.cgi?id=146378
2018
2019         Reviewed by Mark Lam.
2020         
2021         The current percentile is 95%.  When I looked at the sample lists in our GC, it was
2022         clear that the worst 5% samples completely amortize our GC pauses.  Our GC pauses can
2023         be quite bad.  Clearly, splay-latency is meant to test whether we have an incremental
2024         GC that ensures that you don't have bad worst-case pauses.  But 95% is too small,
2025         because it doesn't really capture those pauses.  Raising the percentile to above 99%
2026         appears to do the trick.  99.5% or more seems like a good bet.  The trade-off there is
2027         just that if we set it too high, then we won't have enough statistics.  Doing this very
2028         clearly rewards GCs that are incremental, and punishes GCs that aren't (like ours).
2029         That's what we want, since in the future we want to use this test to guide any
2030         improvements to the worst-case performance of our GC.
2031
2032         The way that the percentile is selected will also affect mandreel-latency.  That's a
2033         good thing, because 95% is probably too low for that test as well.  That test ends up
2034         with >10k samples.  The goal of using 95% in the first place was to get enough samples
2035         to have a stable average.  But if we have >10k samples, we can push that percentile up
2036         much higher and still get good statistics while achieving the effect we want - i.e.
2037         getting the worst case.
2038
2039         I don't think that we need to do the same thing for cdjs.  That test only takes 200
2040         samples, so 95% means we report the average of the worst 10 samples.  That's probably
2041         good enough.
2042
2043         * JetStream/Octane2/base.js: Raise the percentile as described above.
2044         (BenchmarkSuite.prototype.RunSingleBenchmark):
2045         * JetStream/Reference.js: Tweak the reference times to bring the latency tests closer to 100ish on my machine.
2046         * JetStream/create.rb: Bump the version.
2047
2048 2015-06-19  Filip Pizlo  <fpizlo@apple.com>
2049
2050         Run CDjs as part of JSC stress testing
2051         https://bugs.webkit.org/show_bug.cgi?id=146174
2052
2053         Reviewed by Geoffrey Garen.
2054
2055         * JetStream/cdjs/cdjs-tests.yaml: Added. This tells JSC stress tests what tests to run. It uses new syntax ("tests" being a list) that I add in this change.
2056         * JetStream/cdjs/main.js: Mark this as a slow test.
2057         * JetStream/create.rb: Don't copy the JSC stress tests artifacts into the JetStream bundle.
2058
2059 2015-06-19  Filip Pizlo  <fpizlo@apple.com>
2060
2061         Unreviewed, fix a small indentation goof.
2062
2063         * JetStream/cdjs/motion.js:
2064         (Motion.prototype.findIntersection):
2065
2066 2015-06-19  Filip Pizlo  <fpizlo@apple.com>
2067
2068         JetStream should include a JavaScript version of the CDx real-time benchmark
2069         https://bugs.webkit.org/show_bug.cgi?id=146156
2070
2071         Reviewed by Geoffrey Garen.
2072         
2073         This adds a JavaScript port of the CDx real-time benchmark to JetStream, and retires
2074         the cordic test because it was previously the smallest and probably least interesting.
2075         
2076         The new test, "cdjs", is mostly a faithful rewrite of the Java code into JavaScript.
2077         I got the Java code from https://www.cs.purdue.edu/sss/projects/cdx/.
2078         
2079         There are some differences:
2080         
2081         - It uses RedBlackTree's for all sets and maps rather than hashtables. This is clearly
2082           more in the spirit of real-time than the CDx benchmark. FWIW, CDx used to use trees
2083           and I don't know why that changed in the latest version.
2084         
2085         - CDjs doesn't attempt to avoid memory allocations, unlike the real-time Java version.
2086           I wrote the code that I wanted to write for aesthetics, rather than the code that I
2087           would have written if I tried to write the fastest code possible. Again, I believe
2088           that this is in the spirit of CDj - it's meant to test what would happen if you wrote
2089           real-timey stuff in a high level language and actually took advantage of that
2090           language to be more productive.
2091         
2092         The test score reflects the average latency of the worst 10 samples out of 200 samples.
2093         The simulation uses 1000 aircraft, flying along paths that result in some detected
2094         collisions every once in a while. The benchmark validates its results by checking the
2095         total number of collisions detected.
2096         
2097         Apart from the integration into the JetStream harness, the CDjs directory contains a
2098         fully self-contained benchmark that could be run either in the jsc shell or in browser.
2099         
2100         This new code uses the same 3-clause BSD license as the Purdue code, and gives
2101         attribution to Purdue in almost all files. I believe that is appropriate since I wrote
2102         most of the JS files by looking at the Purdue Java code and trascribing to JavaScript.
2103         In some cases, I even copy-pasted the Java code, like the complicated math for
2104         four-dimensional intersections and voxel hashing.
2105
2106         * JetStream/CDjsSetup.js: Added.
2107         * JetStream/Octane2Setup.js:
2108         * JetStream/Reference.js:
2109         * JetStream/cdjs: Added.
2110         * JetStream/cdjs/benchmark.js: Added.
2111         (benchmark):
2112         * JetStream/cdjs/call_sign.js: Added.
2113         (CallSign):
2114         (CallSign.prototype.compareTo):
2115         (CallSign.prototype.toString):
2116         * JetStream/cdjs/collision.js: Added.
2117         (Collision):
2118         (Collision.prototype.toString):
2119         * JetStream/cdjs/collision_detector.js: Added.
2120         (CollisionDetector):
2121         (CollisionDetector.prototype.handleNewFrame.get for):
2122         (CollisionDetector.prototype.handleNewFrame):
2123         * JetStream/cdjs/constants.js: Added.
2124         * JetStream/cdjs/main.html: Added.
2125         * JetStream/cdjs/main.js: Added.
2126         * JetStream/cdjs/motion.js: Added.
2127         (Motion):
2128         (Motion.prototype.toString):
2129         (Motion.prototype.delta):
2130         (Motion.prototype.findIntersection):
2131         * JetStream/cdjs/motion_test.js: Added.
2132         (checkDoesIntersect):
2133         (checkDoesNotIntersect):
2134         (makeMotion):
2135         * JetStream/cdjs/red_black_tree.js: Added.
2136         (RedBlackTree):
2137         (RedBlackTree.):
2138         * JetStream/cdjs/red_black_tree_test.js: Added.
2139         (test):
2140         (test.):
2141         * JetStream/cdjs/reduce_collision_set.js: Added.
2142         (drawMotionOnVoxelMap):
2143         (drawMotionOnVoxelMap.):
2144         (.get reduceCollisionSet):
2145         * JetStream/cdjs/reduce_collision_set_test.js: Added.
2146         (makeMotion):
2147         (keys):
2148         (test):
2149         * JetStream/cdjs/simulator.js: Added.
2150         (Simulator):
2151         (Simulator.prototype.simulate):
2152         * JetStream/cdjs/util.js: Added.
2153         (compareNumbers):
2154         (averageAbovePercentile):
2155         (currentTime):
2156         (else.currentTime):
2157         * JetStream/cdjs/vector_2d.js: Added.
2158         (Vector2D):
2159         (Vector2D.prototype.plus):
2160         (Vector2D.prototype.minus):
2161         (Vector2D.prototype.toString):
2162         (Vector2D.prototype.compareTo):
2163         * JetStream/cdjs/vector_3d.js: Added.
2164         (Vector3D):
2165         (Vector3D.prototype.plus):
2166         (Vector3D.prototype.minus):
2167         (Vector3D.prototype.dot):
2168         (Vector3D.prototype.squaredMagnitude):
2169         (Vector3D.prototype.magnitude):
2170         (Vector3D.prototype.times):
2171         (Vector3D.prototype.as2D):
2172         (Vector3D.prototype.toString):
2173         * JetStream/create.rb:
2174         * JetStream/index-TEMPLATE.html:
2175         * JetStream/sunspider/cordic.js: Removed.
2176
2177 2015-06-17  Javier Fernandez  <jfernandez@igalia.com>
2178
2179         [CSS Grid Layout] We should add performance tests for stretching logic
2180         https://bugs.webkit.org/show_bug.cgi?id=146063
2181
2182         Reviewed by Sergio Villar Senin.
2183
2184         Added a new performance test for Grid Layout to ensure there are no
2185         regressions in the stretching alignment logic.
2186
2187         * Layout/fixed-grid-lots-of-stretched-data.html: Added.
2188
2189 2015-06-17  Javier Fernandez  <jfernandez@igalia.com>
2190
2191         [CSS Grid Layout] Performance tests are using the old syntax
2192         https://bugs.webkit.org/show_bug.cgi?id=146061
2193
2194         Reviewed by Sergio Villar Senin.
2195
2196         Adapted tests to the new grid tracks definition syntax.
2197
2198         * Layout/auto-grid-lots-of-data.html:
2199         * Layout/fixed-grid-lots-of-data.html:
2200
2201 2015-06-08  Filip Pizlo  <fpizlo@apple.com>
2202
2203         JetStream should have a more rational story for jitter-oriented latency tests
2204         https://bugs.webkit.org/show_bug.cgi?id=145762
2205
2206         Reviewed by Geoffrey Garen.
2207         
2208         JetStream has some latency tests that are meant to measure jitter.  Prior to this change, they
2209         did this by computing the RMS.  But the RMS is a pretty bad metric.  The thing that it rewards
2210         isn't really the thing that you'd want your browser to do.  These RMS-based tests involve taking
2211         the geomean of the RMS of some samples and the sample average.  The lower the geomean, the better
2212         (in the JetStream harness we then invert the scores so that higher is better, but let's ignore
2213         that for this discussion and assume that lower is better).  Here's an example of how this can go
2214         bad.  A browser that always computes a task in some horribly long time (say, 1000ms) but never
2215         varies that time will perform better than a browser that usually computes the task super quickly
2216         (say, 10ms) and sometimes just a little bit less quickly (say, 15ms).  The former browser will
2217         have an RMS of 0 and an average of 1000.  The latter will have a RMS somewhere around 3.5 and an
2218         average of 12.5 (assuming equal probability of 10ms and 15ms).  The geomean of (0, 1000) is 0.
2219         The geomean of (3.5, 12.5) is 6.6.  Lower is better, so the former browser scores higher - even
2220         though it's obviously never better to have a browser always complete a task in 1000ms when a
2221         different browser can do it in 15ms in the worst case.
2222
2223         JetStream should not have this pathology.  The right way of avoiding it is to replace RMS with
2224         some other metric of how bad things get.  A good metric is the average of the worst percentile.
2225         The worst 1% or the worst 5% would be good things to average.  This will catch cases where the VM
2226         jittered due to JIT or GC, but it never have the pathology that we end up giving the better score
2227         to a VM whose best case is worst than another VM's worst case.
2228         
2229         For now, this change uses the highest samples above the 95% percentile. I'm not yet sure if that
2230         is the best thing - it might include too many scores that are around the best-case performance -
2231         but it's certainly better than RMS and it might be good enough to keep. But because of that
2232         uncertainty, I'm setting the version to be "1.1-alpha1" to indicate that we aren't ready to
2233         release this yet.
2234
2235         * JetStream/Octane2/base.js:
2236         (.this.Setup.setup.setup):
2237         (.this.TearDown.tearDown.tearDown):
2238         (BenchmarkSuite.GeometricMeanTime):
2239         (BenchmarkSuite.AverageAbovePercentile):
2240         (BenchmarkSuite.GeometricMeanLatency):
2241         (BenchmarkSuite.prototype.NotifyStep):
2242         (BenchmarkSuite.prototype.RunSingleBenchmark):
2243         * JetStream/Octane2/mandreel.js:
2244         (setupMandreel):
2245         (updateMandreelStats):
2246         (startMandreelTimer):
2247         (latencyMandreel):
2248         (tearDownMandreel):
2249         (RMSMandreel): Deleted.
2250         * JetStream/Octane2/splay.js:
2251         (GenerateKey):
2252         (SplayUpdateStats):
2253         (InsertNewNode):
2254         (SplayTearDown):
2255         (SplayRMS): Deleted.
2256         * JetStream/create.rb:
2257
2258 2015-06-03  Zalan Bujtas  <zalan@apple.com>
2259
2260         Skip Dromaeo/jslib-modify-prototype.html for now.
2261
2262         Unreviewed gardening.
2263
2264         * Skipped:
2265
2266 2015-05-04  Filip Pizlo  <fpizlo@apple.com>
2267
2268         Large array shouldn't be slow
2269         https://bugs.webkit.org/show_bug.cgi?id=144617
2270
2271         Reviewed by Geoffrey Garen.
2272         
2273         Add the hash-map benchmark to LongSpider. LongSpider was already not a perfect match of
2274         SunSpider. It's not an official benchmark. It contains benchmarks that are relatively
2275         long-running. So, hash-map sort of belongs here.
2276
2277         * LongSpider/hash-map.js: Added.
2278         (HashMap):
2279         (HashMap.):
2280         (.get var):
2281
2282 2015-05-01  Dewei Zhu  <dewei_zhu@apple.com>
2283
2284         Fix typo bug in Speedometer/resources/main.js
2285         https://bugs.webkit.org/show_bug.cgi?id=144504
2286
2287         Reviewed by Ryosuke Niwa. 
2288
2289         * Speedometer/resources/main.js: Fix typo.
2290         (window.benchmarkClient.totalTimeInDisplayUnit):
2291
2292 2015-04-21  Ryosuke Niwa  <rniwa@webkit.org>
2293
2294         Add JetStream to PerformanceTests
2295         https://bugs.webkit.org/show_bug.cgi?id=144024
2296
2297         Rubber-stamped by Filip Pizlo.
2298
2299         * JetStream: Added.
2300         * JetStream/JetStream-Logo.png: Added.
2301         * JetStream/JetStream-Logo@2x.png: Added.
2302         * JetStream/JetStream.css: Added.
2303         * JetStream/JetStreamDriver.js: Added.
2304         * JetStream/LICENSE.txt: Added.
2305         * JetStream/LLVM-test-suite-LICENSE.txt: Added.
2306         * JetStream/Octane: Added.
2307         * JetStream/Octane/base.js: Added.
2308         * JetStream/Octane/code-load.js: Added.
2309         * JetStream/Octane2: Added.
2310         * JetStream/Octane2/base.js: Added.
2311         * JetStream/Octane2/box2d.js: Added.
2312         * JetStream/Octane2/code-load.js: Added.
2313         * JetStream/Octane2/crypto.js: Added.
2314         * JetStream/Octane2/deltablue.js: Added.
2315         * JetStream/Octane2/earley-boyer.js: Added.
2316         * JetStream/Octane2/gbemu-part1.js: Added.
2317         * JetStream/Octane2/gbemu-part2.js: Added.
2318         * JetStream/Octane2/mandreel.js: Added.
2319         * JetStream/Octane2/navier-stokes.js: Added.
2320         * JetStream/Octane2/pdfjs.js: Added.
2321         * JetStream/Octane2/raytrace.js: Added.
2322         * JetStream/Octane2/regexp.js: Added.
2323         * JetStream/Octane2/richards.js: Added.
2324         * JetStream/Octane2/run.js: Added.
2325         * JetStream/Octane2/splay.js: Added.
2326         * JetStream/Octane2/typescript-compiler.js: Added.
2327         * JetStream/Octane2/typescript-input.js: Added.
2328         * JetStream/Octane2/typescript.js: Added.
2329         * JetStream/Octane2/zlib-data.js: Added.
2330         * JetStream/Octane2/zlib.js: Added.
2331         * JetStream/Octane2Setup.js: Added.
2332         * JetStream/OctaneSetup.js: Added.
2333         * JetStream/README: Added.
2334         * JetStream/Reference.js: Added.
2335         * JetStream/SimpleSetup.js: Added.
2336         * JetStream/SunSpiderSetup.js: Added.
2337         * JetStream/Swoosh.png: Added.
2338         * JetStream/Swoosh@2x.png: Added.
2339         * JetStream/TestingSetup.js: Added.
2340         * JetStream/create.rb: Added.
2341         * JetStream/docs: Added.
2342         * JetStream/docs/JetStreamBlogPost.html: Added.
2343         * JetStream/in-depth-TEMPLATE.html: Added.
2344         * JetStream/index-TEMPLATE.html: Added.
2345         * JetStream/simple: Added.
2346         * JetStream/simple/bigfib.cpp: Added.
2347         * JetStream/simple/bigfib.cpp.js: Added.
2348         * JetStream/simple/container.cpp: Added.
2349         * JetStream/simple/container.cpp.js: Added.
2350         * JetStream/simple/dry.c: Added.
2351         * JetStream/simple/dry.c.js: Added.
2352         * JetStream/simple/float-mm.c: Added.
2353         * JetStream/simple/float-mm.c.js: Added.
2354         * JetStream/simple/gcc-loops.cpp: Added.
2355         * JetStream/simple/gcc-loops.cpp.js: Added.
2356         * JetStream/simple/hash-map.js: Added.
2357         * JetStream/simple/n-body.c: Added.
2358         * JetStream/simple/n-body.c.js: Added.
2359         * JetStream/simple/quicksort.c: Added.
2360         * JetStream/simple/quicksort.c.js: Added.
2361         * JetStream/simple/towers.c: Added.
2362         * JetStream/simple/towers.c.js: Added.
2363         * JetStream/sunspider: Added.
2364         * JetStream/sunspider/3d-cube.js: Added.
2365         * JetStream/sunspider/3d-raytrace.js: Added.
2366         * JetStream/sunspider/base64.js: Added.
2367         * JetStream/sunspider/cordic.js: Added.
2368         * JetStream/sunspider/crypto-aes.js: Added.
2369         * JetStream/sunspider/crypto-md5.js: Added.
2370         * JetStream/sunspider/crypto-sha1.js: Added.
2371         * JetStream/sunspider/date-format-tofte.js: Added.
2372         * JetStream/sunspider/date-format-xparb.js: Added.
2373         * JetStream/sunspider/n-body.js: Added.
2374         * JetStream/sunspider/regex-dna.js: Added.
2375         * JetStream/sunspider/tagcloud.js: Added.
2376
2377 2015-04-14  Said Abou-Hallawa  <sabouhallawa@apple.com>
2378
2379         textPath layout performance improvement.
2380         https://bugs.webkit.org/show_bug.cgi?id=141570.
2381
2382         Reviewed by Darin Adler.
2383
2384         Cut down the time spent in traversing the path for text by 50%. Instead
2385         of traversing the path twice at a certain length: one time for the position
2386         and the second time for the angle, we can merge these two passes into one.
2387
2388         * SVG/TextOnPathSimple.html: Added.
2389         * SVG/resources/TextOnPathSimple.svg: Added.
2390
2391 2015-04-13  Zalan Bujtas  <zalan@apple.com>
2392
2393         Clear up the test content when test is done.
2394
2395         Unreviewed fix.
2396
2397         * Layout/simple-line-layout-innertext.html:
2398
2399 2015-04-09  Zalan Bujtas  <zalan@apple.com>
2400
2401         Simple line layout(regression): Calling innerText on RenderFlow with multiple children is slow.
2402         https://bugs.webkit.org/show_bug.cgi?id=143554
2403
2404         Reviewed by Antti Koivisto.
2405
2406         Initialize render flow's segments only when the render flow changes in TextIterator.
2407         The included performance test shows 6x speedup. (from ~10 runs/sec to ~60 runs/sec)
2408
2409         * Layout/simple-line-layout-innertext.html: Added.
2410
2411 2015-03-09  Chris Dumez  <cdumez@apple.com>
2412
2413         [CG] Have Canvas use the IOSurfacePool
2414         https://bugs.webkit.org/show_bug.cgi?id=142417
2415         <rdar://problem/20044440>
2416
2417         Reviewed by Darin Adler.
2418
2419         Lower the number of different canvas sizes from 1000 to 100 so that
2420         the test does not require such a huge cache size. With 100, we now
2421         get over 90% cache hit rate with the default IOSurfacePool size.
2422
2423         * Canvas/reuse.html:
2424
2425 2015-01-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
2426
2427         Poor performance on IE's Chalkboard benchmark.
2428         https://bugs.webkit.org/show_bug.cgi?id=140753.
2429
2430         Reviewed by Zalan Bujtas.
2431
2432         * SVG/UnderTheSeeBenchmark.html: Added
2433         * SVG/WorldcupBenchmark.html: Added.
2434         * SVG/resources/RenderAnimator.css: Added.
2435         * SVG/resources/RenderAnimator.js: Added.
2436         These are benchmarks for the SVG rendering. Mainly we want to measure how fast
2437         the SVG rendering will be when only a small part of it is drawn.
2438         
2439 2015-01-21  Geoffrey Garen  <ggaren@apple.com>
2440
2441         bmalloc: support aligned allocation
2442         https://bugs.webkit.org/show_bug.cgi?id=140732
2443
2444         Reviewed by Andreas Kling.
2445
2446         * MallocBench/MallocBench.xcodeproj/project.pbxproj:
2447         * MallocBench/MallocBench/Benchmark.cpp:
2448         * MallocBench/MallocBench/memalign.cpp:
2449         (test):
2450         (benchmark_memalign): Added a test for specific interesting memalign values.
2451
2452         * MallocBench/MallocBench/stress_aligned.cpp: Added.
2453         (benchmark_stress_aligned):
2454         * MallocBench/MallocBench/stress_aligned.h: Added. Added a stress test
2455         for arbitrary memalign values.
2456
2457 2015-01-16  Geoffrey Garen  <ggaren@apple.com>
2458
2459         bmalloc: added the tiniest bit of testing for aligned allocation
2460         https://bugs.webkit.org/show_bug.cgi?id=140573
2461
2462         Reviewed by Andreas Kling.
2463
2464         Just good enoug to catch two bugs in a preliminary implementation.
2465
2466         * MallocBench/MallocBench.xcodeproj/project.pbxproj:
2467         * MallocBench/MallocBench/Benchmark.cpp:
2468         * MallocBench/MallocBench/mbmalloc.cpp:
2469         * MallocBench/MallocBench/mbmalloc.h:
2470         * MallocBench/MallocBench/memalign.cpp: Added.
2471         (benchmark_memalign):
2472         * MallocBench/MallocBench/memalign.h: Added.
2473
2474 2014-12-09  Myles C. Maxfield  <mmaxfield@apple.com>
2475
2476         Add performance test related to font fallback
2477         https://bugs.webkit.org/show_bug.cgi?id=139332
2478
2479         Reviewed by Simon Fraser.
2480
2481         * Layout/font-fallback.html: Added.
2482         * Layout/resources/font-fallback.html: Added.
2483
2484 2014-12-08  Dean Jackson  <dino@apple.com>
2485
2486         [Apple] Use Accelerate framework to speed-up FEGaussianBlur
2487         https://bugs.webkit.org/show_bug.cgi?id=139310
2488
2489         Reviewed by Simon Fraser.
2490
2491         Add an interactive performance test that measures the speed of a set
2492         of blur operations on a generated images.
2493
2494         * Interactive/blur-filter-timing.html: Added.
2495
2496 2014-11-13  Zalan Bujtas  <zalan@apple.com>
2497
2498         Simple line layout: Add performance test case to measure line layout speed of monolithic text content.
2499         https://bugs.webkit.org/show_bug.cgi?id=138699
2500
2501         Reviewed by Antti Koivisto.
2502
2503         * Layout/line-layout-long-long-text.html: Added.
2504
2505 2014-10-22  Zalan Bujtas  <zalan@apple.com>
2506
2507         Speed up line parsing for simple line layout (part I)
2508         https://bugs.webkit.org/show_bug.cgi?id=137275
2509
2510         Reviewed by Antti Koivisto.
2511
2512         Extend simple line layout performance test with a few more cases.
2513         Now we've got:
2514         <div center
2515         <div right
2516         <div justify
2517         <div white-space: pre (new)
2518         <div overflow-wrap: break-word (new)
2519         <pre
2520         <pre white-space: pre-wrap
2521         <pre white-space: pre-line (new)
2522         <pre white-space: nowrap (new)
2523         <pre white-space: pre-wrap overflow-wrap: break-word
2524         <div + embedded <span etc.
2525         <div + br
2526
2527         * Layout/line-layout-simple.html:
2528
2529 2014-10-15  Andrei Bucur  <abucur@adobe.com>
2530
2531         [Multicol] Start adding performance tests for the multi-column implementation
2532         https://bugs.webkit.org/show_bug.cgi?id=137687
2533
2534         Reviewed by Mihnea Ovidenie.
2535
2536         This patch creates a Multicol folder inside the Layout performance tests suite. It adds only two tests
2537         as described below.
2538
2539         The tests are skipped until the implementation stabilizes.
2540
2541         * Layout/Multicol/MulticolManyColumns.html: Added.
2542         This test verifies the performance of the multi-column implementation with two nested multi-column
2543         containers, the first having 20 columns and the second 10 columns.
2544
2545         * Layout/Multicol/MulticolNested.html: Added.
2546         This test verifies the performance of nesting multi-column containers in the presence
2547         of floats.
2548
2549         * Layout/Multicol/resources/multicol-content-many-columns.html: Added.
2550         * Layout/Multicol/resources/multicol-content-nested.html: Added.
2551         * Skipped: Skip the Multicol folder for now.
2552
2553 2014-09-29  Filip Pizlo  <fpizlo@apple.com>
2554
2555         It should be fun and easy to run every possible JavaScript benchmark from the command line
2556         https://bugs.webkit.org/show_bug.cgi?id=137245
2557
2558         Reviewed by Oliver Hunt.
2559         
2560         This adds the scaffolding for running Octane version 2 inside run-jsc-benchmarks.
2561         In the future we should just land Octane2 in this directory, and run-jsc-benchmarks
2562         should be changed to point directly at this directory instead of requiring the
2563         Octane path to be configured as part of the configuration file.
2564
2565         * Octane: Added.
2566         * Octane/wrappers: Added.
2567         * Octane/wrappers/jsc-box2d.js: Added.
2568         (jscSetUp):
2569         (jscTearDown):
2570         (jscRun):
2571         * Octane/wrappers/jsc-boyer.js: Added.
2572         (jscSetUp):
2573         (jscTearDown):
2574         (jscRun):
2575         * Octane/wrappers/jsc-closure.js: Added.
2576         (jscSetUp):
2577         (jscTearDown):
2578         (jscRun):
2579         * Octane/wrappers/jsc-decrypt.js: Added.
2580         (jscSetUp):
2581         (jscTearDown):
2582         (jscRun):
2583         * Octane/wrappers/jsc-deltablue.js: Added.
2584         (jscSetUp):
2585         (jscTearDown):
2586         (jscRun):
2587         * Octane/wrappers/jsc-earley.js: Added.
2588         (jscSetUp):
2589         (jscTearDown):
2590         (jscRun):
2591         * Octane/wrappers/jsc-encrypt.js: Added.
2592         (jscSetUp):
2593         (jscTearDown):
2594         (jscRun):
2595         * Octane/wrappers/jsc-gbemu.js: Added.
2596         (jscSetUp):
2597         (jscTearDown):
2598         (jscRun):
2599         * Octane/wrappers/jsc-jquery.js: Added.
2600         (jscSetUp):
2601         (jscTearDown):
2602         (jscRun):
2603         * Octane/wrappers/jsc-mandreel.js: Added.
2604         (jscSetUp):
2605         (jscTearDown):
2606         (jscRun):
2607         * Octane/wrappers/jsc-navier-stokes.js: Added.
2608         (jscSetUp):
2609         (jscTearDown):
2610         (jscRun):
2611         * Octane/wrappers/jsc-pdfjs.js: Added.
2612         (jscSetUp.PdfJS_window.console.log):
2613         (jscSetUp):
2614         (jscTearDown):
2615         (jscRun):
2616         * Octane/wrappers/jsc-raytrace.js: Added.
2617         (jscSetUp):
2618         (jscTearDown):
2619         (jscRun):
2620         * Octane/wrappers/jsc-regexp.js: Added.
2621         (jscSetUp):
2622         (jscTearDown):
2623         (jscRun):
2624         * Octane/wrappers/jsc-richards.js: Added.
2625         (jscSetUp):
2626         (jscTearDown):
2627         (jscRun):
2628         * Octane/wrappers/jsc-splay.js: Added.
2629         (jscSetUp):
2630         (jscTearDown):
2631         (jscRun):
2632         * Octane/wrappers/jsc-typescript.js: Added.
2633         (jscSetUp):
2634         (jscTearDown):
2635         (jscRun):
2636         * Octane/wrappers/jsc-zlib.js: Added.
2637         (jscSetUp):
2638         (jscTearDown):
2639         (jscRun):
2640
2641 2014-09-28  Sungmann Cho  <sungmann.cho@navercorp.com>
2642
2643         Fix some minor typos: psuedo -> pseudo
2644         https://bugs.webkit.org/show_bug.cgi?id=137192
2645
2646         Reviewed by Alexey Proskuryakov.
2647
2648         * Speedometer/resources/todomvc/architecture-examples/emberjs/bower_components/handlebars/handlebars.js:
2649
2650 2014-09-11  Geoffrey Garen  <ggaren@apple.com>
2651
2652         Some MallocBench refinements
2653         https://bugs.webkit.org/show_bug.cgi?id=136750
2654
2655         Reviewed by Sam Weinig.
2656
2657         * MallocBench/MallocBench/Interpreter.cpp:
2658         (Interpreter::run): Allow for null entries in the object list so that
2659         we can test in modes that exclude large or small allocations.
2660
2661         * MallocBench/MallocBench/churn.cpp:
2662         (benchmark_churn):
2663         * MallocBench/MallocBench/flickr.cpp:
2664         (benchmark_flickr):
2665         * MallocBench/MallocBench/fragment.cpp:
2666         (benchmark_fragment_iterate):
2667         * MallocBench/MallocBench/list.cpp:
2668         (benchmark_list_allocate):
2669         * MallocBench/MallocBench/reddit.cpp:
2670         (benchmark_reddit): Updated test runtimes to weight them more equally,
2671         for the sake of arithmetic mean.
2672
2673         * MallocBench/MallocBench/stress.cpp:
2674         (Object::Object):
2675         (allocate):
2676         (deallocate):
2677         (benchmark_stress): Verify the contents of memory as we go. Also,
2678         force scavenging each time through the loop to test the scavenging path.
2679
2680         * MallocBench/MallocBench/theverge.cpp:
2681         (benchmark_theverge):
2682         * MallocBench/MallocBench/tree.cpp:
2683         (benchmark_tree_churn): Re-weighted, as above.
2684
2685 2014-09-08  Myles C. Maxfield  <mmaxfield@apple.com>
2686
2687         PerformanceTests/SVG/SVG-Text.html has unparsable output
2688         https://bugs.webkit.org/show_bug.cgi?id=136648
2689
2690         Reviewed by Gavin Barraclough.
2691
2692         I need to clean up the arbitrary text on the page before telling
2693         the test runner infrastructure that the test is complete.
2694
2695         * SVG/SVG-Text.html:
2696
2697 2014-09-05  Myles C. Maxfield  <mmaxfield@apple.com>
2698
2699         Laying out a TextRun using an SVG font is O(n^2)
2700         https://bugs.webkit.org/show_bug.cgi?id=136584
2701
2702         Reviewed by Andreas Kling.
2703
2704         Time how long it takes to lay out and render some text using an SVG font.
2705
2706         * SVG/SVG-Text.html: Added.
2707         * SVG/resources/graffiti.svg: Added.
2708
2709 2014-09-02  Geoffrey Garen  <ggaren@apple.com>
2710
2711         MallocBench should have a stress test for correctness
2712         https://bugs.webkit.org/show_bug.cgi?id=136468
2713
2714         Reviewed by Andreas Kling.
2715
2716         Added a stress test that allocates randomized sizes of randomized
2717         lifetimes in randomized order.
2718
2719         This version of the test reproduces the EWS crash seen in bmalloc
2720         (<https://bugs.webkit.org/show_bug.cgi?id=132629>).
2721
2722         * MallocBench/MallocBench.xcodeproj/project.pbxproj:
2723         * MallocBench/MallocBench/Benchmark.cpp: Sort!
2724         * MallocBench/MallocBench/stress.cpp: Added.
2725         (Object::Object):
2726         (SizeStream::SizeStream):
2727         (SizeStream::next):
2728         (benchmark_stress): Usually, we random(0). Surprisingly, though, only
2729         random(1) reproduces the bug I was looking for.
2730         * MallocBench/MallocBench/stress.h: Added.
2731
2732 2014-06-02  Ryosuke Niwa  <rniwa@webkit.org>
2733
2734         Rename DoYouEvenBench 0.17 to Speedometer 1.0 and add a new look.
2735         https://bugs.webkit.org/show_bug.cgi?id=133455
2736
2737         Reviewed by Timothy Hatcher.
2738
2739         * Speedometer/: Renamed from DoYouEvenBench.
2740         * Skipped: Updated the path for InteractiveRunner.html
2741
2742 2014-06-02  Ryosuke Niwa  <rniwa@webkit.org>
2743
2744         Rename DoYouEvenBench 0.17 to Speedometer 1.0 and add a new look.
2745         https://bugs.webkit.org/show_bug.cgi?id=133455
2746
2747         Reviewed by Timothy Hatcher.
2748
2749         Renamed the benchmark to Speedometer and added the new look designed by Timothy Hatcher.
2750
2751         Also changed the unit of measurements from milliseconds to runs-per-minute averaged over the number
2752         of the benchmark suites (7 for 1.0). You can divide 420000 by the old benchmark score (in milliseconds)
2753         to get the new value for the set of tests that are enabled by default in 1.0. You can continue to see
2754         results in milliseconds on Full.html#ms.
2755
2756         * DoYouEvenBench/Full.html: Added a bunch of sections and the description of the benchmark.
2757
2758         * DoYouEvenBench/resources/benchmark-report.js: Remove the newly added content when ran inside a DRT or
2759         WTR so that run-perf-tests wouldn't error.
2760         * DoYouEvenBench/resources/benchmark-runner.js:
2761         (BenchmarkRunner.prototype._appendFrame): Call a newly added willAddTestFrame callback when it exists.
2762
2763         * DoYouEvenBench/resources/gauge.png: Added.
2764         * DoYouEvenBench/resources/gauge@2x.png: Added.
2765         * DoYouEvenBench/resources/logo.png: Added.
2766         * DoYouEvenBench/resources/logo@2x.png: Added.
2767         * DoYouEvenBench/resources/main.css: Replaced the style.
2768
2769         * DoYouEvenBench/resources/main.js:
2770         (window.benchmarkClient.willAddTestFrame): Place the iframe right where #testContainer is shown.
2771         (window.benchmarkClient.willRunTest): Show the name of the suite (e.g. EmberJS-TodoMVC) to run next.
2772         (window.benchmarkClient.didRunSuites):
2773         (window.benchmarkClient.willStartFirstIteration): Initialize _timeValues and _finishedTestCount now that
2774         we have an UI to run the benchmark multiple times without reloading the page.
2775         (window.benchmarkClient.didFinishLastIteration): Split into smaller pieces.
2776         (window.benchmarkClient._computeResults): Computes the mean and the statistics for the given time values,
2777         and also format them in a human readable form.
2778         (window.benchmarkClient._computeResults.totalTimeInDisplayUnit): Converts ms to runs/min.
2779         (window.benchmarkClient._computeResults.sigFigFromPercentDelta): Given a percentage error (e.g. 1%),
2780         returns the number of significant digits required for the mean.
2781         (window.benchmarkClient._computeResults.toSigFigPrecision): Calls toPrecision with the specified precision
2782         constrained to be at least the number of non-decimal digits and at most 6.
2783         (window.benchmarkClient._addDetailedResultsRow): Renamed from _addResult. It now takes the table to which
2784         to add a row and the iteration number.
2785         (window.benchmarkClient._updateGaugeNeedle): Added. Controls the angle of the speed indicator.
2786         (window.benchmarkClient._populateDetailedResults): Added.
2787         (window.benchmarkClient.prepareUI): Added. It adds an event listener to show a specified section when
2788         the push state of the document changes, and shows a warning sign when the view port size is too small.
2789         We do this inside a callback to avoid running it inside DRT / WTR.
2790         (startBenchmark):
2791         (showSection): Added.
2792         (startTest): Added.
2793         (showResultsSummary): Added.
2794         (showResultDetails): Added.
2795         (showAbout): Added.
2796
2797 2014-06-01  Ryosuke Niwa  <rniwa@webkit.org>
2798
2799         DYEBench: Move test states into benchmarkClient and remove the closure
2800         https://bugs.webkit.org/show_bug.cgi?id=133438
2801
2802         Reviewed by Benjamin Poulain.
2803
2804         Moved all local variables in the closure wrapping benchmarkClient onto the object itself
2805         and removed the closure to improve the readability of the code.
2806
2807         * DoYouEvenBench/Full.html:
2808         * DoYouEvenBench/resources/main.js:
2809         (window.benchmarkClient.willRunTest):
2810         (window.benchmarkClient.didRunTest):
2811         (window.benchmarkClient.didRunSuites):
2812         (window.benchmarkClient.willStartFirstIteration):
2813         (window.benchmarkClient.didFinishLastIteration):
2814         (window.benchmarkClient._addResult): Moved.
2815         (.): Deleted.
2816
2817 2014-06-01  Ryosuke Niwa  <rniwa@webkit.org>
2818
2819         DYEBench: Split stylesheets and scripts in Full.html into separate files
2820         https://bugs.webkit.org/show_bug.cgi?id=133437
2821
2822         Reviewed by Benjamin Poulain.
2823
2824         Extracted main.js and main.css.
2825
2826         Also fixed a bug in startBenchmark that disabled suites were counted towards the total number of tests.
2827
2828         * DoYouEvenBench/Full.html:
2829         * DoYouEvenBench/resources/main.css: Added.
2830         * DoYouEvenBench/resources/main.js: Added.
2831         (.addResult):
2832         (window.benchmarkClient):
2833         (startBenchmark): Renamed from startTest.
2834
2835 2014-06-01  Ryosuke Niwa  <rniwa@webkit.org>
2836
2837         DYEBench: CSS parser warning at line 106 of base.css
2838         https://bugs.webkit.org/show_bug.cgi?id=133433
2839
2840         Reviewed by Maciej Stachowiak.
2841
2842         Removed the old filter CSS property for Internet Explorer. The latest Internet Explorer supports -ms-linear-gradient
2843         on background CSS property anyways.
2844
2845         It's interesting that some of the tests only have -webkit- prefixes. Perhaps we should update those subtests.
2846
2847         * DoYouEvenBench/Full.html:
2848         * DoYouEvenBench/resources/todomvc/architecture-examples/angularjs/bower_components/todomvc-common/base.css:
2849         (#header:before):
2850         * DoYouEvenBench/resources/todomvc/architecture-examples/backbone/bower_components/todomvc-common/base.css:
2851         (#header:before):
2852         * DoYouEvenBench/resources/todomvc/architecture-examples/emberjs/bower_components/todomvc-common/base.css:
2853         (#header:before):
2854         * DoYouEvenBench/resources/todomvc/architecture-examples/jquery/bower_components/todomvc-common/base.css:
2855         (#header:before):
2856         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.css:
2857         (#header:before):
2858         * DoYouEvenBench/resources/todomvc/labs/architecture-examples/react/bower_components/todomvc-common/base.css:
2859         (#header:before):
2860         * DoYouEvenBench/resources/todomvc/vanilla-examples/vanillajs/bower_components/todomvc-common/base.css:
2861         (#header:before):
2862
2863 2014-05-31  Ryosuke Niwa  <rniwa@webkit.org>
2864
2865         DYEBench: Ember.js assertion hit at line 20593
2866         https://bugs.webkit.org/show_bug.cgi?id=133431
2867
2868         Reviewed by Darin Adler.
2869
2870         The assertion was hit because ToDoMVC includes jQuery 2.1 and Ember.js 1.3.1 only recognizes jQuery 2.0.
2871         Port the assertion from Ember.js 1.5.1 to suppress the assertion.
2872
2873         We should update the entire Ember.js at some point but this would do the job for now.
2874
2875         * DoYouEvenBench/Full.html:
2876         * DoYouEvenBench/resources/todomvc/architecture-examples/emberjs/bower_components/ember/ember.js:
2877
2878 2014-05-31  Ryosuke Niwa  <rniwa@webkit.org>
2879
2880         DYEBench: Prevent frame flattening on iOS
2881         https://bugs.webkit.org/show_bug.cgi?id=133428
2882
2883         Reviewed by Andreas Kling.
2884
2885         Prevent frame flattening on iOS by setting scrolling=no.
2886
2887         * DoYouEvenBench/Full.html:
2888         * DoYouEvenBench/resources/benchmark-runner.js:
2889         (BenchmarkRunner.prototype._appendFrame):
2890
2891 2014-05-30  Ryosuke Niwa  <rniwa@webkit.org>
2892
2893         DYEBench spits out 404 errors for learn.json
2894         https://bugs.webkit.org/show_bug.cgi?id=133416
2895
2896         Reviewed by Oliver Hunt.
2897
2898         Add an empty learn.json file so that it won't cause a 404 error when hosted on a http server.
2899
2900         Bumped the version number to 0.12.
2901
2902         * DoYouEvenBench/Full.html:
2903         * DoYouEvenBench/resources/todomvc/learn.json:
2904
2905 2014-05-23  Geoffrey Garen  <ggaren@apple.com>
2906
2907         Performance testing, diamond-square terrain generation + canvas
2908         https://bugs.webkit.org/show_bug.cgi?id=133054
2909
2910         Reviewed by Ryosuke Niwa.
2911
2912         This test was written by Hunter Loftis. It originally appeared on his
2913         blog @ <http://www.playfuljs.com/realistic-terrain-in-130-lines/>.
2914
2915         I did a bit of editing for format and benchmark suitability.
2916
2917         * Canvas/terrain.html: Added.
2918
2919 2014-05-13  Ryosuke Niwa  <rniwa@webkit.org>
2920
2921         DYEBench should run 20 iterations in browser
2922         https://bugs.webkit.org/show_bug.cgi?id=132795
2923
2924         Reviewed by Gavin Barraclough.
2925
2926         Right now, run-perf-tests runs BYEBench 4 times with different instances of DRT/WTR to get
2927         a more stable time and account for differences in the runtime environment, particularly,
2928         ASLR (Address Space Layout Randomization).
2929
2930         While we can't account for the latter effect when the benchmark is ran inside a browser,
2931         we can at least run 20 iterations to get a more stable (but perhaps biased by ALSR) number.
2932
2933         While the sample size of 20 is statistically unsound to compute the arithmetic mean from,
2934         it's MUCH better than the current sample size of 5.
2935
2936         * DoYouEvenBench/Full.html:
2937         (benchmarkClient.iterationCount): Set the default iteration count to 20.
2938         (startTest): Use benchmarkClient.iterationCount as the iteration count.
2939         * DoYouEvenBench/resources/benchmark-report.js:
2940         (benchmarkClient.iterationCount): Continue to use the old iteration count of 5 when ran
2941         inside run-perf-tests.
2942
2943 2014-05-09  Ryosuke Niwa  <rniwa@webkit.org>
2944
2945         DYEBench should show 95th percentile right next to the mean with ±
2946         https://bugs.webkit.org/show_bug.cgi?id=132729
2947
2948         Reviewed by Darin Adler.
2949
2950         Before this patch, Full.html showed the 95th percentile delta for the arthemtic mean in a separate row
2951         but this was confusing for some people. Show it right next to mean in the same row separated by ±.
2952
2953         * DoYouEvenBench/Full.html:
2954
2955 2014-05-08  Ryosuke Niwa  <rniwa@webkit.org>
2956
2957         DYEBench should use TodoMVC to test FlightJS for consistency
2958         https://bugs.webkit.org/show_bug.cgi?id=132727
2959
2960         Reviewed by Andreas Kling.
2961
2962         Add a test suite for the FlightJS version of TodoMVC, and disable FlightJS-MailClient by default.
2963
2964         I initially intended to include a wider variety of demo apps in DYEBench
2965         but that's not happening any time soon so let us use TodoMVC for all frameworks for now.
2966
2967         We can add more demo apps in v2.
2968
2969         * DoYouEvenBench/Full.html: Increment the version to 0.10.
2970         * DoYouEvenBench/InteractiveRunner.html: Don't check disabled suites by default.
2971         * DoYouEvenBench/resources/tests.js:
2972         * DoYouEvenBench/resources/todomvc/dependency-examples: Added.
2973         * DoYouEvenBench/resources/todomvc/dependency-examples/flight: Added.
2974         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/.gitignore: Added.
2975         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/.jshintrc: Added.
2976         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app: Added.
2977         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js: Added.
2978         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/app.js: Added.
2979         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data: Added.
2980         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data/stats.js: Added.
2981         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/data/todos.js: Added.
2982         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/main.js: Added.
2983         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/store.js: Added.
2984         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui: Added.
2985         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/main_selector.js: Added.
2986         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/new_item.js: Added.
2987         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/stats.js: Added.
2988         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/todo_list.js: Added.
2989         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/toggle_all.js: Added.
2990         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/ui/with_filters.js: Added.
2991         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/js/utils.js: Added.
2992         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates: Added.
2993         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates/stats.html: Added.
2994         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/app/templates/todo.html: Added.
2995         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower.json: Added.
2996         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components: Added.
2997         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/depot: Added.
2998         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/depot/depot.js: Added.
2999         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim: Added.
3000         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-sham.js: Added.
3001         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/es5-shim/es5-shim.js: Added.
3002         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight: Added.
3003         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib: Added.
3004         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/advice.js: Added.
3005         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/base.js: Added.
3006         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/component.js: Added.
3007         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/compose.js: Added.
3008         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/debug.js: Added.
3009         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/index.js: Added.
3010         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/logger.js: Added.
3011         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/registry.js: Added.
3012         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/flight/lib/utils.js: Added.
3013         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/jquery: Added.
3014         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/jquery/jquery.js: Added.
3015         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs: Added.
3016         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs-text: Added.
3017         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs-text/text.js: Added.
3018         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/requirejs/require.js: Added.
3019         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common: Added.
3020         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.css: Added.
3021         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/base.js: Added.
3022         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/bower_components/todomvc-common/bg.png: Added.
3023         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/index.html: Added.
3024         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/karma.conf.js: Added.
3025         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/package.json: Added.
3026         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/readme.md: Added.
3027         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test: Added.
3028         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/.jshintrc: Added.
3029         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture: Added.
3030         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/footer.html: Added.
3031         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/new_todo.html: Added.
3032         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/fixture/toggle_all.html: Added.
3033         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/mock: Added.
3034         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/mock/datastore.js: Added.
3035         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec: Added.
3036         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data: Added.
3037         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data/stats_spec.js: Added.
3038         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/data/todos_spec.js: Added.
3039         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui: Added.
3040         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/new_item_spec.js: Added.
3041         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/stats_spec.js: Added.
3042         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/spec/ui/toggle_all_spec.js: Added.
3043         * DoYouEvenBench/resources/todomvc/dependency-examples/flight/test/test-main.js: Added.
3044
3045 2014-05-07  Manuel Rego Casasnovas  <rego@igalia.com>
3046
3047         [CSS Grid Layout] Remove runtime feature
3048         https://bugs.webkit.org/show_bug.cgi?id=132382
3049
3050         Reviewed by Benjamin Poulain.
3051
3052         Remove set of WebKitCSSGridLayoutEnabled preference.
3053
3054         * Layout/auto-grid-lots-of-data.html:
3055         * Layout/fixed-grid-lots-of-data.html:
3056
3057 2014-05-06  Radu Stavila  <stavila@adobe.com>
3058
3059         [CSSRegions] Enabled regions performance tests by default
3060         https://bugs.webkit.org/show_bug.cgi?id=128244
3061
3062         Reviewed by Andreas Kling.
3063
3064         Enabled regions performance tests.
3065
3066         * Skipped:
3067
3068 2014-04-25  Andreas Kling  <akling@apple.com>
3069
3070         Bump jQuery to same version that dromaeo.com uses.
3071
3072         Rubber-stamped by Ryosuke Niwa.
3073
3074         * Dromaeo/resources/dromaeo/web/lib/jquery-1.10.2.min.js: Added.
3075         * Dromaeo/resources/dromaeo/web/tests/cssquery-jquery.html:
3076         * Dromaeo/resources/dromaeo/web/tests/jslib-attr-jquery.html:
3077         * Dromaeo/resources/dromaeo/web/tests/jslib-event-jquery.html:
3078         * Dromaeo/resources/dromaeo/web/tests/jslib-modify-jquery.html:
3079         * Dromaeo/resources/dromaeo/web/tests/jslib-style-jquery.html:
3080         * Dromaeo/resources/dromaeo/web/tests/jslib-traverse-jquery.html:
3081
3082 2014-04-18  Geoffrey Garen  <ggaren@apple.com>
3083
3084         Added some more Membuster recordings to MallocBench
3085         https://bugs.webkit.org/show_bug.cgi?id=131862
3086
3087         Reviewed by Sam Weinig.
3088
3089         * MallocBench/MallocBench/Benchmark.cpp:
3090         (Benchmark::Benchmark):
3091         (Benchmark::run):
3092         * MallocBench/MallocBench/Benchmark.h:
3093         * MallocBench/MallocBench/CommandLine.cpp:
3094         * MallocBench/MallocBench/CommandLine.h:
3095         (CommandLine::runs): Added a --runs option, so we can specify zero runs
3096         for memory warning benchmarks. Those benchmarks want zero runs so that
3097         they can perform a single warmup, which does not free all allocated
3098         objects, and then see how far back to 0MB they can get. Running multiple
3099         times would accumulate leaks, which is not representative of the
3100         simulated scenario.
3101
3102         * MallocBench/MallocBench/Interpreter.cpp:
3103         (Interpreter::Interpreter):
3104         (Interpreter::run):
3105         * MallocBench/MallocBench/Interpreter.h: Support not deallocating all
3106         objects allocated during the recording, so we can do low memory warning
3107         memory use measurements, as above.
3108
3109         * MallocBench/MallocBench/flickr.cpp:
3110         (benchmark_flickr_memory_warning):
3111         * MallocBench/MallocBench/main.cpp:
3112         (main):
3113         * MallocBench/MallocBench/reddit.cpp:
3114         (benchmark_reddit_memory_warning):
3115         * MallocBench/MallocBench/theverge.cpp:
3116         (benchmark_theverge_memory_warning): Adopt the API above.
3117
3118         * MallocBench/run-malloc-benchmarks: I took a first pass at listing all
3119         available benchmarks here. Then I commented out the benchmarks that
3120         probably aren't reasonable to run by default.
3121
3122 2014-04-18  Geoffrey Garen  <ggaren@apple.com>
3123
3124         MallocBench: removed the --measure-heap option
3125         https://bugs.webkit.org/show_bug.cgi?id=131854
3126
3127         Reviewed by Sam Weinig.
3128
3129         As of <https://bugs.webkit.org/show_bug.cgi?id=131661>, measuring the
3130         heap is fast, so there's no reason to disable it.
3131
3132         * MallocBench/MallocBench/Benchmark.cpp:
3133         (Benchmark::Benchmark):
3134         (Benchmark::run):
3135         (Benchmark::printReport):
3136         * MallocBench/MallocBench/Benchmark.h:
3137         * MallocBench/MallocBench/CommandLine.cpp:
3138         (CommandLine::printUsage):
3139         * MallocBench/MallocBench/CommandLine.h:
3140         (CommandLine::heapSize):
3141         (CommandLine::measureHeap): Deleted.
3142         * MallocBench/MallocBench/main.cpp:
3143         (main):
3144
3145 2014-04-16  Alexandru Chiculita  <achicu@adobe.com>
3146
3147         Improve performance of the RenderLayerCompositor::OverlapMap
3148         https://bugs.webkit.org/show_bug.cgi?id=115063
3149
3150         Reviewed by Simon Fraser.
3151
3152         Testing the performance of computing the overlap of 5000 layers.
3153
3154         * Layout/layers_overlap_2d.html: Added. Using non-composited layers, to check
3155         that the performance on the non-composited path is not changing with this patch.
3156         * Layout/layers_overlap_3d.html: Added. Records the time to do the layout of 5000
3157         non-overlapping 3D layers.
3158
3159 2014-04-15  Zoltan Horvath  <zoltan@webkit.org>
3160
3161         [CSS Shapes] Linking stylesheet instead of inline style definition has ruined ShapesRegions test
3162         https://bugs.webkit.org/show_bug.cgi?id=131572
3163
3164         Reviewed by Rob Buis.
3165
3166         In r167022 I moved the common CSS selectors into RegionsShapes.css, then I linked it into the perf test
3167         files, but the measurement results dropped down from about 400ms to 10ms. I realized it's caused by the
3168         linked css rule, so I've put the selectors back into every test case, which fixes the test measurements.
3169
3170         * Layout/Shapes/resources/RegionsShapes.css: Removed.
3171         * Layout/Shapes/resources/RegionsShapesContent.html:
3172         * Layout/Shapes/resources/RegionsShapesContentNoRegionsWidth400.html:
3173         * Layout/Shapes/resources/RegionsShapesContentNoRegionsWidth600.html:
3174         * Layout/Shapes/resources/RegionsShapesContentNoRegionsWidth800.html:
3175         * Layout/Shapes/resources/RegionsShapesContentNoShapes.html:
3176
3177 2014-04-14  Geoffrey Garen  <ggaren@apple.com>
3178
3179         MallocBench should scavenge explicitly instead of waiting
3180         https://bugs.webkit.org/show_bug.cgi?id=131661
3181
3182         Reviewed by Andreas Kling.
3183
3184         * MallocBench/MallocBench.xcodeproj/project.pbxproj: Don't build mbmalloc
3185         by default because it will overwrite any other mbmalloc you're working
3186         with in the WebKitBuild directory.
3187
3188         * MallocBench/MallocBench/Benchmark.cpp:
3189         (Benchmark::run): Scavenge explicitly instead of waiting. This is faster,
3190         and it's the only way to get FastMalloc to scavenge. (That's a bug in
3191         FastMalloc, but we don't want it to interfere with broader testing.)
3192
3193         * MallocBench/MallocBench/mbmalloc.cpp:
3194         * MallocBench/MallocBench/mbmalloc.h: Added a scavenge implementation
3195         for system malloc.
3196
3197 2014-04-14  Geoffrey Garen  <ggaren@apple.com>
3198
3199         A few MallocBench record/replay fixes
3200         https://bugs.webkit.org/show_bug.cgi?id=131627
3201
3202         Reviewed by Andreas Kling.
3203
3204         * MallocBench/MallocBench/Interpreter.cpp:
3205         (Interpreter::run): Accept 0-sized allocations without asserting because
3206         WebKit does that sometimes.
3207
3208         * MallocBench/MallocBench/flickr.ops:
3209         * MallocBench/MallocBench/flickr_memory_warning.ops:
3210         * MallocBench/MallocBench/reddit.ops:
3211         * MallocBench/MallocBench/reddit_memory_warning.ops:
3212         * MallocBench/MallocBench/theverge.ops:
3213         * MallocBench/MallocBench/theverge_memory_warning.ops: Updated these
3214         recordings because a bug in the recording mechanism caused one out of
3215         every few thousand slot values to be bogus.
3216
3217 2014-04-13  Geoffrey Garen  <ggaren@apple.com>
3218
3219         Added some website recordings to MallocBench -- taken from Membuster
3220         https://bugs.webkit.org/show_bug.cgi?id=131601
3221
3222         Reviewed by Ryosuke Niwa.
3223
3224         Added flickr, reddit, and theverge -- each recorded from Membuster's
3225         cache, with and without sending Safari a low memory warning.
3226
3227         * MallocBench/MallocBench.xcodeproj/project.pbxproj:
3228         * MallocBench/MallocBench/Benchmark.cpp:
3229         * MallocBench/MallocBench/flickr.cpp: Added.
3230         (benchmark_flickr):
3231         (benchmark_flickr_memory_warning):
3232         * MallocBench/MallocBench/flickr.h: Added.
3233         * MallocBench/MallocBench/flickr.ops: Added.
3234         * MallocBench/MallocBench/flickr_memory_warning.ops: Added.
3235         * MallocBench/MallocBench/reddit.cpp: Added.
3236         (benchmark_reddit):
3237         (benchmark_reddit_memory_warning):
3238         * MallocBench/MallocBench/reddit.h: Added.
3239         * MallocBench/MallocBench/reddit.ops: Added.
3240         * MallocBench/MallocBench/reddit_memory_warning.ops: Added.
3241         * MallocBench/MallocBench/theverge.cpp: Added.
3242         (benchmark_theverge):
3243         (benchmark_theverge_memory_warning):
3244         * MallocBench/MallocBench/theverge.h: Added.
3245         * MallocBench/MallocBench/theverge.ops: Added.
3246         * MallocBench/MallocBench/theverge_memory_warning.ops: Added.
3247
3248 2014-04-13  Geoffrey Garen  <ggaren@apple.com>