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