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