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