d5c73b5e39f9c118176ec786865751592851d050
[WebKit.git] / PerformanceTests / ChangeLog
1 2016-03-23  Jon Lee  <jonlee@apple.com>
2
3         Update focus and leaves tests
4         https://bugs.webkit.org/show_bug.cgi?id=155825
5
6         Reviewed by Simon Fraser.
7
8         Particles would improperly disappear, before they were fully off stage. Update the calculation.
9         * Animometer/tests/dom/resources/leaves.js:
10         * Animometer/tests/master/resources/leaves.js:
11
12         * Animometer/tests/master/focus.html: Update the center element styling.
13         * Animometer/tests/master/resources/focus.js:
14         (FocusElement.Utilities.createClass): Give enough space in the container for each particle for the blur
15         to spread. It should be about 3x more space than the blur radius on each side.
16         (Stage.call.initialize): Ditto for the center element.
17
18 2016-03-23  Jon Lee  <jonlee@apple.com>
19
20         Update support for other platforms
21         https://bugs.webkit.org/show_bug.cgi?id=155824
22
23         Reviewed by Simon Fraser.
24
25         * Animometer/resources/debug-runner/animometer.css: Remove extraneous media query. All of it should
26         be handled in the release stylesheet.
27         * Animometer/resources/debug-runner/animometer.js: Add support for browsers that return an HTMLCollection
28         when retrieving radio elements with a name, instead of the selected value.
29         * Animometer/resources/runner/animometer.css: Adjust the queries for devices of varying widths.
30         (.frame-container): Move overflow:hidden to #stage.
31         * Animometer/tests/master/resources/stage.css: Consolidate into tests/resources/stage.css.
32         * Animometer/tests/resources/stage.css:
33         (body): Remove overflow:hidden.
34         (#stage): Set overflow:hidden here.
35         (#center-text): Moved from master/resources/stage.css.
36
37         Update stylesheet hrefs.
38         * Animometer/tests/master/canvas-stage.html:
39         * Animometer/tests/master/focus.html:
40         * Animometer/tests/master/leaves.html:
41         * Animometer/tests/master/multiply.html:
42         * Animometer/tests/master/particles.html:
43         * Animometer/tests/master/text.html: Adjust text size to fit in the device screen.
44
45 2016-03-23  Jon Lee  <jonlee@apple.com>
46
47         Make the benchmark require device to be in landscape orientation
48         https://bugs.webkit.org/show_bug.cgi?id=155822
49         rdar://problem/25258650
50
51         Reviewed by Ryosuke Niwa.
52
53         Check that the device is in landscape orientation. If not, disable the button to start it,
54         and show a warning message.
55
56         * Animometer/developer.html: Add a message about how the browser should be set up. Include a
57         warning message that appears if the orientation is incorrect on mobile devices.
58         * Animometer/index.html: Ditto.
59
60         * Animometer/resources/debug-runner/animometer.css: Migrate the .hidden rule into the release
61         stylesheet. Update the style to accommodate the new UI.
62         * Animometer/resources/runner/animometer.css:
63
64         * Animometer/resources/runner/animometer.js:
65         (window.benchmarkController.initialize): Add the orientation listener is needed.
66         (window.benchmarkController.addOrientationListenerIfNecessary): Only mobile devices need this. Check
67         to see for support of window.orientation.
68         (window.benchmarkController._orientationChanged): Toggle the warning based on whether we match the
69         landscape query. Set a state variable, which is needed for the debug harness. Call updateStartButtonState.
70         (window.benchmarkController.updateStartButtonState):
71         * Animometer/resources/debug-runner/animometer.js: Change _updateStartButtonState to return
72         a boolean about whether at least one test is selected. That will be used in
73         benchmarkController.updateStartButtonState(). Move the load event listener to the release version.
74         (window.benchmarkController.updateStartButtonState): Override the release version, and also check
75         that at least one test is selected.
76
77 2016-03-22  Geoffrey Garen  <ggaren@apple.com>
78
79         MallocBench: consolidate regression testing for aligned allocation
80         https://bugs.webkit.org/show_bug.cgi?id=155762
81
82         Reviewed by Michael Saboff.
83
84         * MallocBench/MallocBench.xcodeproj/project.pbxproj:
85         * MallocBench/MallocBench/Benchmark.cpp:
86         * MallocBench/MallocBench/memalign.cpp: Removed.
87         * MallocBench/MallocBench/memalign.h: Removed. The stress_aligned test
88         covers this and much more.
89
90         * MallocBench/MallocBench/stress_aligned.cpp:
91         (benchmark_stress_aligned): Include specific tests for extreme sizes
92         and alignments.
93
94 2016-03-21  Jon Lee  <jonlee@apple.com>
95
96         Update benchmark tests
97         https://bugs.webkit.org/show_bug.cgi?id=155723
98
99         Reviewed by Darin Adler.
100         Provisionally reviewed by Said Abou-Hallawa.
101
102         Add quadratic and bezier segments to the canvas path test.
103
104         * Animometer/resources/runner/tests.js: Some of the query strings are unnecessary.
105         Rename the test.
106         * Animometer/tests/master/resources/canvas-stage.js:
107         (tune): Update to be able to take an array of possible constructors. Choose one randomly.
108         * Animometer/tests/master/resources/canvas-tests.js:
109         (CanvasLinePoint.Utilities.createClass): Move the point selection out to a separate
110         function called randomPoint() for reuse. Move X_LOOPS, Y_LOOPS, and offsets into the
111         class definition.
112         (randomPoint): Scale the grid down a little bit so that the lines along the edge of the
113         canvas are not cut off when the stroke size is thick.
114         (CanvasQuadraticSegment): Added.
115         (CanvasBezierSegment): Added.
116         (SimpleCanvasStage): Pass in an array of the different segment types. Since line segments
117         are short compared to the curved ones, make it twice as likely to render a line segment.
118         (SimpleCanvasStage.animate): Update the drawing code so that we render all line segments.
119
120         Add a helper method that selects a random element from an array.
121
122         * Animometer/tests/resources/main.js:
123         (Stage.randomElementInArray): Select a random element from the provided array.
124
125         * Animometer/tests/bouncing-particles/resources/bouncing-tagged-images.js: Refactor.
126         * Animometer/tests/dom/resources/leaves.js: Ditto.
127         * Animometer/tests/master/resources/dom-particles.js: Ditto.
128         * Animometer/tests/master/resources/image-data.js: Ditto.
129         * Animometer/tests/master/resources/leaves.js: Ditto.
130         * Animometer/tests/simple/resources/simple-canvas-paths.js: Ditto.
131
132         Add canvas tests that includes all stroke and fill paths. This makes it possible to avoid having to
133         include the full simple canvas suite for perf testing.
134
135         * Animometer/resources/debug-runner/tests.js: Add new tests. Move the canvas test into the Canvas
136         suite.
137         * Animometer/tests/simple/resources/simple-canvas-paths.js: Add a CanvasStroke and CanvasFill particle
138         that random selects an object to render.
139
140         * Animometer/resources/debug-runner/tests.js: Move 3D suite before basic canvas suite.
141         When updating the perf bot script, we will include the suites up to this one, but exclude
142         the basic canvas suite.
143
144         Move compositing transforms test to HTML suite and remove the empty Miscellaneous suite.
145
146         * Animometer/resources/debug-runner/tests.js:
147         * Animometer/tests/dom/compositing-transforms.html: Renamed from PerformanceTests/Animometer/tests/misc/compositing-transforms.html.
148         * Animometer/tests/dom/resources/compositing-transforms.js: Renamed from PerformanceTests/Animometer/tests/misc/resources/compositing-transforms.js.
149
150         Clean up miscellaneous test suite. Add a canvas ellipse test, and remove the other
151         canvas tests.
152
153         * Animometer/resources/debug-runner/tests.js: Add ellipse tests to the simple suite.
154         * Animometer/tests/misc/canvas-electrons.html: Removed.
155         * Animometer/tests/misc/canvas-stars.html: Removed.
156         * Animometer/tests/misc/resources/canvas-electrons.js: Removed.
157         * Animometer/tests/misc/resources/canvas-stars.js: Removed.
158         * Animometer/tests/simple/resources/simple-canvas-paths.js: Add ellipse primitives.
159
160         Merge text tests together into one.
161
162         * Animometer/resources/runner/tests.js: Remove international.html.
163         * Animometer/tests/master/international.html: Removed.
164         * Animometer/tests/master/resources/text.js:
165         (animate): Update styling. Manually calculate gradients for the shadow particles.
166         Reduce the step size for y direction to avoid cutting text off at the margins. Increase
167         step for x since there will be a little more room.
168         * Animometer/tests/master/text.html: Add more translations and lay it out in a table.
169
170 2016-03-20  Jon Lee  <jonlee@apple.com>
171
172         Add a link to show debug data
173         https://bugs.webkit.org/show_bug.cgi?id=155724
174
175         Reviewed by Simon Fraser.
176
177         * Animometer/developer.html: Attach the onclick handler to the score.
178         * Animometer/index.html: Ditto.
179
180 2016-03-18  Dean Jackson  <dino@apple.com>
181
182         Add a basic WebGL test to Animometer
183         https://bugs.webkit.org/show_bug.cgi?id=155475
184         <rdar://problem/25156860>
185
186         Reviewed by Simon Fraser and Jon Lee.
187
188         Add a pretty simple WebGL test to Animometer
189         which tries to draw a number of animated triangles.
190         The result still needs a bit of tuning.
191
192         * Animometer/resources/debug-runner/tests.js: Add a new
193         Suite for "3D" tests.
194         * Animometer/tests/3d/resources/webgl.js: Added.
195         * Animometer/tests/3d/webgl.html: Added.
196
197 2016-03-18  Jon Lee  <jonlee@apple.com>
198
199         Add support for statically linking to a specific test
200         https://bugs.webkit.org/show_bug.cgi?id=155631
201
202         Rubber-stamped by Darin Adler.
203
204         * Animometer/developer.html: Update to call restartBenchmark instead so that it works for
205         both the preset and the manually set test sessions.
206         * Animometer/resources/debug-runner/animometer.css:
207         (.tree .link): Style the "link" UI.
208         * Animometer/resources/debug-runner/animometer.js: Move updateDisplay from suitesManager
209         to optionsManager since this is a visual option and has nothing to do with the suites
210         settings. Update the construction of the test UI by including a "link" after each test.
211         Clicking on that link brings up a JS prompt with a URL and a query string with the current
212         parameters of the controller, and selected test. Pasting this URL into the location bar will
213         automatically start running the selected test.
214         (suitesManager.suitesFromQueryString): Iterate through the Suites and tests and find the one
215         that matches the provided parameters. Returns an object similar to the form in
216         suitesManager.updateLocalStorageFromUI.
217         (benchmarkController.initialize): After settings up the events and options, try parsing the
218         query string and running the benchmark immediately. Otherwise, fall back to the form.
219         (benchmarkController.startBenchmark): Store the options and suites into member variables for
220         reuse in restartBenchmark.
221         (benchmarkController.startBenchmarkImmediatelyIfEncoded): Convert the query string to an object.
222         If that's successful, find the suite and test referenced in the query string. Start the benchmark if
223         the search for the test succeeded.
224         * Animometer/resources/extensions.js:
225         (Utilities.stripNonASCIICharacters): Helper method to convert the name of the suite and test
226         into a query-string-friendly version.
227         (Utilities.convertObjectToQueryString): Helper method to convert an object to query string
228         format.
229         (Utilities.convertQueryStringToObject): Helper method to convert query string into an object
230         with properties and values.
231
232 2016-03-16  Jon Lee  <jonlee@apple.com>
233
234         Add a new benchmark test
235         https://bugs.webkit.org/show_bug.cgi?id=155570
236
237         Reviewed by Simon Fraser.
238
239         New Leaves test includes various image sizes and opacity.
240
241         * Animometer/resources/debug-runner/tests.js: Add it to the HTML test suite.
242         * Animometer/tests/dom/leaves.html: Added.
243         * Animometer/tests/dom/resources/leaves.js: Added. Override the
244         (Particle.call.reset): Uses a range of sizes, and opacity.
245         (Particle.call.animate): Opacity goes up then down. When it hits 0, reset the particle.
246         (Particle.call.move): Set transform and opacity.
247         * Animometer/tests/master/resources/leaves.js: Get rid of the closure so that it
248         can be used in this test. Update the relative path so that it works in both the master
249         and dom test suite.
250
251 2016-03-15  Simon Fraser  <simon.fraser@apple.com>
252
253         Add developer Animometer test that bounces P3-tagged images
254         https://bugs.webkit.org/show_bug.cgi?id=155511
255
256         Reviewed by Tim Horton.
257         
258         Add a test for rendering performance of tagged images. The 5 images are tagged
259         with the Display P3 colorspace.
260
261         * Animometer/resources/debug-runner/tests.js:
262         * Animometer/tests/bouncing-particles/bouncing-tagged-images.html: Added.
263         * Animometer/tests/bouncing-particles/resources/bouncing-tagged-images.js: Added.
264         * Animometer/tests/bouncing-particles/resources/image1.jpg: Added.
265         * Animometer/tests/bouncing-particles/resources/image2.jpg: Added.
266         * Animometer/tests/bouncing-particles/resources/image3.jpg: Added.
267         * Animometer/tests/bouncing-particles/resources/image4.jpg: Added.
268         * Animometer/tests/bouncing-particles/resources/image5.jpg: Added.
269
270 2016-03-09  Jon Lee  <jonlee@apple.com>
271
272         Enhance existing Animometer tests
273         https://bugs.webkit.org/show_bug.cgi?id=155261
274
275         Reviewed by Simon Fraser.
276
277         * Animometer/tests/master/resources/canvas-tests.js: Add a gradient to
278         the filled circles. To expose more of the gradient, add another circle.
279         (SimpleCanvasStage.call.animate): For each frame, create a gradient with
280         undulating stop points and colors. Fill the circles twice; once with
281         the solid color, and once with the gradient.
282
283         * Animometer/tests/master/resources/dom-particles.js: Refactor the
284         emission variables into a separate stage for this test. Add a colorOffset
285         variable to make the colors of each particle slightly different, since
286         the ramp controller can add large numbers of particles all at once, which
287         would otherwise get all the same color.
288         * Animometer/tests/master/resources/particles.js:
289         (initialize): Remove the code specific to the SVG mask test.
290
291         * Animometer/tests/master/resources/image-data.js:
292         (initialize): Remove unused local variable.
293         * Animometer/tests/master/resources/multiply.js:
294         (initialize): Make the test harder by adding more total particles.
295
296 2016-03-09  Jon Lee  <jonlee@apple.com>
297
298         Add text tests
299         https://bugs.webkit.org/show_bug.cgi?id=155257
300
301         Reviewed by Simon Fraser.
302
303         * Animometer/resources/extensions.js:
304         (UnitBezier.Utilities.createClass): Add a class that computes Bezier points
305         assuming that two of the control points are at (0,0) and (1,1). Taken from
306         WebCore/platform/graphics/UnitBezier.h
307         * Animometer/resources/runner/tests.js: Add a test for English text and one
308         for international text.
309         * Animometer/tests/master/international.html: Added.
310         * Animometer/tests/master/resources/text.js: Added. The test assumes there is
311         #template div which it will copy. The copies are placed behind the template, and
312         are set with different colors each frame. They are moved around with CSS transform.
313         * Animometer/tests/master/text.html: Added.
314
315         Remove the other text tests, since these ones cover the same techniques.
316         * Animometer/tests/text/layering-text.html: Removed.
317         * Animometer/tests/text/resources/layering-text.js: Removed.
318         * Animometer/tests/text/resources/text-boxes.js: Removed.
319         * Animometer/tests/text/text-boxes.html: Removed.
320         * Animometer/resources/debug-runner/tests.js:
321
322 2016-03-09  Jon Lee  <jonlee@apple.com>
323
324         Add a new image test
325         https://bugs.webkit.org/show_bug.cgi?id=155232
326
327         Reviewed by Dean Jackson.
328         Provisionally reviewed by Said Abou-Hallawa.
329
330         The image test renders PNGs and moves them with translate and rotate
331         transforms. Each particle has a lifetime, and when the lifetime ends or
332         the particle goes offscreen, it resets itself somewhere on the stage.
333
334         * Animometer/resources/debug-runner/tests.js: Remove the CSS bouncing PNG
335         images test, because this one tests the same technique.
336         * Animometer/resources/runner/tests.js: Added here as "Leaves".
337         * Animometer/tests/master/leaves.html: Added.
338         * Animometer/tests/master/resources/particles.js: Refactor out the parts
339         specific to the DOM particles test. Consequently make velocity a public
340         member.
341         (initialize): The options parameter is never used, so remove it.
342         (animate): Remove unused local variable.
343         * Animometer/tests/master/resources/leaves.js: Maintains a focal point that
344         moves back and forth across the canvas. That point affects the velocity
345         of the particles. When the focal point is on the leftmost side, it is
346         between [-6, -2], and set in reset(). When the focal point is on the rightmost
347         side, it will be from [2, 6].
348         * Animometer/tests/master/resources/dom-particles.js: Move JS specific to
349         this test here from particles.js.
350
351         New images.
352         * Animometer/tests/master/resources/compass100.png: Added.
353         * Animometer/tests/master/resources/console100.png: Added.
354         * Animometer/tests/master/resources/contribute100.png: Added.
355         * Animometer/tests/master/resources/debugger100.png: Added.
356         * Animometer/tests/master/resources/inspector100.png: Added.
357         * Animometer/tests/master/resources/layout100.png: Added.
358         * Animometer/tests/master/resources/performance100.png: Added.
359         * Animometer/tests/master/resources/script100.png: Added.
360         * Animometer/tests/master/resources/shortcuts100.png: Added.
361         * Animometer/tests/master/resources/standards100.png: Added.
362         * Animometer/tests/master/resources/storage100.png: Added.
363         * Animometer/tests/master/resources/styles100.png: Added.
364         * Animometer/tests/master/resources/timeline100.png: Added.
365
366 2016-03-03  Jon Lee  <jonlee@apple.com>
367
368         Add ability to retrieve raw data from release harness
369         https://bugs.webkit.org/show_bug.cgi?id=155026
370
371         Reviewed by Simon Fraser.
372
373         * Animometer/developer.html: Remove the special UI in the debug
374         harness.
375         * Animometer/resources/runner/animometer.css: Add styles for the
376         overlay.
377         * Animometer/resources/runner/animometer.js: Let 'j' show the JSON
378         results, but only if the overlay doesn't exist. Add 'esc' key to dismiss
379         the overlay.
380         (window.benchmarkController.selectResults): Cycle the cases around
381         so that the first 's' press selects both the benchmark score and
382         the individual test scores.
383         * Animometer/resources/debug-runner/animometer.css: Remove
384         unneeded rules.
385         * Animometer/resources/debug-runner/animometer.js: Make the same
386         call to handleKeyPress.
387
388 2016-03-03  Jon Lee  <jonlee@apple.com>
389
390         Make sure multiply test particles have at least some opacity
391         https://bugs.webkit.org/show_bug.cgi?id=155027
392
393         Reviewed by Simon Fraser.
394
395         * Animometer/tests/master/resources/multiply.js:
396         (initialize): Have the elements spin a little faster to make it
397         more obvious when the system is being stressed.
398         (_addTile):
399         (animate): Make sure each element being animated has at least 1%
400         opacity.
401
402 2016-03-03  Jon Lee  <jonlee@apple.com>
403
404         Update image test
405         https://bugs.webkit.org/show_bug.cgi?id=154962
406
407         Rubber-stamped by Darin Adler.
408
409         * Animometer/tests/master/image-data.html: Make each canvas have a compositing layer.
410         * Animometer/tests/master/resources/image-data.js:
411         (initialize): Update to load multiple images serially.
412         (_loadImage):
413         (tune): Use display instead of visibility. When showing an element anew, move it somewhere else.
414         (_createTestElement): Set up the element, refactor out placement of element to _refreshElement.
415         (_refreshElement): Place element in a tile grid.
416         (animate):
417         (_getRandomNeighboringPixelIndex): Use a more conservative distribution to make the effect last a little longer.
418         * Animometer/tests/master/resources/compass.svg: Added.
419         * Animometer/tests/master/resources/console.svg: Added.
420         * Animometer/tests/master/resources/contribute.svg: Added.
421         * Animometer/tests/master/resources/debugger.svg: Added.
422         * Animometer/tests/master/resources/inspector.svg: Added.
423         * Animometer/tests/master/resources/layout.svg: Added.
424         * Animometer/tests/master/resources/performance.svg: Added.
425         * Animometer/tests/master/resources/script.svg: Added.
426         * Animometer/tests/master/resources/shortcuts.svg: Added.
427         * Animometer/tests/master/resources/standards.svg: Added.
428         * Animometer/tests/master/resources/storage.svg: Added.
429         * Animometer/tests/master/resources/styles.svg: Added.
430         * Animometer/tests/master/resources/timeline.svg: Added.
431
432 2016-03-02  Jon Lee  <jonlee@apple.com>
433
434         Add some new controllers, and refine tests
435         https://bugs.webkit.org/show_bug.cgi?id=154914
436
437         Reviewed by Simon Fraser.
438
439         Improve tests.
440
441         * Animometer/tests/master/focus.html: Move each particle into a layer. Put the particle
442         in a container element. Expand the container element by the max blur radius, and clip
443         overflow. This way, when the blur is applied, it avoids causing layer resizes.
444         * Animometer/tests/master/resources/focus.js:
445         (FocusElement.Utilities.createClass): Create a container element, and put the particle
446         inside.
447         (hide): Set display:none.
448         (show): Set display:block.
449         (animate): Apply filters to the container element.
450         (FocusStage.call.initialize): Instead of inserting and removing elements from the DOM,
451         keep them in the stage, but set the display style instead. Use this._offsetIndex to
452         keep track of which elements are displayed.
453         (FocusStage.call.animate): Move some calculations around to avoid doing unneeded math.
454         (FocusStage.call.getBlurValue): Make sure elements are always blurred.
455         (FocusStage.call.getOpacityValue): Make sure elements have some opacity.
456         * Animometer/tests/master/resources/multiply.js: Have the particles on the edge of the
457         stage appear less black when the complexity gets large enough.
458         (tune): Have this._distanceFactor calculate the factor. Avoid calculating square root each
459         frame.
460
461 2016-03-02  Jon Lee  <jonlee@apple.com>
462
463         Add some new controllers, and refine tests
464         https://bugs.webkit.org/show_bug.cgi?id=154914
465
466         Reviewed by Simon Fraser.
467
468         Add a controller that centers around 30 fps instead of 60 fps.
469
470         * Animometer/developer.html: Add a new option.
471         * Animometer/resources/debug-runner/animometer.js:
472         * Animometer/resources/runner/animometer.js:
473         (this._processData.findRegression): When calculating the complexity-frameLength regression,
474         check the controller, and use a 30 fps baseline if needed.
475         * Animometer/resources/statistics.js:
476         (Regression.Utilities.createClass): Update to allow clients to specify the baseline
477         frame length.
478         * Animometer/tests/resources/main.js:
479         (tune): Override some of the constants in RampController. Move those constants out for
480         easier reading.
481
482         Add a fixed controller, with no step.
483
484         * Animometer/developer.html: Add a controller that takes no step.
485         * Animometer/resources/debug-runner/animometer.js:
486         * Animometer/tests/resources/main.js:
487         (Rotater.Utilities.createClass):
488
489         Switch to ramp controller as default.
490
491         * Animometer/developer.html: Increase the test length to 20 seconds.
492         * Animometer/resources/debug-runner/animometer.js: Rename the "adjustment" field to "controller"
493         since that is a more accurate description.
494         * Animometer/resources/debug-runner/graph.js:
495         * Animometer/resources/runner/animometer.js: Update preferences for release suite.
496
497 2016-02-26  Jon Lee  <jonlee@apple.com>
498
499         Address Dean's comments in 154673.
500
501         * Animometer/developer.html:
502         * Animometer/resources/debug-runner/animometer.js:
503         * Animometer/resources/debug-runner/graph.js:
504
505 2016-02-25  Jon Lee  <jonlee@apple.com>
506
507         Update animation benchmark and tests
508         https://bugs.webkit.org/show_bug.cgi?id=154673
509
510         Reviewed by Dean Jackson.
511
512         Update test visuals.
513
514         * Animometer/tests/master/resources/canvas-tests.js:
515         (CanvasLineSegment.Utilities.createClass): Line segments near the edge of the stage get clipped.
516         Update circle position and radius to minimize impact.
517         * Animometer/tests/master/resources/particles.js: Get rid of rotating gradient background, and
518         have 3 locations for emitting particles.
519         * Animometer/tests/master/resources/multiply.js: Update distance metric so that fringe tiles get
520         more color.
521         (initialize): Fix some of the math for laying out the tiles.
522         (animate): When a tile isn't used, set visibility: hidden.
523
524 2016-02-24  Jon Lee  <jonlee@apple.com>
525
526         Update animation benchmark and tests
527         https://bugs.webkit.org/show_bug.cgi?id=154673
528
529         Reviewed by Dean Jackson.
530
531         Update the ramp controller.
532
533         The controller refines the complexity interval to test across.
534
535         * Animometer/resources/statistics.js: Add functions that estimate cumulative distribution function.
536         (Regression): For the flat regression, force the first segment to be at 60 fps.
537         (valueAt): Add convenience function to return interpolated value based on the regression used.
538         (_calculateRegression): Include the number of points included for both segments, and the piecewise
539         errors.
540         * Animometer/tests/resources/math.js: Make the Kalman estimator subclass Experiment, and allow it
541         to be reset.
542
543         * Animometer/tests/resources/main.js: Initialize the tier such that it starts at 10^0 = 1.
544         Increase the number of ramps. Maintain three FPS thresholds-- the frame rate of interest, a limit
545         on the lowest FPS we care to go for later interpolation, and a minimum FPS threshold we want to
546         aim for each ramp. Also keep three estimators: a running average of the change point, a minimum
547         boundary for each ramp, and an estimator for all the frames within an interval. The first two
548         are used to determine the parameters of the next ramp, and the latter allows us to refine the
549         parameters.
550         (update): During the tier phase, it is possible that the highest complexity possible for a test
551         won't stress the system enough to trigger stopping the tier phase and transitioning to the ramps.
552         If the complexity doesn't change when going to the next tier, we've maxed the test out, and move
553         on. When the tier phase completed, turn off Controller.frameLengthEstimator, which estimates the
554         FPS at each tier.
555         (tune): At each interval, look at the confidence distribution of being on the 60 FPS side or the
556         slow side. If the slowest FPS we achieve at the ramp's maximum complexity is not at least
557         _fpsRampSlowThreshold, then increase the maximum complexity. If we ever achieve 60 FPS, increase
558         the ramp's minimum complexity to that level. If, at an even lower complexity, a glitch causes the
559         FPS to drop, we reset the minimum complexity.
560
561         Have the bootstrap calculation occur between tests. Clean up harness.
562
563         * Animometer/resources/debug-runner/animometer.js: Run bootstrap after a test has
564         completed to avoid doing all of it at the end before showing the results. Clean up
565         parameters being passed around.
566         * Animometer/resources/debug-runner/tests.js:
567         (text):
568         * Animometer/resources/runner/animometer.js:
569         (this._processData.calculateScore): Save the results to the same object holding the data.
570         (this._processData._processData): In the case where a file is dragged, calculate the score
571         serially. Grab the results object and move it to the results variable and remove it from
572         the data object. This avoids serializing the results into the JSON.
573         (this._processData.findRegression): Include the samples used for bootstrapping. Reduce the
574         resample size to shorten the wait.
575         * Animometer/resources/runner/benchmark-runner.js:
576         * Animometer/resources/statistics.js:
577         (bootstrap): Update how bootstrapData is sorted. In some regression results the mix of
578         floats and integers causes an alphabetical sort to occur.
579         * Animometer/resources/strings.js:
580
581         Add meta charset so that encodings between harness and test match.
582
583         * Animometer/tests/bouncing-particles/bouncing-canvas-images.html:
584         * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html:
585         * Animometer/tests/bouncing-particles/bouncing-css-images.html:
586         * Animometer/tests/bouncing-particles/bouncing-css-shapes.html:
587         * Animometer/tests/bouncing-particles/bouncing-svg-images.html:
588         * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html:
589         * Animometer/tests/master/canvas-stage.html:
590         * Animometer/tests/master/focus.html:
591         * Animometer/tests/master/image-data.html:
592         * Animometer/tests/master/multiply.html:
593         * Animometer/tests/master/particles.html:
594         * Animometer/tests/misc/canvas-electrons.html:
595         * Animometer/tests/misc/canvas-stars.html:
596         * Animometer/tests/misc/compositing-transforms.html:
597         * Animometer/tests/simple/simple-canvas-paths.html:
598         * Animometer/tests/simple/tiled-canvas-image.html:
599         * Animometer/tests/template/template-canvas.html:
600         * Animometer/tests/template/template-css.html:
601         * Animometer/tests/template/template-svg.html:
602         * Animometer/tests/text/layering-text.html:
603         * Animometer/tests/text/text-boxes.html:
604
605         Update test harness reporting.
606
607         * Animometer/developer.html: Add missing meta charset.
608         * Animometer/index.html: Remove unnecessary utf-8 declaration.
609         * Animometer/resources/debug-runner/animometer.css: Add convenience classes for
610         formatting the results table.
611         * Animometer/resources/debug-runner/animometer.js: Adjust which stats are shown.
612         * Animometer/resources/debug-runner/tests.js: Display bootstrapping statistics.
613         * Animometer/resources/strings.js: Move strings not used by the release harness.
614
615         Switch to a pseudo-random number generator.
616
617         * Animometer/resources/statistics.js: Add a Pseudo class, with a simple
618         pseudo-random number generator.
619         (_calculateRegression): Reset the generator before running bootstrap.
620         (bootstrap): Deleted.
621
622         Replace Math.random with Pseudo.random.
623         * Animometer/tests/master/resources/canvas-tests.js:
624         * Animometer/tests/master/resources/focus.js:
625         * Animometer/tests/master/resources/particles.js:
626         * Animometer/tests/resources/main.js:
627
628         Use bootstrapping to get confidence interval in the breakpoint.
629
630         For the ramp controller, calculate the piecewise regression, and then use
631         bootstrapping in order to find the 95% confidence interval. Use the raw data.
632
633         * Animometer/developer.html: Default to the complexity graph. Add a legend
634         checkbox to toggle visibility of the bootstrap score and histogram.
635         * Animometer/resources/debug-runner/animometer.css: Make some more space to show
636         the old raw and average scores in the legend. Add new styles for the data.
637         * Animometer/resources/debug-runner/graph.js:
638         (_addRegressionLine): Allow passing an array for the variance bar tied to the
639         regression line. Now |stdev| is |range|.
640         (createComplexityGraph): Add bootstrap median, and overlay a histogram of
641         the bootstrap samples. Switch raw samples from circles to X's.
642         (onComplexityGraphOptionsChanged): Allow toggling of the bootstrap data.
643         (onGraphTypeChanged): Move the regressions for the raw and average samples to the
644         legend. In the subtitle use the bootstrap median, and include the 95% confidence
645         interval.
646         * Animometer/resources/runner/animometer.js:
647         (this._processData.findRegression): Factor out the code that determines which
648         samples to include when calculating the piecewise regression. For series that have
649         many samples, or a wider range of recorded complexities, throw away the 2.5%
650         lowest and highest samples before calculating the regression. Keep all samples
651         if the number of samples to regress is small or the range of complexities is
652         narrow.
653         (this._processData._calculateScore): Factor out regression calculation to
654         findRegression(). Bootstrap the change point of the regression. The score is the
655         median.
656         * Animometer/resources/statistics.js:
657         (_calculateRegression): Correct an issue in the calculation of the regression, where
658         the denominator can be 0.
659         (bootstrap): Template for bootstrapping. Create a bootstrap sample array, Create
660         re-samples by random selection with replacement. Return the 95% confidence samples,
661         the bootstrap median, mean, and the data itself.
662         * Animometer/resources/strings.js: Add bootstrap.
663         * Animometer/tests/resources/main.js:
664         (processSamples): Don't prematurely cut the sample data.
665
666         Fix graph drawing.
667
668         * Animometer/resources/debug-runner/animometer.js: Add spacing in the JSON output.
669         Multiple tests output a lot of JSON and can hang when selecting JSON with no whitespace.
670         * Animometer/resources/debug-runner/animometer.css:
671         (#complexity-graph .series.raw circle): Update the color.
672         * Animometer/resources/debug-runner/graph.js: Use the FPS axis instead of the
673         complexity axis, which can vary in domain. For determining the complexity domain,
674         only use samples after samplingTimeOffset.
675
676         Allow dropping results JSON.
677
678         * Animometer/developer.html: Add a button.
679         * Animometer/resources/debug-runner/animometer.css:
680         * Animometer/resources/debug-runner/animometer.js: Read the data and go straight
681         to the dashboard. With JSON output, write out only the options and the raw data.
682
683         Teach the harness to evaluate the samples and determine the test score.
684
685         This will allow us to update how the score is calculated separately from the samples recorded.
686         This also prepares the harness to be able to accept JSON of prior runs.
687
688         * Animometer/resources/strings.js: Clean up and remove unneeded strings and reduce some of the
689         hierarchy.
690         * Animometer/resources/debug-runner/tests.js: Update to use the new strings.
691
692         * Animometer/tests/resources/main.js: Allow all controllers to show a complexity-FPS graph.
693         (_processComplexitySamples): Factor out some of the sample processing done in the ramp
694         controller for the benefit of the other controllers. |complexitySamples| contains a list of
695         samples. Sort the samples by complexity. Optionally remove the top x% of samples.
696         Group them, and calculate distribution of samples within the same complexity, and add those as
697         new entries into |complexityAverageSamples|.
698         (Controller.processSamples): Move the code responsible for determining the complexity and FPS
699         scores out to ResultsDashboard. The structure of the data returned by the controller is:
700
701         {
702             controller: [time-regression, time-regression, ...], // optional, data specific to controller
703             marks: [...],
704             samples: {                    // all of the sample data
705                 controller: [...],
706                 complexity: [...],        // processed from controller samples
707                 complexityAverage: [...], // processed from complexity samples
708             }
709         }
710
711         (AdaptiveController.processSamples): Adding the target frame length is no longer necessary; we
712         now pass the test options to the graph.
713         (Regression): Move to statistics.js.
714         * Animometer/resources/statistics.js: Move Regression to here. Add a check if the sampling range
715         only contains one sample, since we cannot calculate a regression from one sample point.
716
717         Teach the test harness to evaluate the data.
718         * Animometer/resources/runner/animometer.js:
719         (ResultsDashboard): Store the options used to run the test and the computed results/score separately
720         from the data. The results are stored as:
721
722         {
723             score: /* geomean of iteration score */,
724             iterationsResults: [
725                 {
726                     score: /* geomean of tests */,
727                     testsResults: {
728                         suiteName: {
729                             testName: {
730                                 controller: {
731                                     average:
732                                     concern:
733                                     stdev:
734                                     percent:
735                                 },
736                                 frameLength: { ... },
737                                 complexity: {
738                                     complexity:
739                                     stdev:
740                                     segment1:
741                                     segment2:
742                                 },
743                                 complexityAverage: { ... }
744                             },
745                             testName: { ... },
746                         },
747                         ... next suite ...
748                     }
749                 },
750                 { ...next iteration... }
751             ]
752         }
753
754         * Animometer/resources/debug-runner/animometer.js: Pass options around instead of relying
755         on what was selected in the form. This will later allow for dropping previous results, and
756         using those runs' options when calculating scores.
757         (ResultsTable._addGraphButton): Simplify button action by using attached test data.
758         * Animometer/resources/debug-runner/graph.js: Refactor to use the data.
759
760         Consolidate JS files, and move statistics out to a separate JS.
761
762         Preparation for having the Controller only handle recording and storage of the samples,
763         and leave the evaluation of the test score out to the harness. Move Experiment to
764         a new statistics.js, where Regression will also eventually go. Get rid of algorithm.js
765         and move it to utilities.js since the Heap is used only for Experiments.
766
767         * Animometer/tests/resources/algorithm.js: Removed. Heap is in utilities.js.
768         * Animometer/tests/resources/sampler.js: Removed. Experiment is in statistics.js,
769         Sampler in main.js.
770         * Animometer/tests/resources/main.js: Move Sampler here.
771         * Animometer/resources/statistics.js: Added. Move Statistics and Experiment here.
772         * Animometer/resources/extensions.js: Move Heap here. Attach static method to create
773         a max or min heap to Heap, instead of a new Algorithm object.
774
775         Update JS files.
776         * Animometer/developer.html:
777         * Animometer/index.html:
778         * Animometer/tests/bouncing-particles/bouncing-canvas-images.html:
779         * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html:
780         * Animometer/tests/bouncing-particles/bouncing-css-images.html:
781         * Animometer/tests/bouncing-particles/bouncing-css-shapes.html:
782         * Animometer/tests/bouncing-particles/bouncing-svg-images.html:
783         * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html:
784         * Animometer/tests/master/canvas-stage.html:
785         * Animometer/tests/master/focus.html:
786         * Animometer/tests/master/image-data.html:
787         * Animometer/tests/master/multiply.html:
788         * Animometer/tests/master/particles.html:
789         * Animometer/tests/misc/canvas-electrons.html:
790         * Animometer/tests/misc/canvas-stars.html:
791         * Animometer/tests/misc/compositing-transforms.html:
792         * Animometer/tests/simple/simple-canvas-paths.html:
793         * Animometer/tests/simple/tiled-canvas-image.html:
794         * Animometer/tests/template/template-canvas.html:
795         * Animometer/tests/template/template-css.html:
796         * Animometer/tests/template/template-svg.html:
797         * Animometer/tests/text/layering-text.html:
798         * Animometer/tests/text/text-boxes.html:
799
800         Fix the cursor in the graph analysis when the min
801         complexity is not 0.
802
803         * Animometer/resources/debug-runner/graph.js:
804         (_addRegression):
805         (createComplexityGraph):
806
807 2016-02-23  Geoffrey Garen  <ggaren@apple.com>
808
809         Fix some issues in MallocBench
810         https://bugs.webkit.org/show_bug.cgi?id=154600
811
812         Reviewed by Oliver Hunt.
813
814         * MallocBench/MallocBench.xcodeproj/project.pbxproj: Make nimlang.ops
815         a part of the build so that it copies to the right place for execution.
816
817         * MallocBench/MallocBench/Interpreter.cpp:
818         (Interpreter::Interpreter): Don't try to open .ops files for writing
819         because we're only going to read and we might need extra permissions to
820         write.
821
822         (Interpreter::~Interpreter): Give more context when opening a file fails
823         to help with debugging.
824
825         * MallocBench/MallocBench/stress.cpp:
826         (benchmark_stress): Reduce iterations to complete in less than 10 seconds.
827
828 2016-02-23  Michael Saboff  <msaboff@apple.com>
829
830         Unreviewed change to revert extraneous changes made part of change set 196955.
831
832         * MallocBench/MallocBench/Interpreter.cpp:
833         (Interpreter::doMallocOp):
834         (Interpreter::Thread::switchTo):
835         (writeData): Deleted.
836
837 2016-02-19  Michael Saboff  <msaboff@apple.com>
838
839         MallocBench: Added recording for nimlang website, new recording details and added new options
840         https://bugs.webkit.org/show_bug.cgi?id=154485
841
842         Reviewed by Geoff Garen.
843
844         Added new capabilities to MallocBench.  These include:
845             Added a recording of http://nim-lang.org/docs/lib.html.
846             Added thread id to the recording and the ability to playback switching threads in MallocBench
847             Added aligned allocations to recordings and the ability to playback
848             Added --use-thread-id option to honor recorded thread ids
849             Added --detailed-report to output remaining allocations by size after playback
850             Added --no-warmup to not run the warm up iteration
851
852         Changed the way that options are passed down to the benchmarks.  Instead of passing individual
853         boolean or numeric option values, just pass a reference the CommandLine itself.  Each benchmark
854         can access the options that are appropriate.  The Benchmark class also uses the options for
855         is parallel, run counts and warm up.
856
857         Added thread id and aligned malloc to the Op by noticing that structure padding and Opcode allowed
858         for another 32 bits of data.  Breaking that unused 32 bits into a 16 bit thread id value and a
859         16 bit log base 2 of the alignment for aligned malloc allowed for existing recordings to playback
860         without any incompatibilities.
861
862         Threaded operation is simulated by creating threads as needed.  As long as the next Op's thread id
863         is the same as the last, operation continues as normal.  When the next Op has a different thread id,
864         we switch to that thread using the shared Op stream to continue playing back.  There is a mutex to
865         assure that only one thread is really running at a time and a condition variable used to wait
866         that the current thread id matches each block thread's thread id.  This doesn't simulate true
867         concurrent threading, but is instead plays back Ops recorded for multiple thread faithfully.
868
869         * MallocBench/MallocBench.xcodeproj/project.pbxproj:
870         * MallocBench/MallocBench/Benchmark.cpp:
871         (deallocateHeap):
872         (Benchmark::Benchmark):
873         (Benchmark::runOnce):
874         (Benchmark::run):
875         * MallocBench/MallocBench/Benchmark.h:
876         (Benchmark::isValid):
877         * MallocBench/MallocBench/CommandLine.cpp:
878         (CommandLine::printUsage):
879         * MallocBench/MallocBench/CommandLine.h:
880         (CommandLine::isValid):
881         (CommandLine::benchmarkName):
882         (CommandLine::isParallel):
883         (CommandLine::useThreadID):
884         (CommandLine::detailedReport):
885         (CommandLine::warmUp):
886         (CommandLine::heapSize):
887         (CommandLine::runs):
888         * MallocBench/MallocBench/Interpreter.cpp:
889         (Interpreter::Interpreter):
890         (Interpreter::run):
891         (Interpreter::readOps):
892         (Interpreter::doOnSameThread):
893         (Interpreter::switchToThread):
894         (Interpreter::detailedReport):
895         (compute2toPower):
896         (writeData):
897         (Interpreter::doMallocOp):
898         (Interpreter::Thread::Thread):
899         (Interpreter::Thread::stop):
900         (Interpreter::Thread::~Thread):
901         (Interpreter::Thread::runThread):
902         (Interpreter::Thread::waitToRun):
903         (Interpreter::Thread::switchTo):
904         * MallocBench/MallocBench/Interpreter.h:
905         (Interpreter::Thread::isMainThread):
906         * MallocBench/MallocBench/alloc_free.cpp: Added.
907         (benchmark_alloc_free):
908         * MallocBench/MallocBench/alloc_free.h: Added.
909         * MallocBench/MallocBench/balloon.cpp:
910         (benchmark_balloon):
911         * MallocBench/MallocBench/balloon.h:
912         * MallocBench/MallocBench/big.cpp:
913         (benchmark_big):
914         * MallocBench/MallocBench/big.h:
915         * MallocBench/MallocBench/churn.cpp:
916         (benchmark_churn):
917         * MallocBench/MallocBench/churn.h:
918         * MallocBench/MallocBench/facebook.cpp:
919         (benchmark_facebook):
920         * MallocBench/MallocBench/facebook.h:
921         * MallocBench/MallocBench/flickr.cpp:
922         (benchmark_flickr):
923         (benchmark_flickr_memory_warning):
924         * MallocBench/MallocBench/flickr.h:
925         * MallocBench/MallocBench/fragment.cpp:
926         (validate):
927         (benchmark_fragment):
928         (benchmark_fragment_iterate):
929         * MallocBench/MallocBench/fragment.h:
930         * MallocBench/MallocBench/list.cpp:
931         (benchmark_list_allocate):
932         (benchmark_list_traverse):
933         * MallocBench/MallocBench/list.h:
934         * MallocBench/MallocBench/main.cpp:
935         (main):
936         * MallocBench/MallocBench/medium.cpp:
937         (benchmark_medium):
938         * MallocBench/MallocBench/medium.h:
939         * MallocBench/MallocBench/memalign.cpp:
940         (test):
941         (benchmark_memalign):
942         * MallocBench/MallocBench/memalign.h:
943         * MallocBench/MallocBench/message.cpp:
944         (benchmark_message_one):
945         (benchmark_message_many):
946         * MallocBench/MallocBench/message.h:
947         * MallocBench/MallocBench/nimlang.cpp: Added.
948         (benchmark_nimlang):
949         * MallocBench/MallocBench/nimlang.h: Added.
950         * MallocBench/MallocBench/nimlang.ops: Added.
951         * MallocBench/MallocBench/realloc.cpp:
952         (benchmark_realloc):
953         * MallocBench/MallocBench/realloc.h:
954         * MallocBench/MallocBench/reddit.cpp:
955         (benchmark_reddit):
956         (benchmark_reddit_memory_warning):
957         * MallocBench/MallocBench/reddit.h:
958         * MallocBench/MallocBench/stress.cpp:
959         (deallocate):
960         (benchmark_stress):
961         * MallocBench/MallocBench/stress.h:
962         * MallocBench/MallocBench/stress_aligned.cpp:
963         (benchmark_stress_aligned):
964         * MallocBench/MallocBench/stress_aligned.h:
965         * MallocBench/MallocBench/theverge.cpp:
966         (benchmark_theverge):
967         (benchmark_theverge_memory_warning):
968         * MallocBench/MallocBench/theverge.h:
969         * MallocBench/MallocBench/tree.cpp:
970         (benchmark_tree_allocate):
971         (benchmark_tree_traverse):
972         (benchmark_tree_churn):
973         * MallocBench/MallocBench/tree.h:
974         * MallocBench/run-malloc-benchmarks:
975
976 2016-02-11  Jon Lee  <jonlee@apple.com>
977
978         Fix a missing refactoring.
979
980         * Animometer/tests/master/resources/multiply.js:
981         (animate): Move to Utilities.lerp.
982         (_lerp): Deleted.
983
984 2016-02-10  Jon Lee  <jonlee@apple.com>
985
986         Add new benchmark tests.
987         https://bugs.webkit.org/show_bug.cgi?id=154063
988
989         Provisionally reviewed by Said Abou-Hallawa.
990
991         Add tests for get/put image data, filters, opacity, and css transforms.
992
993         * Animometer/resources/runner/benchmark-runner.js:
994         (_runBenchmarkAndRecordResults): Update the body background color to match that of
995         the stage.
996         (this._runNextIteration): Clear the background color style for the results page.
997         * Animometer/resources/runner/tests.js:
998         * Animometer/tests/master/focus.html: Added.
999         * Animometer/tests/master/image-data.html: Added.
1000         * Animometer/tests/master/multiply.html: Added.
1001         * Animometer/tests/master/resources/focus.js: Added.
1002         * Animometer/tests/master/resources/image-data.js: Added.
1003         * Animometer/tests/master/resources/multiply.js: Added.
1004         * Animometer/tests/master/resources/stage.css: Move common styles out.
1005         * Animometer/tests/resources/main.js: Update Stage.randomBool to use Math.random.
1006         Add Stage.randomSign for randomly setting a direction. Add the notion of the
1007         current timestamp of the test to Benchmark, since some animations cycle through
1008         colors and rely on an incremental counter like the time.
1009
1010 2016-02-09  Said Abou-Hallawa  <sabouhallawa@apple.com>
1011
1012         Add internal benchmark tests for CSS mix-blend-modes and filters
1013         https://bugs.webkit.org/show_bug.cgi?id=154058
1014
1015         Provisionally reviewed by Jon Lee.
1016
1017         * Animometer/resources/debug-runner/tests.js: Include the new tests in the
1018         "HTML suite" of the debug runner.
1019
1020         * Animometer/resources/extensions.js:
1021         (Utilities.browserPrefix):
1022         (Utilities.setElementPrefixedProperty): Utility functions to allow setting
1023         prefixed style properties.
1024
1025         * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
1026         Set the mix-blend-mode and the filter to some random values if the options
1027         of the test requested that.
1028
1029         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
1030         (parseShapeParameters): Parse the url options "blend" and "filter" and set
1031         the corresponding flags.
1032
1033         * Animometer/tests/resources/main.js:
1034         (randomStyleMixBlendMode):
1035         (randomStyleFilter): Return random mix-blend-mode and filter.
1036
1037 2016-02-08  Jon Lee  <jonlee@apple.com>
1038
1039         Add a ramp controller
1040         https://bugs.webkit.org/show_bug.cgi?id=154028
1041
1042         Provisionally reviewed by Said Abou-Hallawa.
1043
1044         Enhance the graph to include a complexity-fps graph, in addition
1045         to the time graph.
1046
1047         * Animometer/developer.html: Add a ramp option.
1048         * Animometer/resources/debug-runner/animometer.css: Update the style.
1049         * Animometer/resources/strings.js: Flatten the Strings.text constants.
1050         * Animometer/resources/debug-runner/animometer.js:
1051         (ResultsTable.call._addGraphButton): Refactor.
1052         (ResultsTable.call._addTest): Add regression data.
1053         (benchmarkController): Add a form that allows the user to switch between the two forms,
1054         Add a form that allows the user to toggle different data. Hide certain header columns
1055         depending on the selected controller.
1056         * Animometer/resources/debug-runner/graph.js: Add the complexity regressions.
1057         * Animometer/resources/debug-runner/tests.js: Add headers for the ramp results.
1058         * Animometer/resources/runner/animometer.js:
1059         (ResultsTable): If a header is disabled don't include them in _flattenedHeaders.
1060         * Animometer/tests/resources/main.js:
1061         (Controller): Allow options to specify the capacity for sample arrays.
1062         (Regression): A piecewise regression that tries to fit a slope and a flat profile.
1063         (_calculateRegression): Options can fix the slope and bias when calculating the minimal
1064         error. Sweep across the samples in time (which could be backward depending on the controller)
1065         and calculate the intersection point.
1066         (RampController): This controller assumes that the target frame rate is below
1067         58 FPS. It runs in two stages. The first stage quickly determines the order of
1068         magnitude of objects needed to stress the system by the setting the complexity
1069         to increasingly difficult tiers. Perform a series of ramps descending from a
1070         high-water mark of complexity. The complexity needed to reach the target frame
1071         length is done by performing a piecewise regression on each ramp, and track a
1072         running average of these values. For the next ramp, make that running average
1073         the center of the ramp. With a minimum complexity of 0, the high-water mark is
1074         twice that average. The score is based on the highest complexity that can
1075         reach 60 fps.
1076
1077 2016-02-08  Jon Lee  <jonlee@apple.com>
1078
1079         Address Said's comments on the benchmark, and do some clean up.
1080
1081         * Animometer/developer.html:
1082         * Animometer/resources/debug-runner/animometer.css: Add styles for averages.
1083         * Animometer/resources/debug-runner/animometer.js: Use the right
1084         Strings constants.
1085         * Animometer/resources/debug-runner/graph.js:
1086         (_addRegressionLine): Add missing code to draw the line and standard
1087         deviation highlight.
1088         (onGraphTypeChanged): Remove unneeded variables
1089         (onTimeGraphOptionsChanged):
1090         * Animometer/resources/runner/benchmark-runner.js:
1091         (_runBenchmarkAndRecordResults): Rename samplers to suiteResults and
1092         _suitesSamplers to _suitesResults.
1093         * Animometer/tests/resources/main.js:
1094         (results): Call processSamples().
1095         (update): Change sampling timestamp comparison.
1096         (_animateLoop): Move shouldStop call to before the update.
1097         * Animometer/tests/resources/sampler.js:
1098         (process): Rename to processSamples().
1099
1100 2016-02-07  Jon Lee  <jonlee@apple.com>
1101
1102         Teach Controller to measure intervals, and turn off the frame length estimator.
1103
1104         * Animometer/tests/resources/main.js: Default interval length is 100 ms.
1105         (start): Set the first interval.
1106         (_measureAndResetInterval): Reports the average frame length of the interval that just
1107         completed, and sets up the next interval.
1108         (update): If there is no length, then just use the estimator per frame, otherwise the
1109         estimator measures per interval. Add a didFinishInterval for subclasses to process
1110         prior to recording the sample. Update tune() to include whether an interval had
1111         finished.
1112         (StepController): Step controllers don't measure on an interval basis.
1113
1114 2016-02-07  Jon Lee  <jonlee@apple.com>
1115
1116         Minor refactoring. Rename Controller._estimator to Controller._frameLengthEstimator
1117         and switch the parameters for start(), update(), and tune(), so that the timestamp
1118         is first and stage is second.
1119
1120         * Animometer/tests/resources/main.js:
1121
1122 2016-02-07  Jon Lee  <jonlee@apple.com>
1123
1124         Move ResultsTable functionality not needed for release tests out.
1125         Move reporting of score and mean to selection of the time-based graph.
1126
1127         * Animometer/developer.html: Rename graph-options to time-graph-options.
1128         * Animometer/resources/debug-runner/animometer.js:
1129         (DeveloperResultsTable): Moved from runner/animometer.js. Switch from mean
1130         values to "average" objects which can hold stdev. Move graph button and
1131         calculation of noisy measurements here. Sophisticated header processing
1132         is not needed in release suite.
1133         (populateTable): Use DeveloperResultsTable.
1134         * Animometer/resources/debug-runner/graph.js: Pull time graph creation to
1135         its own function, and add a new onGraphTypeChanged handler in preparation
1136         of a complexity graph to be added later.
1137         * Animometer/resources/runner/animometer.js:
1138         (ResultsTable): Simplify to just handle test names and scores.
1139
1140 2016-02-07  Jon Lee  <jonlee@apple.com>
1141
1142         Tests: reuse objects already made.
1143
1144         Avoid thrash of object creation and removal by maintaining an index that
1145         moves along the array as the adjust values change. If the tune value
1146         requires more objects than the maximum size of the object array, then create
1147         new objects. This means that the object array size never decreases.
1148
1149         * Animometer/tests/master/resources/canvas-stage.js: Maintain a separate
1150         offsetIndex. For these tests, we want to avoid drawing the oldest objects,
1151         so the scene will draw the object at offsetIndex to the end of the array.
1152         (tune): Reverse the logic since "removal" of objects is much simpler and
1153         involves simply changing the offsetIndex.
1154         (animate): Update the for loop to draw from offsetIndex to the end.
1155         (complexity): Update the definition.
1156         * Animometer/tests/master/resources/canvas-tests.js: Maintain a separate
1157         offsetIndex. For these tests, we want to avoid drawing the newest objects,
1158         so the scene will draw the object at index 0 to the object at offsetIndex.
1159         (SimpleCanvasStage.animate): Fly-by removal of local stage variable,
1160         which is unneeded. Update the for loop to draw from offsetIndex to the end.
1161         * Animometer/tests/simple/resources/simple-canvas-paths.js:
1162         (SimpleCanvasStage.animate): Update the for loop to draw from 0 to
1163         offsetIndex.
1164         * Animometer/tests/simple/resources/simple-canvas.js:
1165         (tune): Update logic. Here, offsetIndex represents the boundary of the last
1166         index to render.
1167         (animate): Update the for loop to draw from 0 to offsetIndex.
1168         (complexity): Update the definition.
1169
1170 2016-02-07  Jon Lee  <jonlee@apple.com>
1171
1172         Tests: refactor and update styles.
1173
1174         * Animometer/tests/resources/main.js: Add helper methods that return
1175         a color that hue rotates based on the date, and a counter value that
1176         increases based on the date. Fix randomInt() to not bias against the min and
1177         max values.
1178
1179         * Animometer/tests/master/resources/canvas-tests.js: Use new helper methods.
1180         * Animometer/tests/master/resources/dom-particles.js: Ditto.
1181         * Animometer/tests/master/resources/particles.js: Ditto.
1182         * Animometer/tests/simple/resources/simple-canvas-paths.js: Refactor to
1183         use a rotating color instead of a random color. The fast switching of color
1184         is too vivid to watch.
1185
1186         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
1187         (BouncingSvgParticlesStage.call.createGradient): Fix the gradient so
1188         that the last stop is located at the end.
1189
1190 2016-02-07  Jon Lee  <jonlee@apple.com>
1191
1192         Refactor tune() to not return the complexity of the scene.
1193
1194         We have stage.complexity() now, so returning the complexity through tune
1195         is unnecessary.
1196
1197         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
1198         * Animometer/tests/master/resources/canvas-stage.js:
1199         * Animometer/tests/master/resources/particles.js:
1200         * Animometer/tests/misc/resources/canvas-electrons.js:
1201         * Animometer/tests/misc/resources/canvas-stars.js:
1202         * Animometer/tests/resources/main.js:
1203         * Animometer/tests/simple/resources/simple-canvas.js:
1204         * Animometer/tests/simple/resources/tiled-canvas-image.js:
1205         * Animometer/tests/template/resources/template-canvas.js:
1206         * Animometer/tests/template/resources/template-css.js:
1207         * Animometer/tests/template/resources/template-svg.js:
1208         * Animometer/tests/text/resources/layering-text.js:
1209
1210 2016-02-07  Jon Lee  <jonlee@apple.com>
1211
1212         Make the fixed controller a step controller instead. Halfway through the test
1213         it will bump up the complexity 4-fold. Calculate the step timestamp using options
1214         instead of a separate parameter to the Controller constructor.
1215
1216         * Animometer/developer.html: Change value to "step"
1217         * Animometer/resources/debug-runner/animometer.js:
1218         (window.suitesManager.updateEditsElementsState): Show number inputs when set to "step".
1219         * Animometer/tests/resources/main.js:
1220         (update): Provide a hook for subclasses to tune.
1221         (StepController): Maintain a flag determining whether we've stepped, and the time
1222         we should step.
1223         (Benchmark): Use the new StepController.
1224
1225 2016-02-07  Jon Lee  <jonlee@apple.com>
1226
1227         Adjust the FPS graph scale.
1228
1229         Instead of making the FPS graph linearly scale, scale it based on the frame length,
1230         but show the data in terms of FPS. Because it is inversely proportional, and most
1231         of the data never gets below 20, concentrate the axis from 20-60 FPS, since otherwise
1232         over half of the available graph space ends up blank.
1233
1234         This means we should convert all of the FPS data to frame length data.
1235
1236         * Animometer/resources/debug-runner/graph.js: Update the domain to be based on
1237         frame length in milliseconds instead of FPS. Update the cursor to consider all of the
1238         values being shown, and then pick the min and max values to represent the length of the
1239         cursor.
1240         * Animometer/resources/runner/animometer.js:
1241         * Animometer/resources/strings.js:
1242         * Animometer/tests/resources/main.js:
1243         (processSamples): Add the ability to only sample a range of the data instead of everything
1244         after an offset index. Update sampler to record the frame lengths instead of the frame
1245         rate.
1246
1247 2016-02-07  Jon Lee  <jonlee@apple.com>
1248
1249         Add option to use different methods for retrieving a timestamp.
1250
1251         * Animometer/developer.html: Add performance.now and Date.now options.
1252         * Animometer/resources/runner/animometer.js: Default to performance.now.
1253         (window.benchmarkController.startBenchmark):
1254         * Animometer/tests/resources/main.js: Tie the desired method to _getTimestamp.
1255         (run): Use _getTimestamp.
1256         (_animateLoop): Ditto.
1257
1258 2016-02-07  Jon Lee  <jonlee@apple.com>
1259
1260         Allow adding any number of markers to the graph. The markers can be labeled
1261         and contain timestamp and sample index data. Make it a part of the controller
1262         rather than keeping it in the sampler.
1263
1264         * Animometer/resources/debug-runner/animometer.css: Add styles for markers
1265         * Animometer/resources/debug-runner/graph.js: Create the markers and add
1266         text labels.
1267         * Animometer/resources/runner/animometer.js: Assume the samplingTimeOffset
1268         is just one of the marks provided.
1269         * Animometer/resources/strings.js: Add Strings.json.marks.
1270         * Animometer/tests/resources/main.js:
1271         (Controller): Keep marks here. They are keyed by the marker name, so no two
1272         markers should have the same name.
1273         (recordFirstSample): Refactor to use mark.
1274         (mark): Allows for arbitrary data if needed later. The timestamp maintained
1275         is relative to the absolute start timestamp.
1276         (containsMark): Checks whether a mark with a specific comment exists.
1277         (processSamples): Removes the _startTimestamp offset from the marks before
1278         setting it in results.
1279         * Animometer/tests/resources/sampler.js: Remove marks.
1280
1281 2016-02-07  Jon Lee  <jonlee@apple.com>
1282
1283         Get rid of options member variable in Benchmark.
1284
1285         Options are only needed when initializing the stage or benchmark, so there's no
1286         need to also keep a reference to it.
1287
1288         * Animometer/tests/resources/main.js: Get rid of options variable in Benchmark.
1289         Pass options to Controllers and Stages.
1290         (Controller.Utilities.createClass):
1291         (Benchmark.Utilities.createClass):
1292         (get options): Deleted.
1293
1294         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js:
1295         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
1296         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
1297         * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
1298         * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
1299         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
1300         * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
1301         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
1302         * Animometer/tests/master/resources/canvas-stage.js:
1303         * Animometer/tests/master/resources/canvas-tests.js:
1304         * Animometer/tests/master/resources/particles.js:
1305         * Animometer/tests/misc/resources/canvas-electrons.js:
1306         * Animometer/tests/misc/resources/canvas-stars.js:
1307         * Animometer/tests/misc/resources/compositing-transforms.js:
1308         * Animometer/tests/simple/resources/simple-canvas-paths.js:
1309         * Animometer/tests/simple/resources/tiled-canvas-image.js:
1310         * Animometer/tests/template/resources/template-canvas.js:
1311         * Animometer/tests/template/resources/template-css.js:
1312         * Animometer/tests/template/resources/template-svg.js:
1313         * Animometer/tests/text/resources/layering-text.js:
1314
1315 2016-02-07  Jon Lee  <jonlee@apple.com>
1316
1317         Update how the benchmark is run
1318         https://bugs.webkit.org/show_bug.cgi?id=153960
1319
1320         Provisionally reviewed by Said Abou-Hallawa.
1321
1322         Introduce the notion of a Controller. It is responsible for recording, updating,
1323         and processing the statistics and complexity of the benchmark. This allows
1324         plugging in different Controllers.
1325
1326         This strips most of the functionality from Animator and BenchmarkState, so fold
1327         what's left into Benchmark. Now, Benchmarks only own a stage and a controller, but
1328         are responsible for driving the animation loop.
1329
1330         Rewrite Animator._shouldRequestAnotherFrame into two different Controllers. One
1331         maintains a fixed complexity, and the other adapts the complexity to meet a
1332         fixed FPS.
1333
1334         Fix the Kalman estimator to be modeled on a scalar variable with no model.
1335
1336         * Animometer/tests/resources/main.js: Remove BenchmarkState and Animator, and
1337         replace it with a Controller. Add a FixedController and refactor the previous controller
1338         to an AdaptiveController.
1339
1340         (Controller): Controllers own the estimator and the sampler. When a new frame is
1341         displayed, the animation loop calls update(). The estimator and sampler record
1342         stats, then tune. Samplers can track multiple series of data. The basic controller
1343         tracks timestamp, complexity, and estimated frame rate.
1344                 The Kalman estimation is based on the frame length rather than the frame
1345         rate. Because FPS is inverse proportional to frame length, in the case where the measured
1346         frame length is very small, the FPS ends up being a wildly large number (in the order of
1347         600-1000 "FPS"), and it pulls the estimator up drastically enough that it takes a while
1348         for it to settle back down. Using frame length reduces the impact of these spikes.
1349                 Converging the estimation takes enough time to avoid initializing it immediately
1350         when the benchmark starts. Instead, the benchmark runs for a brief period of time (100ms)
1351         before running it in earnest. Allow controllers an opportunity to set the complexity
1352         before starting recording.
1353                 When the benchmark is complete, the controller has an opportunity to process
1354         the samples. The default implementation calculates the raw FPS based on the time
1355         difference of the samples, and calculates the complexity score. This is moved from
1356         Benchmark.processSamples.
1357
1358         (Controller): Initialize timestamps. These are at first relative to the start of the
1359         benchmark, but are offset by the absolute start time during start(). By default maintain
1360         3 data series, but subclasses can override.
1361         (start): Calls recordFirstSample() for subclasses to override if needed.
1362         (recordFirstSample): For basic controller, start sampling at the beginning.
1363         (update): Update the frame length estimator and sample.
1364         (shouldStop): Checks that the time is before _endTimestamp.
1365         (results): Returns the processed samples.
1366         (processSamples): Iterate through the sample data and collate them. Include scores.
1367
1368         (FixedComplexityController): Controller that tunes the stage to the desired complexity
1369         prior to starting, and keeps it at that complexity.
1370
1371         (AdaptiveController): Have the estimator estimate the interval frame rate instead of the
1372         raw frame rate.
1373                 The previous version of this controller ignored the frame that came after the
1374         adjustment. The raw FPS show that whatever noise the scene change adds is negligible
1375         compared to the noise of the system overall. Stop ignoring that frame and include all
1376         frames in the measurements.
1377
1378         (Benchmark): Remove dependency on animator, and instantiate a runner based on what is
1379         selected. Most of the loop's functionality is in Controller, so remove here.
1380         (Benchmark.run): Remove start() since it is only called from run(), and fold it in here.
1381         (Benchmark._animateLoop): Fold in from Animator.animateLoop. Let the benchmark run for
1382         a brief period before calling Controller.start().
1383
1384         * Animometer/tests/resources/math.js: Fix the Kalman estimator. The filter estimates
1385         a scalar variable, and makes basic assumptions regarding the model. As a result
1386         none of the linear algebra classes are needed, so remove Matrix, Vector3, and Matrix3.
1387         (SimpleKalmanEstimator): Calculate the gain based on the provided process and
1388         measurement errors.
1389         (KalmanEstimator): Deleted.
1390         (IdentityEstimator): Deleted.
1391         (PIDController): Refactor to use the Utilities.createClass() helper.
1392
1393         The Kalman filter algorithm is explained here http://greg.czerniak.info/guides/kalman1/.
1394         The state, represented by a scalar, is the estimated frame length. There is no user
1395         transition of the state, and the state is the same as the measurement. With this model,
1396         the estimation error converges, so calculate the gain ahead of time.
1397
1398         * Animometer/developer.html: Remove fixed-after-warmup since it is not useful.
1399         Replace the option to toggle the estimator, and make it possible to customize the
1400         estimator's error parameters. Show raw FPS by default, and remove interval FPS,
1401         which will be shown instead of the filtered raw FPS.
1402         * Animometer/resources/debug-runner/animometer.css: Put the header behind the graph.
1403         Remove #intervalFPS rules; move the color to #filteredFPS.
1404         * Animometer/resources/debug-runner/graph.js:
1405         (updateGraphData): Update the hr style to force the layout to be calculated
1406         correctly. Change the tick format to be in terms of seconds, since the timestamps
1407         are in milliseconds. Remove interval data.
1408         * Animometer/resources/runner/animometer.js:
1409         (window.benchmarkController.startBenchmark): Set Kalman parameters.
1410         * Animometer/resources/runner/benchmark-runner.js:
1411         (_runBenchmarkAndRecordResults): When a benchmark completes, expect it to return
1412         the final data, rather than passing a sampler from the controller. This avoids
1413         needing to expose the sampler variable in the benchmark.
1414         * Animometer/tests/resources/sampler.js:
1415         (process): Move the setting of the target frame rate to AdaptiveController.
1416
1417 2016-02-06  Jon Lee  <jonlee@apple.com>
1418
1419         Code clean up: Move Rotater function closer to Stage static methods.
1420         The Rotater is used together with those methods; keep them close.
1421
1422         * Animometer/tests/resources/main.js:
1423
1424 2016-02-06  Jon Lee  <jonlee@apple.com>
1425
1426         Update the JS includes due to ResultsTable move.
1427
1428         * Animometer/developer.html:
1429         * Animometer/index.html:
1430
1431 2016-02-06  Jon Lee  <jonlee@apple.com>
1432
1433         Move createElement and createSVGElement to Utilities.
1434
1435         * Animometer/resources/extensions.js:
1436         (Utilities.createElement): Added.
1437         (Utilities.createSVGElement): Added.
1438         (DocumentExtension.createElement): Deleted.
1439         (DocumentExtension.createSvgElement): Deleted.
1440
1441         * Animometer/resources/debug-runner/animometer.js:
1442         * Animometer/resources/runner/animometer.js:
1443         * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
1444         * Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js:
1445         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
1446
1447 2016-02-06  Jon Lee  <jonlee@apple.com>
1448
1449         Add a convenience function for creating a class.
1450
1451         The pattern for creating a class is common enough to add as a Utilities
1452         helper function. It also makes it easy to collapse class definitions when
1453         editing.
1454
1455         * Animometer/resources/debug-runner/animometer.js: Move ProgressBar definition,
1456         since it is only used here.
1457         * Animometer/resources/runner/animometer.js: Move ResultsDashboard and
1458         ResultsTable definition, since it is only used here.
1459         * Animometer/resources/extensions.js: Move Utilities definition to the top. Convert
1460         Point, Insets, SimplePromise.
1461         (ProgressBar): Moved to animometer.js.
1462         (ResultsDashboard): Moved to animometer.js.
1463         (ResultsTable): Moved to animometer.js.
1464         * Animometer/resources/runner/benchmark-runner.js: Convert BenchmarkRunnerState,
1465         BenchmarkRunner.
1466         * Animometer/tests/resources/main.js: Convert Rotater, Stage, Animator, Benchmark.
1467         * Animometer/tests/resources/sampler.js: Convert Experiment, Sampler.
1468
1469         Convert test primitives.
1470         * Animometer/tests/master/resources/canvas-tests.js: Convert CanvasLineSegment,
1471         CanvasArc, CanvasLinePoint.
1472         * Animometer/tests/simple/resources/simple-canvas-paths.js: Convert CanvasLineSegment,
1473         CanvasLinePoint, CanvasQuadraticSegment, CanvasQuadraticPoint, CanvasBezierSegment,
1474         CanvasBezierPoint, CanvasArcToSegment, CanvasArcToSegmentFill, CanvasArcSegment,
1475         CanvasArcSegmentFill, CanvasRect, CanvasRectFill.
1476         * Animometer/tests/simple/resources/tiled-canvas-image.js: Convert CanvasImageTile.
1477
1478 2016-02-06  Jon Lee  <jonlee@apple.com>
1479
1480         Minor improvements to debug harness.
1481
1482         * Animometer/developer.html:
1483         * Animometer/resources/debug-runner/animometer.css:
1484         (#suites): Put the complexity text boxes closer to the test names.
1485         (#options):
1486         (#rawFPS circle): Make the interval FPS appear as a separate data series, with a line.
1487         (#intervalFPS path):
1488         (#intervalFPS circle):
1489         * Animometer/resources/debug-runner/animometer.js:
1490         (window.optionsManager.updateLocalStorageFromUI): Convert number inputs from text.
1491         (window.suitesManager._onChangeTestCheckbox): Refactor to take a checkbox.
1492         (window.suitesManager._createTestElement): Enhance such that typing into the complexity
1493         input will automatically select that test for running.
1494         (window.suitesManager.updateLocalStorageFromJSON): Make the harness work for private
1495         browsing.
1496         * Animometer/resources/debug-runner/graph.js: Separate the intervalFPS data, and show
1497         more accuracy in timestamps.
1498
1499 2016-02-06  Jon Lee  <jonlee@apple.com>
1500
1501         Refactor helper methods for getting random values for a stage.
1502
1503         Instead of requiring a Stage instance, just attach it to the Stage object.
1504
1505         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
1506         * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
1507         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
1508         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
1509         * Animometer/tests/master/resources/canvas-tests.js:
1510         * Animometer/tests/master/resources/particles.js:
1511         * Animometer/tests/misc/resources/canvas-electrons.js:
1512         * Animometer/tests/misc/resources/canvas-stars.js:
1513         * Animometer/tests/misc/resources/compositing-transforms.js:
1514         * Animometer/tests/resources/main.js:
1515         * Animometer/tests/simple/resources/simple-canvas-paths.js:
1516
1517 2016-02-05  Said Abou-Hallawa  <sabouhallawa@apple.com>
1518
1519         Add a new graphics test for CanvasRenderingContext2D functions: getImageData and putImageData
1520         https://bugs.webkit.org/show_bug.cgi?id=151716
1521
1522         Reviewed by Darin Adler.
1523
1524         The purpose of this test is to measure the performance of getImageData
1525         and putImageData functions. This test draws a background on the canvas
1526         and then gets some random tiles from this background and draw them in
1527         destinations different from their original sources.
1528
1529         * Animometer/resources/debug-runner/tests.js: Adding the new test to the canvas simple tests suite.
1530
1531         * Animometer/resources/extensions.js:
1532         (Array.prototype.shuffle): Shuffles the elements of an array.
1533
1534         (Point.zero): Returns a new Point object whose x and y are equal zero.
1535         (Point.prototype.str): Used for debugging the Point object.
1536
1537         * Animometer/tests/simple/resources/tiled-canvas-image.js: Added.
1538         (CanvasImageTile):
1539         (CanvasImageTile.prototype.getImageData):
1540         (CanvasImageTile.prototype.putImageData):
1541         (Stage.call.initialize):
1542         (Stage.call._createTiles):
1543         (Stage.call._nextTilePosition):
1544         (Stage.call.tune):
1545         (Stage.call._drawBackground):
1546         (Stage.call.animate):
1547         (Stage.call.complexity):
1548         (Stage.call):
1549         * Animometer/tests/simple/tiled-canvas-image.html: Added.
1550
1551 2016-01-07  Jon Lee  <jonlee@apple.com>
1552
1553         Fix new test.
1554
1555         * Animometer/resources/runner/tests.js: Wrong URL from an
1556         old patch.
1557         * Animometer/tests/master/particles.html:
1558         * Animometer/tests/master/resources/dom-particles.js:
1559         (Particle.call.reset): Figured out a simpler way to set up
1560         the particles.
1561         (this.move.reset): Deleted.
1562         (this.move._applyAttributes): Deleted.
1563         * Animometer/tests/master/resources/particles.js:
1564         (Particle): Call move() after reset().
1565
1566 2016-01-07  Jon Lee  <jonlee@apple.com>
1567
1568         Update benchmark test suite
1569         https://bugs.webkit.org/show_bug.cgi?id=152679
1570
1571         Reviewed by Simon Fraser.
1572
1573         Add a new test. The test has a rotating background
1574         gradient, and does a better job physically simulating
1575         particles.
1576
1577         * Animometer/resources/extensions.js: Teach Point to take constants as well as other Points.
1578         (Point.prototype.length): Added.
1579         (Point.prototype.normalize): Added.
1580         * Animometer/resources/runner/tests.js: Add the test to the master suite.
1581         * Animometer/tests/master/particles.html: Added.
1582         * Animometer/tests/master/resources/particles.js: Added. Parent class for different kinds of particles.
1583         (Particle):
1584         (Particle.prototype.reset): If the particle starts slowing down in terms of its animation,
1585         reset it.
1586         (Particle.prototype.animate): Bounce off the walls elastically, and include gravity.
1587         (Particle.prototype.move): Subclasses should override.
1588         (ParticlesStage): Stage includes a rotating gradient background.
1589         * Animometer/tests/master/resources/dom-particles.js: Added. Creates a <div> and adds it to
1590         the stage.
1591         * Animometer/tests/resources/star.svg: Added.
1592
1593 2016-01-03  Jon Lee  <jonlee@apple.com>
1594
1595         Update benchmark test suite
1596         https://bugs.webkit.org/show_bug.cgi?id=152679
1597
1598         Reviewed by Simon Fraser.
1599
1600         Move algorithm.js and sampler.js to tests/ and benchmark-runner.js to runner/.
1601
1602         Needed by both harnesses.
1603         * Animometer/resources/runner/benchmark-runner.js: Renamed from PerformanceTests/Animometer/resources/debug-runner/benchmark-runner.js.
1604         * Animometer/developer.html:
1605         * Animometer/index.html:
1606
1607         Needed only by the tests. Move to tests/. Statistics, in sampler.js, is used by ResultsDashboard, so move that
1608         into extensions.js.
1609         * Animometer/resources/extensions.js:
1610         * Animometer/tests/resources/algorithm.js: Renamed from PerformanceTests/Animometer/resources/algorithm.js.
1611         * Animometer/tests/resources/sampler.js: Renamed from PerformanceTests/Animometer/resources/sampler.js.
1612         * Animometer/tests/bouncing-particles/bouncing-canvas-images.html:
1613         * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html:
1614         * Animometer/tests/bouncing-particles/bouncing-css-images.html:
1615         * Animometer/tests/bouncing-particles/bouncing-css-shapes.html:
1616         * Animometer/tests/bouncing-particles/bouncing-svg-images.html:
1617         * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html:
1618         * Animometer/tests/master/canvas-stage.html:
1619         * Animometer/tests/misc/canvas-electrons.html:
1620         * Animometer/tests/misc/canvas-stars.html:
1621         * Animometer/tests/misc/compositing-transforms.html:
1622         * Animometer/tests/simple/simple-canvas-paths.html:
1623         * Animometer/tests/template/template-canvas.html:
1624         * Animometer/tests/template/template-css.html:
1625         * Animometer/tests/template/template-svg.html:
1626         * Animometer/tests/text/layering-text.html:
1627         * Animometer/tests/text/text-boxes.html:
1628
1629 2016-01-07  Jon Lee  <jonlee@apple.com>
1630
1631         Update benchmark test suite
1632         https://bugs.webkit.org/show_bug.cgi?id=152679
1633
1634         Reviewed by Simon Fraser.
1635
1636         Fix tests for other browsers.
1637
1638         * Animometer/resources/extensions.js:
1639         (Point.elementClientSize): Some browsers return 0 for SVG clientWidth and clientHeight.
1640         Use getBoundingClientRect() instead.
1641         * Animometer/tests/misc/resources/canvas-electrons.js:
1642         (CanvasElectron.prototype._draw): Some browsers don't support ellipse.
1643
1644 2016-01-07  Jon Lee  <jonlee@apple.com>
1645
1646         Add a waitUntilReady() step
1647         https://bugs.webkit.org/show_bug.cgi?id=152862
1648
1649         Reviewed by Simon Fraser.
1650
1651         Add a waitUntilReady() callback that lets the benchmark complete
1652         its setup before running the benchmark.
1653
1654         * Animometer/tests/resources/main.js:
1655         (Benchmark.prototype.run): First call waitUntilReady, which returns
1656         a promise. When the promise resolves, run everything that was in this
1657         function.
1658         (Benchmark.prototype.waitUntilReady): Default implementation returns
1659         a resolved promise.
1660         (Benchmark.prototype.resolveWhenFinished): Deleted.
1661         * Animometer/tests/template/resources/template-canvas.js:
1662         (new.TemplateCanvasStage.waitUntilReady): Example on how to override.
1663
1664 2016-01-03  Jon Lee  <jonlee@apple.com>
1665
1666         Update data reporting and analysis
1667         https://bugs.webkit.org/show_bug.cgi?id=152670
1668
1669         Reviewed by Simon Fraser.
1670
1671         Show new graph data. Provide controls to show different series data. Provide an
1672         interactive cursor that shows the data at a given sample.
1673
1674         * Animometer/developer.html: Add a nav section in #results. Each part of the graph
1675         has a checkbox for visual toggling, as well as companion spans to contain the data.
1676                 The numbers will always be shown even if the SVG isn't.
1677         * Animometer/resources/debug-runner/animometer.css:
1678         (#suites): Adjust spacing when doing fixed complexity.
1679         (#test-graph nav): Place the nav in the upper right corner.
1680         (#test-graph-data > svg): Fix the FPS scale from 0-60. It makes the raw FPS goes past
1681         that scale. Allow it to show.
1682         (.target-fps): Add a dotted line for where the benchmark is supposed to settle for FPS.
1683         (#cursor line): The cursor contains a line and highlight circles for the data being shown.
1684         (#cursor circle):
1685         (#complexity path): This and rules afterward are named by series type.
1686         (#complexity circle):
1687         (#filteredFPS path):
1688         (#filteredFPS circle):
1689         (#rawFPS path):
1690         (#intervalFPS circle):
1691         (.left-samples): Deleted.
1692         (.right-samples): Deleted.
1693         * Animometer/resources/debug-runner/animometer.js:
1694         (initialize): Add a "changed" listener when the checkboxes change in the nav.
1695         (onBenchmarkOptionsChanged): Renamed.
1696         (showTestGraph): All graph data is passed in as graphData instead of as arguments.
1697         * Animometer/resources/debug-runner/graph.js: Extend BenchmarkController. When showing
1698         a new graph, call updateGraphData(). It creates all of the d3 graphs. onGraphOptionsChanged()
1699         toggles the data on and off.
1700         (updateGraphData): Add the axes. Add the average lines and markers for sample time and
1701         target FPS. Add the cursor group. Use helper function addData() to add the data. On top of
1702         everything add a transparent area which will catch all of the mouse events. When the mouse
1703         moves in the graph, find the closest data point, show the data in the nav area, and highlight
1704         the data points.
1705         (addData): Adds a line and circle for each data point. Also adds a highlight cursor with a
1706         size a little larger than the circle radius for the data points.
1707         (onGraphOptionsChanged): Called when data is visually toggled.
1708         (showOrHideNodes): Helper function to toggle the .hidden class.
1709         * Animometer/resources/extensions.js:
1710         (ResultsDashboard.prototype.get data): Get rid of the arguments for _processData.
1711         (ResultsTable.prototype._addGraphButton): Shove all of the graph data into a singular object.
1712
1713         Producing the JSON can take a while with all of the data. Make it on-demand with a
1714         button.
1715
1716         * Animometer/resources/debug-runner/animometer.js:
1717         (showResults): When showing the results, don't serialize the JSON data. Move that to...
1718         (showJSONResults): ...here. Remove the button.
1719
1720         * Animometer/developer.html: Add a button. The button will remove itself and populate
1721         the textarea with the JSON data.
1722         * Animometer/resources/debug-runner/animometer.css:
1723         (.hidden): Add a universal hidden class.
1724         (#results button.small-button): Promote the small-button styles to the whole results
1725         section for use in the JSON button.
1726         (#results button.small-button:active):
1727         (#results-data button.small-button): Deleted.
1728         (#results-data button.small-button:active): Deleted.
1729
1730         Refactor how Animator does its recording.
1731
1732         * Animometer/tests/resources/math.js: Create a new, simple estimator that just returns
1733         the same interval frame rate for adjustment.
1734         * Animometer/tests/resources/main.js:
1735         (Animator): Remove _dropFrameCount, and make variables more accurate described.
1736         (Animator.prototype.initialize): Use the identity estimator instead of using a bool.
1737         (Animator.prototype._intervalTimeDelta): Rename, only used internally.
1738         (Animator.prototype._shouldRequestAnotherFrame): Assume we drop one frame for adjustment
1739         of the scene. If we are within the number of frames to measure for the interval, just
1740         record the timestamp. Otherwise we are ready to evaluate and adjust the scene. Record
1741         the interval frame rate and the estimator's frame rate.
1742
1743         Avoid processing the data through the Experiment while the test is running. Reconfigure
1744         the sampler to just record the raw samples. After the test is done, run the samples through
1745         the Experiment to get the score.
1746
1747         * Animometer/resources/sampler.js:
1748         (Experiment): Fold _init() into the constructor since nobody else will call it. This is not
1749         needed until the test concludes, so remove startSampling(). Clients should just call sample().
1750         (Sampler): Pre-allocate arrays given the number of data points being recorded, and a capacity
1751         of how many samples will be used. The processor is a called when it's time to process the data
1752         since that is the client also telling the Sampler what to record.
1753                 Introduce the notion of marks as well, which allows the client to mark when an
1754         event occurs. When we mark sample start, we can attach the timestamp there, instead of storing
1755         it separately.
1756         (Sampler.prototype.startSampling): Deleted. Clients should just call record().
1757         (Sampler.prototype.record): The data to record is passed in as variable arguments.
1758         (Sampler.prototype.mark): When adding a mark, a client needs to provide a unique string, and
1759         can provide extra data object for later retrieval.
1760         (Sampler.prototype.process): Renamed from toJSON. Trim the sampling arrays to what was used.
1761         Call the processor to process the samples.
1762         * Animometer/resources/debug-runner/benchmark-runner.js:
1763         (BenchmarkRunner.prototype._runBenchmarkAndRecordResults): Call process().
1764
1765         * Animometer/resources/strings.js: Add some new strings, remove the graph ones since they are
1766         not used.
1767         * Animometer/tests/resources/main.js:
1768         (Benchmark): Create a sampler with 4 series. The maximum number of points expected is the
1769         number of seconds multiplied by 60 fps. Benchmark, as a client of the Sampler, knows about all
1770         of the data being added to the Sampler. It is added through record(), and processed through
1771         processSamples().
1772         (Benchmark.prototype.update): Mark when we've passed warmup and are starting to sample. Include
1773         the timestamp in the custom data for the mark. This avoids the need to store is separately in
1774         the Sampler. Fold what was in record() here, since nothing else needs this functionality.
1775         record() now just relays the information to the sampler.
1776         (Benchmark.prototype.record): Called by Animator, which provides the data to the sampler.
1777         Animator's calls to this is part of a later patch. Requires each stage to return its complexity.
1778         (Benchmark.prototype.processSamples): If the sampling mark exists, add it to the results.
1779                 Go through all of the samples. All samples contain a timestamp and complexity. We
1780         calculate "raw FPS" which is the time differential from the previous sample. At regular intervals
1781         the Kalman-filtered FPS and the interval average FPS are also recorded. We also create two
1782         experiments, to get the scores for the complexity and smoothed FPS, and add those samples to
1783         the experiments. Grab those scores and add them into results also.
1784
1785         Add complexity() to the tests for Benchmark.record().
1786         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
1787         * Animometer/tests/misc/resources/canvas-electrons.js:
1788         * Animometer/tests/misc/resources/canvas-stars.js:
1789         * Animometer/tests/text/resources/layering-text.js:
1790
1791 2015-12-27  Jon Lee  <jonlee@apple.com>
1792
1793         Simplify the test harness
1794         https://bugs.webkit.org/show_bug.cgi?id=152562
1795
1796         Reviewed by Simon Fraser.
1797
1798         Update the simple canvas tests. For the paths, start from the center instead of the
1799         top-left corner. Instead of using a coordinate limit, use a canonized factor, and
1800         use that along both the x and y axes, so that more capable tests use more of the
1801         canvas.
1802
1803         * Animometer/tests/simple/resources/simple-canvas-paths.js:
1804         (CanvasLinePoint): Rewrite to use the coordinate maximum factor.
1805         (CanvasQuadraticPoint): Ditto.
1806         (CanvasBezierPoint): Ditto.
1807         * Animometer/tests/simple/resources/simple-canvas.js:
1808         (tune): Calculate a factor instead of a maximum coordinate.
1809
1810 2015-12-27  Jon Lee  <jonlee@apple.com>
1811
1812         Simplify the test harness
1813         https://bugs.webkit.org/show_bug.cgi?id=152562
1814
1815         Reviewed by Simon Fraser.
1816
1817         All of the benchmarks use the default Animator(). Don't require new tests
1818         to pass a new instance, and instead just make one in the Benchmark constructor.
1819
1820         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js:
1821         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
1822         * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
1823         * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
1824         * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
1825         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
1826         * Animometer/tests/master/resources/canvas-tests.js:
1827         * Animometer/tests/misc/resources/canvas-electrons.js:
1828         * Animometer/tests/misc/resources/canvas-stars.js:
1829         * Animometer/tests/misc/resources/compositing-transforms.js:
1830         * Animometer/tests/resources/main.js:
1831         * Animometer/tests/simple/resources/simple-canvas-paths.js:
1832         * Animometer/tests/template/resources/template-canvas.js:
1833         * Animometer/tests/template/resources/template-css.js:
1834         * Animometer/tests/template/resources/template-svg.js:
1835         * Animometer/tests/text/resources/layering-text.js:
1836         * Animometer/tests/text/resources/text-boxes.js:
1837
1838         Refactor the template.
1839
1840         * Animometer/tests/template/resources/template-canvas.js:
1841         * Animometer/tests/template/resources/template-css.js:
1842         * Animometer/tests/template/resources/template-svg.js:
1843         * Animometer/tests/template/template-canvas.html:
1844         * Animometer/tests/template/template-css.html:
1845         * Animometer/tests/template/template-svg.html:
1846
1847         Refactor the SVG suite.
1848
1849         * Animometer/tests/bouncing-particles/bouncing-svg-images.html: Move scripts to the end.
1850         * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html: Ditto.
1851
1852         * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html: Remove extraneous includes
1853         to stage.js.
1854         * Animometer/tests/text/text-boxes.html: Ditto.
1855
1856         BouncingCanvasParticlesBenchmark is not necessary. Use Benchmark directly when subclassing.
1857         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js: Remove
1858         BouncingCanvasParticlesBenchmark.
1859         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js: Use Benchmark.
1860         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js: Ditto.
1861
1862         * Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js: Require the shape
1863         in the constructor instead of having subclasses set the private variable.
1864
1865         * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js: Refactor.
1866         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
1867
1868         Refactor the HTML suite.
1869
1870         Move scripts to the end.
1871         * Animometer/tests/bouncing-particles/bouncing-css-images.html:
1872         * Animometer/tests/bouncing-particles/bouncing-css-shapes.html:
1873         * Animometer/tests/text/layering-text.html:
1874         * Animometer/tests/text/text-boxes.html:
1875
1876         Refactor to use the new variables.
1877         * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
1878         * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
1879         * Animometer/tests/text/resources/layering-text.js:
1880         * Animometer/tests/text/resources/text-boxes.js:
1881
1882         Refactor the bouncing canvas tests.
1883
1884         * Animometer/tests/bouncing-particles/bouncing-canvas-images.html: Move scripts to the end.
1885         * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html: Move scripts to the end.
1886
1887         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js: Promote a few
1888         properties to "public" since they are used by subclasses.
1889         (BouncingParticlesStage): Fix the constructor, which was missing "this". Make particles
1890         "public" for subclasses.
1891         (BouncingParticlesStage.initialize): Fix the max velocity, which was accidentally changed.
1892         * Animometer/tests/misc/resources/compositing-transforms.js: Refactor.
1893
1894         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
1895         BouncingCanvasParticlesAnimator is no longer needed.
1896         (BouncingCanvasParticle): Change constructor to take a shape as a parameter instead of
1897         having subclasses set the variable.
1898
1899         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js: Refactor.
1900         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js: Refactor.
1901
1902         Move example/ files into misc/.
1903
1904         * Animometer/tests/misc/canvas-electrons.html: Renamed from PerformanceTests/Animometer/tests/examples/canvas-electrons.html.
1905         * Animometer/tests/misc/canvas-stars.html: Renamed from PerformanceTests/Animometer/tests/examples/canvas-stars.html.
1906         * Animometer/tests/misc/resources/canvas-electrons.js: Renamed from PerformanceTests/Animometer/tests/examples/resources/canvas-electrons.js.
1907         * Animometer/tests/misc/resources/canvas-stars.js: Renamed from PerformanceTests/Animometer/tests/examples/resources/canvas-stars.js.
1908
1909         * Animometer/resources/debug-runner/tests.js: Update test URLs.
1910
1911         Refactor miscellaneous suite.
1912
1913         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
1914         Remove BouncingParticlesAnimator and BouncingParticleBenchmark, which are
1915         not needed.
1916         (tune): Remove console assert.
1917         * Animometer/tests/resources/main.js: Add Rotater back in from stage.js.
1918
1919         * Animometer/tests/examples/resources/canvas-electrons.js: Remove CanvasElectronsAnimator.
1920         * Animometer/tests/examples/resources/canvas-stars.js: Remove CanvasStarsAnimator.
1921         * Animometer/tests/misc/resources/compositing-transforms.js:
1922         * Animometer/tests/examples/canvas-electrons.html: Move scripts to the end.
1923         * Animometer/tests/examples/canvas-stars.html: Ditto.
1924         * Animometer/tests/misc/compositing-transforms.html: Ditto.
1925
1926         Refactor the simple suite.
1927
1928         * Animometer/tests/master/resources/canvas-stage.js:
1929         (tune): Remove coordinateMaximum since it is not needed in any
1930         of the master tests.
1931         * Animometer/tests/simple/resources/simple-canvas.js:
1932         SimpleCanvasAnimator and SimpleCanvasBenchmark are no longer
1933         needed.
1934         (tune): Manage the objects differently, but instead of duplicating
1935         all of SimpleCanvasStage here, just replace tune(). Include
1936         coordinateMaximum, and remove items from the end of the list
1937         instead of the beginning.
1938         (StageBenchmark.call.createAnimator): Deleted.
1939         (StageBenchmark.call): Deleted.
1940         * Animometer/tests/simple/resources/simple-canvas-paths.js:
1941         * Animometer/tests/simple/simple-canvas-paths.html: Move
1942         scripts to the end.
1943
1944         Get rid of stage.js, StageAnimator, and StageBenchmark. Don't have the progress bar update during the test.
1945
1946         * Animometer/resources/debug-runner/animometer.js:
1947         (initialize): Move the setting of testsCount to the debug runner.
1948         (didRunTest): Nicer name.
1949         * Animometer/resources/debug-runner/benchmark-runner.js:
1950         (BenchmarkRunner.prototype._runBenchmarkAndRecordResults): Don't pass in the progress bar to benchmarks.
1951         * Animometer/resources/extensions.js:
1952         (ProgressBar): Refactor. Make variables "private". Resetting the progress when instantiating.
1953         (ProgressBar.prototype.incrementRange): This is called every time a benchmark completes.
1954         * Animometer/resources/runner/animometer.js:
1955         (window.benchmarkRunnerClient.initialize): Remove unneeded setting of testsCount.
1956         * Animometer/resources/strings.js: These are no longer needed.
1957         * Animometer/tests/master/canvas-stage.html: Remove script inclusion. Other tests will follow.
1958         * Animometer/tests/master/resources/canvas-tests.js: Use Benchmark instead of StageBenchmark.
1959         * Animometer/tests/resources/main.js: Messages are no longer needed
1960         (Animator.prototype._shouldRequestAnotherFrame): Rename from animate(), since this method returns a boolean
1961         indicating whether another frame should be requested. Collapse the logic from StageAnimator into animateLoop.
1962         (BenchmarkState.prototype.currentStage): Deleted.
1963         (BenchmarkState.prototype.currentMessage): Deleted.
1964         (BenchmarkState.prototype.currentProgress): Deleted.
1965         (Animator.prototype.animate): Deleted.
1966         (Animator.prototype.animateLoop): The stage is animated only when we have another frame to draw.
1967         (Benchmark.prototype.record): No need to update the progress bar.
1968         * Animometer/tests/resources/stage.js: Removed. Rotater will appear in a later patch, in main.js.
1969
1970         * Animometer/resources/debug-runner/benchmark-runner.js:
1971         (BenchmarkRunner.prototype._runBenchmarkAndRecordResults): Each test is run as a benchmark.
1972         Remove the call to runBenchmark by merging the options here, and calling benchmark.run()
1973         directly.
1974
1975         Make the class relationships more easily understandable. The benchmark owns the stage,
1976         animator, and options. Make the stage and animator no longer have their own references to
1977         the options. Make Stage a first-class citizen by promoting it to main.js. Later patches
1978         will try to get rid of stage.js altogether.
1979         * Animometer/tests/resources/main.js:
1980         (Stage): Moved from stage.js.
1981         (Animator): Don't pass in benchmark and options in its constructor. It will get initialized
1982         by benchmark-related parameters in initialize().
1983         (Animator.prototype.initialize): Add a back-reference to benchmark and cache an option.
1984         (Animator.prototype.get benchmark):
1985         (Animator.prototype.animate): Refactor to use the cached option, to remove its dependency on
1986         the options dictionary.
1987         (Benchmark): Require all benchmarks to have a stage and animator. The instance will initialize
1988         them.
1989         (Benchmark.prototype.get options):
1990         (Benchmark.prototype.get stage): BenchmarkStates.stages will need to be renamed to avoid confusion.
1991         (Benchmark.prototype.get animator):
1992         (Benchmark.prototype.start):
1993         (Benchmark.prototype.update): Ask the stage directly to tune or clear instead of adding another
1994         level of indirection.
1995         (window.runBenchmark): Deleted. Remove the need for a benchmarkClient. Also remove the standalone
1996         path, since tests can be individually selected, and remove the need for runBenchmark since that is
1997         handled in BenchmarkRunner._runBenchmarkAndRecordResults.
1998         * Animometer/tests/resources/stage.js:
1999         (Stage): Deleted. Moved to main.js.
2000         (StageBenchmark): What's left is updating the progress bar; to be removed.
2001         (StageAnimator): What's left can be folded in Animator.
2002
2003         Refactor master suite.
2004         * Animometer/tests/master/resources/canvas-stage.js: This now only has SimpleCanvasStage.
2005         (animate): Push the clearRect() into each stage.
2006         (complexity):
2007         (StageBenchmark.call.createAnimator): Deleted.
2008         (StageBenchmark.call): Deleted.
2009         * Animometer/tests/master/resources/canvas-tests.js: SimpleCanvasPathStrokeStage is no longer needed.
2010         (CanvasLineSegment.prototype.draw):
2011         (CanvasArc):
2012         (CanvasLinePoint): Remove the draw call because depending on its index it either needs to be moveTo
2013         or lineTo, and it is otherwise a very small draw operation that doesn't need the overhead of the
2014         function call. Do all of the drawing through the stage.
2015
2016         Refactor the subclass pattern. Introduce Utilities.createSubclass().
2017
2018         * Animometer/resources/debug-runner/benchmark-runner.js:
2019         * Animometer/resources/extensions.js:
2020         (window.Utilities.createSubclass): Takes the super class, a function representing
2021         the class's constructor, and additional methods to attach to the new class's
2022         prototype object.
2023         * Animometer/tests/text/text-boxes.html: Remove unneeded reference to utilities.js.
2024
2025         Refactor tests.
2026         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js:
2027         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
2028         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
2029         * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
2030         * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
2031         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
2032         * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
2033         * Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js:
2034         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
2035         * Animometer/tests/examples/resources/canvas-electrons.js:
2036         * Animometer/tests/examples/resources/canvas-stars.js:
2037         * Animometer/tests/master/resources/canvas-stage.js:
2038         * Animometer/tests/master/resources/canvas-tests.js:
2039         * Animometer/tests/misc/resources/compositing-transforms.js:
2040         * Animometer/tests/resources/stage.js:
2041         * Animometer/tests/simple/resources/simple-canvas-paths.js:
2042         * Animometer/tests/simple/resources/simple-canvas.js:
2043         * Animometer/tests/template/resources/template-canvas.js:
2044         * Animometer/tests/template/resources/template-css.js:
2045         * Animometer/tests/template/resources/template-svg.js:
2046         * Animometer/tests/text/resources/layering-text.js: Reorder some of the methods
2047         and properties since they rely on each other.
2048         * Animometer/tests/text/resources/text-boxes.js:
2049
2050         * Animometer/resources/debug-runner/animometer.js: Arrange calls
2051         in the order they are evoked.
2052         * Animometer/resources/debug-runner/benchmark-runner.js:
2053         (BenchmarkRunnerState.prototype.next): Get rid of return value since
2054         no caller to next() uses it.
2055         (BenchmarkRunnerState.prototype.prepareCurrentTest): Refactor the
2056         promise to resolve simply when onload() is called instead of
2057         looking for #stage.
2058         (BenchmarkRunner.prototype._runTestAndRecordResults): Suite.run
2059         simply calls runBenchmark(). Call it directly rather than through
2060         the Suite.
2061         (BenchmarkRunner.prototype.step): Remove unused parameter in
2062         resolve callback.
2063         (BenchmarkRunner.prototype.runMultipleIterations): Use this instead
2064         of self since it is outside of the closure which needed the self
2065         variable.
2066         (resolveIfReady): Deleted.
2067         (BenchmarkRunner.prototype.waitForElement): Deleted.
2068         * Animometer/resources/runner/tests.js: prepare() and run() are
2069         no longer needed.
2070         (Suite.prototype.prepare): Deleted.
2071         (Suite.prototype.run): Deleted.
2072         * Animometer/tests/master/canvas-stage.html: Move all scripts to
2073         the end of the page.
2074
2075 2015-12-23  Simon Fraser  <simon.fraser@apple.com>
2076
2077         Add an Animometer developer test which animates text-rich boxes
2078         https://bugs.webkit.org/show_bug.cgi?id=152544
2079
2080         Reviewed by Zalan Bujtas.
2081
2082         Add a test that draws lots of international text. This is a particle test,
2083         moving the boxes around with absolution positioning.
2084
2085         * Animometer/resources/debug-runner/tests.js:
2086         * Animometer/tests/text/resources/text-boxes.js: Added.
2087         (BouncingTextBox):
2088         (BouncingTextBox.prototype._move):
2089         (BouncingTextBox.prototype.animate):
2090         (BouncingTextBoxStage):
2091         (BouncingTextBoxStage.prototype.createParticle):
2092         (BouncingTextBoxStage.prototype.particleWillBeRemoved):
2093         (BouncingTextBoxsBenchmark):
2094         (BouncingTextBoxsBenchmark.prototype.createStage):
2095         (window.benchmarkClient.create):
2096         * Animometer/tests/text/text-boxes.html: Added.
2097
2098 2015-12-23  Jon Lee  <jonlee@apple.com>
2099
2100         Split benchmark into two different pages
2101         https://bugs.webkit.org/show_bug.cgi?id=152458
2102
2103         Reviewed by Simon Fraser.
2104
2105         Add tests to 'animometer' suite.
2106
2107         * Animometer/resources/runner/tests.js:
2108         * Animometer/tests/master/canvas-stage.html: Added.
2109         * Animometer/tests/master/resources/canvas-stage.js: Added.
2110         * Animometer/tests/master/resources/canvas-tests.js: Added.
2111         * Animometer/tests/master/resources/stage.css: Added.
2112
2113 2015-12-23  Jon Lee  <jonlee@apple.com>
2114
2115         Split benchmark into two different pages
2116         https://bugs.webkit.org/show_bug.cgi?id=152458
2117
2118         Reviewed by Simon Fraser.
2119
2120         Address comments.
2121
2122         * Animometer/resources/debug-runner/benchmark-runner.js:
2123         (BenchmarkRunner.prototype._runTestAndRecordResults): When the testing is complete the frame owning the
2124         sampler goes away, and a later call to get the JSON data is no longer available. Process the data
2125         right here, instead, and just reference it when displaying the results in ResultsDashboard.prototype._processData.
2126         * Animometer/resources/extensions.js:
2127         (Array.prototype.fill.Array.prototype.fill): Add a null check. Remove braces around single-line clause.
2128         (Array.prototype.find.Array.prototype.find): Update the null check.
2129         (ResultsDashboard.prototype._processData): Use the already-processed data.
2130         * Animometer/resources/runner/animometer.css:
2131         (.frame-container > iframe): Remove calc().
2132
2133         Move Array functions to extensions.js since that is included by the harness.
2134         Add ES6 Array polyfills.
2135
2136         * Animometer/resources/algorithm.js:
2137         (Array.prototype.swap): Moved to extensions.js.
2138         * Animometer/resources/extensions.js:
2139         (Array.prototype.swap):
2140         (Array.prototype.fill): Added.
2141         (Array.prototype.find): Added.
2142
2143         Adjust styles for iPad.
2144
2145         * Animometer/resources/runner/animometer.css:
2146         (@media screen and (min-device-width: 768px)): Apply to iPad as well.
2147         (@media screen and (max-device-width: 1024px)): Update width for iPads.
2148
2149         Adjustment styles for iOS.
2150
2151         * Animometer/developer.html: Different divs contain the iframe, so use a class instead and
2152         update the style rules.
2153         * Animometer/index.html:
2154         * Animometer/resources/debug-runner/animometer.css: Remove extraneous rules.
2155         (@media screen and (min-device-width: 1800px)): Move this up.
2156         * Animometer/resources/runner/animometer.css: Add rules to accomodate iOS.
2157
2158         Get rid of prefixed flex properties for now.
2159
2160         * Animometer/resources/debug-runner/animometer.css:
2161         * Animometer/resources/runner/animometer.css:
2162
2163         Update the structure of the harness. Remove the JSON-per-test but keep
2164         the JSON of the whole test run. Use the full page in order to display
2165         the graph.
2166
2167         * Animometer/developer.html: Update several of the JS file includes to UTF-8. Remove header and footer. Test results screen includes score,
2168         average, and worst 5% statistics.
2169         * Animometer/index.html: Make structure similar to developer.html.
2170         * Animometer/resources/debug-runner/animometer.css: Remove most of the
2171         button rules since they are superfluous. Move the progress bar to the
2172         top, fixed. Update the results page rules.
2173         * Animometer/resources/debug-runner/animometer.js: Remove most of the
2174         additions to sectionsManager since they are no longer needed.
2175         (setSectionHeader): Updates header of the section.
2176         (window.suitesManager._updateStartButtonState): Update selector.
2177         (showResults): Add keypress event for selecting different data for
2178         copy/paste. Update how the results are populated. Include full test
2179         JSON in a textarea, rather than requiring a button press.
2180         (showTestGraph):
2181         * Animometer/resources/debug-runner/tests.js: Update structure of Headers. Define different kinds of headers. Headers can control their
2182         title, and the text used as the cell contents, including class name.
2183         * Animometer/resources/extensions.js:
2184         (ResultsTable): Update to include a flattened version of the headers,
2185         used while populating table contents. Remove unneeded helper functions
2186         for creating the table. Rename "show" to "add".
2187         * Animometer/resources/runner/animometer.css: Update rules to
2188         accommodate the new structure.
2189         * Animometer/resources/runner/animometer.js:
2190         (window.sectionsManager.setSectionScore): Helper function to set the
2191         score and mean for a section.
2192         (window.sectionsManager.populateTable): Helper function to set the table.
2193         (window.benchmarkController.showResults): Refactor.
2194         (window.benchmarkController.selectResults): Update selectors.
2195         * Animometer/resources/runner/tests.js: Set Headers. Debug harness
2196         extends it.
2197
2198         Update debug runner to have similar names to the basic runner. Include
2199         that page's CSS and remove extraneous CSS rules.
2200
2201         Get rid of the statistics table #record.
2202
2203         * Animometer/developer.html: Rename #home to #intro. Rename .spacer to hr.
2204         * Animometer/resources/debug-runner/animometer.css: Set to flexbox when selected.
2205         * Animometer/resources/debug-runner/animometer.js: Remove recordTable.
2206         (window.suitesManager._updateStartButtonState): Update selector to #intro.
2207         (setupRunningSectionStyle): Deleted.
2208
2209         * Animometer/resources/runner/animometer.css:
2210         (#test-container.selected): Change to flex-box only when visible.
2211
2212         Remove recordTable.
2213         * Animometer/resources/debug-runner/benchmark-runner.js:
2214         (BenchmarkRunner.prototype._runTestAndRecordResults):
2215         * Animometer/resources/runner/tests.js:
2216         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js:
2217         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
2218         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
2219         * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
2220         * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
2221         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
2222         * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
2223         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
2224         * Animometer/tests/examples/resources/canvas-electrons.js:
2225         * Animometer/tests/examples/resources/canvas-stars.js:
2226         * Animometer/tests/misc/resources/compositing-transforms.js:
2227         * Animometer/tests/resources/main.js:
2228         * Animometer/tests/resources/stage.js:
2229         (StageBenchmark): Remove _recordTable.
2230         * Animometer/tests/simple/resources/simple-canvas-paths.js:
2231         * Animometer/tests/simple/resources/simple-canvas.js:
2232         * Animometer/tests/template/resources/template-canvas.js:
2233         * Animometer/tests/template/resources/template-css.js:
2234         * Animometer/tests/template/resources/template-svg.js:
2235         * Animometer/tests/text/resources/layering-text.js:
2236
2237         * Animometer/resources/debug-runner/animometer.js:
2238         (willStartFirstIteration): Fix selector, since results-table is used
2239         in multiple places, so it cannot be an id.
2240
2241         Make it possible to select the scores, or the whole table data,
2242         by cycling through different selections through key press of 's'.
2243
2244         * Animometer/resources/runner/animometer.js:
2245         (window.benchmarkController.showResults): Attach a keypress handler
2246         if it hasn't been added already.
2247         (window.benchmarkController.selectResults):
2248         * Animometer/resources/runner/tests.js: Cycle through different
2249         ranges.
2250
2251         Fix a few fly-by errors.
2252
2253         * Animometer/resources/debug-runner/benchmark-runner.js:
2254         (BenchmarkRunnerState.prototype.prepareCurrentTest): Update the frame relative path
2255         since the files are now in the top directory instead of inside runner/.
2256         (BenchmarkRunner.prototype._runTestAndRecordResults): Incorrect reference to function.
2257         (BenchmarkRunner.prototype.step): Member variable is never used.
2258
2259         A little stylistic cleanup.
2260
2261         * Animometer/resources/debug-runner/benchmark-runner.js:
2262         * Animometer/resources/extensions.js:
2263         (window.DocumentExtension.createElement):
2264         * Animometer/tests/resources/main.js:
2265         (Benchmark.prototype.record):
2266         * Animometer/tests/resources/stage.js:
2267         (StageBenchmark.prototype.showResults): Reverse progress and message.
2268         The message appears less frequently than the progress.
2269         * Animometer/tests/simple/resources/simple-canvas.js:
2270         (SimpleCanvasBenchmark): Remove unused options.
2271
2272         Add newer version of harness in a new page. Consolidate differences between the two
2273         pages.
2274
2275         * Animometer/developer.html: Include runner/animometer.js. Rename the JS function
2276         to run the benchmark to startBenchmark() instead of startTest(). Rename #running to
2277         #test-container.
2278         * Animometer/index.html: Added. Similarly calls startBenchmark() and has #test-container.
2279         * Animometer/resources/debug-runner/animometer.css: Make the canvas 2:1 (1200px x 800px)
2280         instead of 4:3.
2281
2282         Split out benchmarkRunnerClient and benchmarkController.
2283
2284         * Animometer/resources/debug-runner/animometer.js: Move needed functions out of
2285         benchmarkRunnerClient, and leave the rest here to extend that object. Get rid of _resultsTable
2286         and move populating the results table into benchmarkController. Rename _resultsDashboard
2287         to results and make it accessible for other objects to use.
2288         (willAddTestFrame): This is unnecessary. Remove.
2289
2290         (window.sectionsManager.showScore): Grab it from the results object instead of
2291         benchmarkRunnerClient.
2292         (window.sectionsManager.showSection): Deleted. Moved to runner/animometer.js.
2293
2294         (window.benchmarkController._runBenchmark): Deleted. Mostly moved into _startBenchmark.
2295         (window.benchmarkController.startBenchmark): Refactor to call _startBenchmark.
2296         (window.benchmarkController.showResults): Include most of benchmarkRunnerClient.didFinishLastIteration()
2297         here.
2298
2299         * Animometer/resources/debug-runner/benchmark-runner.js:
2300         (BenchmarkRunner.prototype._appendFrame): Remove unneeded call to willAddTestFrame.
2301         * Animometer/resources/extensions.js:
2302         (ResultsDashboard): Change the class to process the sampler data on-demand and hold onto that data
2303         for later referencing.
2304         (ResultsDashboard.prototype.toJSON): Deleted.
2305         (ResultsDashboard.prototype._processData): Rename toJSON to _processData since it's not really
2306         outputting JSON. Store the processed data into a member variable that can be referenced later.
2307         (ResultsDashboard.prototype.get data): Process the data if it hasn't already.
2308         (ResultsDashboard.prototype.get score): Process the data if it hasn't already, then return the
2309         aggregate score.
2310         (ResultsTable.prototype._showHeader): When outputting the results to a table, don't force the
2311         need for an empty children array. This was to allow for a header row in the table that spanned
2312         multiple columns. In the simpler harness, this is not needed.
2313         (ResultsTable.prototype._showEmptyCells):
2314         (ResultsTable.prototype._showTest): This hardcoded the columns. At least for the name and score,
2315         which is the bare minimum needed for the simpler harness, key off of the header name provided.
2316         * Animometer/resources/runner/animometer.css: Added. Use a similar 2:1 ratio. The score tables are
2317         split into the data and the headers, and are also displayed RTL so that a later patch allows a
2318         user to copy-paste the data easily.
2319         * Animometer/resources/runner/animometer.js: Added. Use a simpler version of benchmarkRunnerClient.
2320         The debug harness will extend these classes.
2321         (window.benchmarkController._startBenchmark): Used by both harnesses.
2322         (window.benchmarkController.startBenchmark): Set hard-coded options.
2323         (window.benchmarkController.showResults): Includes most of benchmarkRunnerClient.didFinishLastIteration()
2324         here.
2325
2326         Get rid of utilities.js. Move it all into extensions.js.
2327
2328         * Animometer/resources/extensions.js:
2329         * Animometer/tests/resources/utilities.js: Removed.
2330
2331         * Animometer/tests/bouncing-particles/bouncing-canvas-images.html: Remove script link.
2332         * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html: Ditto.
2333         * Animometer/tests/bouncing-particles/bouncing-css-images.html: Ditto.
2334         * Animometer/tests/bouncing-particles/bouncing-css-shapes.html: Ditto.
2335         * Animometer/tests/bouncing-particles/bouncing-svg-images.html: Ditto.
2336         * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html: Ditto.
2337         * Animometer/tests/examples/canvas-electrons.html: Ditto.
2338         * Animometer/tests/examples/canvas-stars.html: Ditto.
2339         * Animometer/tests/misc/compositing-transforms.html: Ditto.
2340         * Animometer/tests/simple/simple-canvas-paths.html: Ditto.
2341         * Animometer/tests/template/template-canvas.html: Ditto.
2342         * Animometer/tests/template/template-css.html: Ditto.
2343         * Animometer/tests/template/template-svg.html: Ditto.
2344         * Animometer/tests/text/layering-text.html: Ditto.
2345
2346         Split tests.js into two. Add a new suite to runner/tests.js.
2347
2348         * Animometer/developer.html: Update the script order. Scripts from
2349         debug-runner/ will always build on those from runner/, and have the
2350         same name.
2351         * Animometer/resources/debug-runner/tests.js: Move "complex examples"
2352         suite into "miscellaneous tests".
2353         (Suite): Deleted.
2354         (Suite.prototype.prepare): Deleted.
2355         (Suite.prototype.run): Deleted.
2356         (suiteFromName): Deleted.
2357         * Animometer/resources/runner/tests.js: Added. Take definitions and
2358         functions needed by the test harness. Leave the test suites behind.
2359         (Suite): Moved from debug script.
2360         (Suite.prototype.prepare): Ditto.
2361         (Suite.prototype.run): Ditto.
2362         (suiteFromName): Ditto.
2363         (testFromName): Ditto.
2364
2365         Move benchmark resources out into resources/debug-runner, and update URLs.
2366
2367         * Animometer/developer.html: Renamed from PerformanceTests/Animometer/runner/animometer.html.
2368         * Animometer/resources/debug-runner/animometer.css: Renamed from PerformanceTests/Animometer/runner/resources/animometer.css.
2369         * Animometer/resources/debug-runner/animometer.js: Renamed from PerformanceTests/Animometer/runner/resources/animometer.js.
2370         * Animometer/resources/debug-runner/benchmark-runner.js: Renamed from PerformanceTests/Animometer/runner/resources/benchmark-runner.js.
2371         * Animometer/resources/debug-runner/d3.min.js: Renamed from PerformanceTests/Animometer/runner/resources/d3.min.js.
2372         * Animometer/resources/debug-runner/graph.js: Renamed from PerformanceTests/Animometer/runner/resources/graph.js.
2373         * Animometer/resources/debug-runner/tests.js: Renamed from PerformanceTests/Animometer/runner/resources/tests.js.
2374
2375 2015-12-11  Jon Lee  <jonlee@apple.com>
2376
2377         Improve Animometer on iOS
2378         https://bugs.webkit.org/show_bug.cgi?id=152180
2379
2380         Reviewed by Simon Fraser.
2381
2382         Improve experience on phones. Make the canvas take
2383         up the whole screen.
2384
2385         * Animometer/runner/animometer.html: Add meta viewport.
2386         Remove the container div.
2387         * Animometer/runner/resources/animometer.css: Have buttons lay
2388         out vertically. Update detail arrow glyph. Make the suites and
2389         options section lay out vertically. Remove the top spacers since
2390         we want the canvas to take over the whole screen. Minimal display
2391         is recommended for use.
2392
2393 2015-12-07  Jon Lee  <jonlee@apple.com>
2394
2395         Update suites for benchmark
2396         https://bugs.webkit.org/show_bug.cgi?id=151957
2397
2398         Reviewed by Simon Fraser.
2399
2400         * Animometer/runner/animometer.html: Use spacers instead of relying on
2401         justify-content center to center the content. That allows the opening screen
2402         to grow downward when expanding the list of choices, otherwise it expands
2403         from the center, and off the top edge of the screen.
2404         * Animometer/runner/resources/animometer.css:
2405         (.tree): Don't overflow scroll.
2406         (.tree > li > label.tree-label:before): Use better glyphs.
2407         (.tree > li > :checked ~ label.tree-label:before):
2408         (main): Using flex-start for justify-content so that if the section grows too
2409         big it gets pinned to the top edge of the document instead of growing past it.
2410         (.spacer): Make the spacers have a minimum 20px and grow evenly.
2411         (section#home): Add a min-height so that the border will expand if the suite
2412         tests shown make the section grow past the height.
2413         * Animometer/runner/resources/animometer.js: Update the selectors.
2414         (window.suitesManager._treeElement):
2415         (window.suitesManager._suitesElements):
2416         (window.suitesManager._editsElements):
2417
2418 2015-12-07  Jon Lee  <jonlee@apple.com>
2419
2420         Update options for benchmark
2421         https://bugs.webkit.org/show_bug.cgi?id=151956
2422
2423         Reviewed by Simon Fraser.
2424
2425         Move "Fix test complexity" and "Adaptive" checkboxes into a radio group.
2426
2427         Move "Show running results" into a radio group, and add options to remove the HUD.
2428
2429         * Animometer/runner/animometer.html: Get rid of the preamble. Wrap the options
2430         in a form for easier referencing in JS.
2431         * Animometer/runner/resources/animometer.css: Show the surrounding border if the
2432         body's display-minimal class name is set.
2433         * Animometer/runner/resources/animometer.js:
2434
2435         Update the way optionsManager gets and sets default values. Include support for
2436         radio groups.
2437         (window.optionsManager.valueForOption):
2438         (window.optionsManager.updateUIFromLocalStorage):
2439         (window.optionsManager.updateLocalStorageFromUI):
2440
2441         (window.benchmarkRunnerClient.willStartFirstIteration):
2442         (window.sectionsManager.setupRunningSectionStyle):
2443         (window.suitesManager._treeElement): Fly-by whitespace fix.
2444         (window.suitesManager._suitesElements): Ditto.
2445         (window.suitesManager.updateEditsElementsState): Update options check.
2446         (window.suitesManager.updateDisplay): Add a new update function for the HUD.
2447         Attach a class to the body depending on the user's choice.
2448         (window.benchmarkController.initialize): Add an event listener when the form
2449         radio buttons update.
2450         (window.benchmarkController.onFormChanged):
2451         (window.optionsManager._optionsElements): Deleted.
2452         (window.optionsManager._adaptiveTestElement): Deleted.
2453         (window.benchmarkController.onChangeAdaptiveTestCheckbox): Deleted.
2454         * Animometer/tests/resources/main.js:
2455         (Benchmark.prototype.update): Update options checks.
2456         * Animometer/tests/resources/stage.js: Update option check.
2457         (StageBenchmark.prototype.showResults):
2458
2459 2015-12-01  Simon Fraser  <simon.fraser@apple.com>
2460
2461         Add a basic compositing Animometer test
2462         https://bugs.webkit.org/show_bug.cgi?id=151724
2463
2464         Reviewed by Dean Jackson.
2465
2466         Add a "bouncing particles" test that moves composited layers around, optionally with a filter.
2467
2468         This is added under a new "Miscellaneous" category.
2469
2470         Remove the test templates category from the UI.
2471
2472         * Animometer/runner/resources/tests.js:
2473         * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
2474         (BouncingCssShape.prototype.animate):
2475         * Animometer/tests/misc/compositing-transforms.html: Added.
2476         * Animometer/tests/misc/resources/compositing-transforms.js: Added.
2477         (BouncingCompositedImage):
2478         (BouncingCompositedImage.prototype._move):
2479         (BouncingCompositedImage.prototype.animate):
2480         (CompositingTransformsStage):
2481         (CompositingTransformsStage.prototype.createParticle):
2482         (CompositingTransformsStage.prototype.particleWillBeRemoved):
2483         (CompositedTransformsBenchmark):
2484         (CompositedTransformsBenchmark.prototype.createStage):
2485         (window.benchmarkClient.create):
2486
2487 2015-11-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
2488
2489         Fix the graphics benchmark complexity bounds adjustment
2490         https://bugs.webkit.org/show_bug.cgi?id=151670
2491
2492         Reviewed by Simon Fraser.
2493
2494         Make sure the graphics benchmark complexity bounds adjustment is applied
2495         to the absolute lower bound.
2496
2497         * Animometer/tests/resources/math.js:
2498         (PIDController.prototype._saturate):
2499
2500 2015-11-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
2501
2502         Add an option to select the results form the graphics benchmark
2503         https://bugs.webkit.org/show_bug.cgi?id=151666
2504
2505         Reviewed by Ryosuke Niwa.
2506
2507         We need an easy way to select the graphics benchmark results table such
2508         that when it is copied to the clipboard, rich text format is set to the
2509         clipboard.
2510
2511         * Animometer/runner/animometer.html: Add a new button to select the results table or JSON.
2512
2513         * Animometer/runner/resources/animometer.js:
2514         (window.sectionsManager._sectionDataElement): Selects the container <data> element.
2515         (window.sectionsManager._sectionDataDivElement): Replace a literal string with a string table entry.
2516         (window.sectionsManager.showTestName): Replace a literal string with a string table entry.
2517         (window.sectionsManager.selectData): Selects the container <data> element in a selection.
2518         (window.sectionsManager.selectDataContents): Select the contents of container <data> element in a selection.
2519         (window.benchmarkController.selectResults): Selects the results table.
2520         (window.benchmarkController.showJSON): Function rename.
2521         (window.benchmarkController.selectJSON): Selects the contents of the results JSON.
2522         (window.benchmarkController.showJson): Deleted.
2523
2524 2015-11-20  Simon Fraser  <simon.fraser@apple.com>
2525
2526         Animometer: graphs should not do interpolation
2527         https://bugs.webkit.org/show_bug.cgi?id=151526
2528
2529         Reviewed by Simon Fraser.
2530
2531         Having the graphs do interpolation is misleading, because you can't see the actual data.
2532
2533         Also remove "shape-rendering: crispEdges;" so the lines get antialiased.
2534
2535         * Animometer/runner/resources/animometer.css:
2536         (section#test-graph > data > svg): Deleted.
2537         * Animometer/runner/resources/graph.js:
2538         (graph): Deleted.
2539
2540 2015-11-19  Said Abou-Hallawa  <sabouhallawa@apple.com>
2541
2542         Calculate the graphics benchmark test gain adaptively
2543         https://bugs.webkit.org/show_bug.cgi?id=151208
2544
2545         Reviewed by Darin Adler.
2546
2547         We need to calculate the gain of the graphics benchmark tests adaptively
2548         and get rid of the gain and limits parameters we have to choose manually
2549         for every test. We are going to use the classic Ziegler–Nichols method for
2550         calculating the gain and integral and derivative times. We are going to
2551         try moving on a cubic curve during the manual stage from y0 to reach ysp.
2552         We also going to use a saturation actuator to ensure the system does not
2553         fluctuate.
2554
2555         * Animometer/resources/extensions.js:
2556         (ResultsTable.prototype._isNoisyMeasurement): Fix a parameter name.
2557         (ResultsTable.prototype._isNoisyTest): Since score is a member of testResults, we need to limit our search to frame rate and complexity.
2558         (ResultsTable.prototype._showTest): Pass the correct parameter to _isNoisyMeasurement().
2559
2560         * Animometer/resources/strings.js: Fix the indentation and name and value of a string.
2561
2562         * Animometer/runner/resources/tests.js: Remove all the manual gains and limits parameters which had to be passed to every test.
2563
2564         * Animometer/tests/resources/main.js:
2565         (BenchmarkState.prototype.currentStage): Fix an enum name.
2566         (Benchmark): Get rid of manual gain and limits.
2567         (Benchmark.prototype.update): Simplify the calculation by having all the times in ms.
2568
2569         * Animometer/tests/resources/math.js:
2570         (PIDController): Get rid of the manual gain and limits and the magic numbers for Ti and Td.
2571         (PIDController.prototype._yPosition): Tells whether the test current output is moving towards the set-point or away from it.
2572         (PIDController.prototype._distanceUltimate): Calculates the ultimate distance from y0 after time t using a cubic formula.
2573         (PIDController.prototype._distance): Calculates the distance of y relative to y0.
2574         (PIDController.prototype._gainIncrement): Decides how much the proportional gain should be increased during the manual gain stage.
2575         (PIDController.prototype._updateStage): Updates the stage of the controller based on its current stage and the system output.
2576         (PIDController.prototype._tuneP): Tunes the system before calculating the PID controller gains.
2577         (PIDController.prototype._tunePID): PID tuning function.
2578         (PIDController.prototype._tune):
2579         (PIDController.prototype._saturate):
2580         (PIDController.prototype.tune): Manages calculating the controller parameters. It then returns a PID tuning value.
2581         (PIDController.prototype._sat): Deleted. We may need to return it back but the limits have to be calculated adaptively not manually.
2582
2583 2015-11-17  Said Abou-Hallawa  <sabouhallawa@apple.com>
2584
2585         Reorganize the graphics benchmark string table
2586         https://bugs.webkit.org/show_bug.cgi?id=151334
2587
2588         Reviewed by Simon Fraser.
2589
2590         Make the graphics benchmark string table be an object of sub-objects. Each
2591         sub-object represents an associative array, the key is the string name and
2592         the value is the string data.
2593
2594         * Animometer/resources/extensions.js:
2595         (ResultsDashboard.prototype.toJSON):
2596         (ResultsTable.prototype._showGraph):
2597         (ResultsTable.prototype._showJSON):
2598         (ResultsTable.prototype._isNoisyMeasurement):
2599         (ResultsTable.prototype._isNoisyTest):
2600         (ResultsTable.prototype._showTest):
2601         (ResultsTable.prototype._showSuite):
2602         (ResultsTable.prototype._showIteration):
2603         * Animometer/resources/sampler.js:
2604         (Sampler.prototype.toJSON):
2605         * Animometer/resources/strings.js:
2606         * Animometer/runner/resources/animometer.js:
2607         (window.benchmarkRunnerClient.didFinishLastIteration):
2608         (window.suitesManager.updateLocalStorageFromJSON):
2609         (window.benchmarkController.showResults):
2610         (window.benchmarkController.showJson):
2611         (window.benchmarkController.showTestGraph):
2612         (window.benchmarkController.showTestJSON):
2613         * Animometer/runner/resources/tests.js:
2614         * Animometer/tests/resources/main.js:
2615
2616 2015-11-17  Said Abou-Hallawa  <sabouhallawa@apple.com>
2617
2618         Disable flattening the stage iframe of the graphics benchmark when running on iOS
2619         https://bugs.webkit.org/show_bug.cgi?id=151361
2620
2621         Reviewed by Simon Fraser.
2622
2623         Use fixed size for stage iframe of the graphics benchmark to disable
2624         flattening the iframe while animating the particles. Also ensure the
2625         bouncing particles do not go outside the iframe's boundaries.
2626
2627         * Animometer/runner/resources/animometer.css:
2628         (section#running > #running-test > iframe):
2629         (@media screen and (min-device-width: 1800px)):
2630         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
2631         (BouncingParticle.prototype.animate):
2632
2633 2015-11-17  Said Abou-Hallawa  <sabouhallawa@apple.com>
2634
2635         Use the media queries to dynamically set the stage for the graphics benchmark
2636         https://bugs.webkit.org/show_bug.cgi?id=151327
2637
2638         Reviewed by Simon Fraser.
2639
2640         Clean setting the benchmark css rules by using the media queries. Accessing
2641         document.stylesheets.cssRules seems to be unreliable. Fix the test harness
2642         load event listener invocation. And also remove the options for normalizing
2643         the stage resolution for retina display.
2644
2645         * Animometer/resources/extensions.js:
2646         (window.DocumentExtension.insertCssRuleAfter): Deleted.
2647         * Animometer/runner/animometer.html:
2648         * Animometer/runner/resources/animometer.css:
2649         (@media screen and (min-device-width: 1800px)):
2650         * Animometer/runner/resources/animometer.js:
2651         (window.sectionsManager.setupRunningSectionStyle):
2652         (window.benchmarkController.initialize):
2653         (window.sectionsManager.setupSectionStyle): Deleted.
2654         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
2655         (BouncingParticlesStage):
2656         * Animometer/tests/text/layering-text.html:
2657         * Animometer/tests/text/resources/layering-text.js:
2658         (LayeringTextStage):
2659         (LayeringTextStage.prototype._setFontSize): Deleted.
2660
2661 2015-11-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
2662
2663         Remove the option for animating using setInterval from the graphics benchmark
2664         https://bugs.webkit.org/show_bug.cgi?id=151283
2665
2666         Reviewed by Darin Adler.
2667
2668         Get rid of the option to run animation using setInterval().
2669
2670         * Animometer/tests/resources/main.js:
2671         (Animator.prototype.animate):
2672         (Benchmark):
2673         (Benchmark.prototype.start):
2674         (Animator.prototype.start): Deleted.
2675
2676 2015-11-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
2677
2678         Highlight the alarming test results in the graphics benchmark results page
2679         https://bugs.webkit.org/show_bug.cgi?id=151286
2680
2681         Reviewed by Simon Fraser.
2682
2683         When showing the results of a test in the graphics benchmark the following
2684         criteria is going to be applied:
2685
2686         1. If the standard deviation of the test complexity or the frame rate is
2687            equal to or more than 10%, the standard deviation and the test name
2688            will be displayed in red.
2689         2. If the average frame rate is not in the range = [(desired_frame_rate - 2)
2690            .. (desired_frame_rate + 2)], the average frame rate and the test name will
2691            be displayed in red.
2692
2693         * Animometer/resources/extensions.js:
2694         (ResultsTable.prototype._showHeaderRow):
2695         (ResultsTable.prototype._showHeader):
2696         (ResultsTable.prototype._showEmptyCell):
2697         (ResultsTable.prototype._showText):
2698         (ResultsTable.prototype._showFixedNumber):
2699         (ResultsTable.prototype.):
2700         (ResultsTable.prototype._showGraph):
2701         (ResultsTable.prototype._showJSON):
2702         (ResultsTable.prototype._isAlarmingMeasurement):
2703         (ResultsTable.prototype._isAlarmingTestResults):
2704         (ResultsTable.prototype._showEmptyCells):
2705         (ResultsTable.prototype._showEmptyRow):
2706         (ResultsTable.prototype._showTest):
2707         (ResultsTable.prototype._showSuite):
2708         (ResultsTable.prototype._showIteration):
2709         (ResultsTable.prototype.showRecord):
2710         (ResultsTable.prototype.showIterations):
2711         (ResultsTable.prototype._showEmpty): Deleted.
2712         * Animometer/runner/resources/animometer.js:
2713         (window.benchmarkRunnerClient.didFinishLastIteration):
2714         * Animometer/tests/resources/stage.js:
2715         (StageBenchmark.prototype.showResults):
2716
2717 2015-11-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
2718
2719         Clean referencing the options object in the graphics benchmark
2720         https://bugs.webkit.org/show_bug.cgi?id=151284
2721
2722         Reviewed by Simon Fraser.
2723
2724         Get rid of the Benchmark.options member and rely only on the private member
2725         Benchmark._options. The animator need to have its own options member instead
2726         of accessing it from its reference to Benchmark object.
2727
2728         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
2729         (BouncingCanvasParticlesAnimator):
2730         (BouncingCanvasParticlesBenchmark.prototype.createAnimator):
2731         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
2732         (BouncingParticle.prototype.animate):
2733         (BouncingParticlesAnimator):
2734         (BouncingParticlesBenchmark.prototype.createAnimator):
2735         * Animometer/tests/examples/resources/canvas-electrons.js:
2736         (CanvasElectronsStage.prototype.animate):
2737         (CanvasElectronsAnimator):
2738         (CanvasElectronsBenchmark.prototype.createAnimator):
2739         (window.benchmarkClient.create):
2740         * Animometer/tests/examples/resources/canvas-stars.js:
2741         (CanvasStarsStage.prototype.animate):
2742         (CanvasStarsAnimator):
2743         (CanvasStarsBenchmark.prototype.createAnimator):
2744         (window.benchmarkClient.create):
2745         * Animometer/tests/resources/main.js:
2746         (BenchmarkState.prototype.currentProgress):
2747         (Animator):
2748         (Animator.prototype.animate):
2749         (Benchmark):
2750         (Benchmark.prototype.update):
2751         * Animometer/tests/resources/stage.js:
2752         (Stage.prototype.clear):
2753         (StageAnimator):
2754         (StageBenchmark.prototype.createAnimator):
2755         (StageBenchmark.prototype.tune):
2756         (StageBenchmark.prototype.showResults):
2757         * Animometer/tests/simple/resources/simple-canvas.js:
2758         (SimpleCanvasStage.prototype.animate):
2759         (SimpleCanvasAnimator):
2760         (SimpleCanvasAnimator.prototype.animate):
2761         (SimpleCanvasBenchmark.prototype.createAnimator):
2762         * Animometer/tests/template/resources/template-canvas.js:
2763         (TemplateCanvasStage.prototype.animate):
2764         (TemplateCanvasBenchmark.prototype.createAnimator):
2765         (window.benchmarkClient.create):
2766
2767 2015-11-13  Said Abou-Hallawa  <sabouhallawa@apple.com>
2768
2769         Eliminate a request for layout every time an item is added to the stage of the graphics benchmark
2770         https://bugs.webkit.org/show_bug.cgi?id=151289
2771
2772         Reviewed by Simon Fraser.
2773
2774         Cache the stage size when it is created instead of requesting every time
2775         an object is added via clientWidth and clientHeight.
2776
2777         * Animometer/resources/extensions.js:
2778         (Insets.elementPadding):
2779         * Animometer/tests/resources/stage.js:
2780         (Stage):
2781         (Stage.prototype.get size):
2782
2783 2015-11-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
2784
2785         Initialize the graphics benchmark's Kalman filter with estimated 60 FPS
2786         https://bugs.webkit.org/show_bug.cgi?id=150965
2787
2788         Reviewed by Darin Adler.
2789
2790         This should give the benchmark more accurate reading at warmup time. And
2791         hence we can safely reduce the test running time to be 10 seconds.
2792
2793         * Animometer/runner/animometer.html:
2794         Add "defer" back when loading resources/animometer.js since this script
2795         depends on many other scripts and we need to wait till the page is parsed.
2796         Also change the default test interval to be 10 seconds.
2797
2798         * Animometer/runner/resources/graph.js:
2799         (graph): Make the test results curves smoother.
2800
2801         * Animometer/tests/resources/main.js:
2802         (Animator): Initialize the Kalman filter with 60 FPS which should be true
2803         if the test page is empty.
2804
2805         (Animator.prototype.animate):
2806         * Animometer/tests/resources/math.js:
2807         (KalmanEstimator): Fix the initial value of _vecX_est.
2808             _vecX_est[0] = current FPS (= 60FPS when the test page is empty)
2809             _vecX_est[1] = first time derivative of FPS (=0; FPS has been constant).
2810             _vecX_est[2] = second time derivative of FPS (=0; since _vecX_est[1]=0).
2811         (KalmanEstimator.prototype.estimate): Add some comments.
2812
2813 2015-11-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
2814
2815         Remove "defer" from the scripts' references in the graphics benchmark home page
2816         https://bugs.webkit.org/show_bug.cgi?id=150915
2817
2818         Reviewed by Simon Fraser.
2819
2820         It causes the benchmark to be very flakey.
2821
2822         * Animometer/runner/animometer.html:
2823
2824 2015-11-01  Said Abou-Hallawa  <sabouhallawa@apple,com>
2825
2826         Add an option to make the graphics benchmark runs a specific test with fixed complexity
2827         https://bugs.webkit.org/show_bug.cgi?id=150529
2828
2829         Reviewed by Darin Adler.
2830
2831         Beside each test in the suites tree, we are going to show the complexity
2832         arithmetic mean of the of the last run in an edit control. Based on a
2833         new option these edit controls will all be visible or hidden. If they are
2834         visible their values can be changed. The benchmark runner if it run in
2835         the non-adaptive mode will set the complexity of the test to the passed
2836         value and will not change it ever. The animator will animate the test and
2837         frame rate will also be measured.
2838
2839         * Animometer/runner/animometer.html: Add a new option for the non-adaptive mode.
2840
2841         * Animometer/runner/resources/animometer.css:
2842         (section#home input[type="number"]): Define the width of all the edit control in the <home> section.
2843         (section#home > suites input[type="number"]): The edit controls in the <suites> box will be right aligned and hidden by default.
2844         (section#home > suites input[type="number"].selected): When the class "selected" is added, the edit controls will be visible.
2845         (section#home > options > label > input[type="number"]): Deleted.
2846
2847         * Animometer/runner/resources/animometer.js:
2848         (window.benchmarkRunnerClient.didFinishLastIteration): Update the local storage with the results of each test.
2849         (window.optionsManager._adaptiveTestElement): Returns the checkbox for setting the adaptive test option.
2850         (window.suitesManager._editElement):  Returns the edit element associated with each test element in the suites tree.
2851         (window.suitesManager._editsElements): Returns a list of all the elements in the <suites> box.
2852         (window.suitesManager._localStorageNameForTest): Change this function to take strings.
2853         (window.suitesManager._createTestElement): Adds an edit control beside each test.
2854         (window.suitesManager.updateEditsElementsState): Adds/Removes the 'selected' class to/from all the tests edit elements.
2855         (window.suitesManager.updateUIFromLocalStorage): Reads the edit control value from the local storage.
2856         (window.suitesManager.updateLocalStorageFromUI): Saves the edit control value to the local storage.
2857         (window.suitesManager.updateLocalStorageFromJSON): Saves the last run results to the local storage.
2858         (window.benchmarkController.initialize): Shows/Hides the test edit controls based on the adaptive test option.
2859         (window.benchmarkController.onChangeAdaptiveTestCheckbox): An onchange event handler for the adaptive test checkbox.
2860
2861         * Animometer/tests/resources/main.js:
2862         (Benchmark.prototype.update): Fix the complexity of the test if the running mode is non-adaptive test and desired complexity is not zero.
2863         (window.runBenchmark): Add the test complexity as a new benchmark option.
2864
2865 2015-11-01  Said Abou-Hallawa  <sabouhallawa@apple,com>
2866
2867         Make the size of the benchmark canvas adaptive to the screen size and screen resolution
2868         https://bugs.webkit.org/show_bug.cgi?id=150530
2869
2870         Reviewed by Darin Adler.
2871
2872         We want to set the size of the benchmark stage dynamically such that it
2873         depends on the screen resolution and the device scale factor. This patch
2874         does more than that because the home page css was not done properly. To
2875         use the flex box layout, the animometer.css has to be rewritten almost from
2876         scratch. The suites tree has to be rewritten also because it was not collapsing
2877         and with the flex box layout it was going outside of the window area. The
2878         options handling and the local storage handling had to be rewritten to
2879         allow more flexibility with this patch and the future patches. The code
2880         in animometer.js was reorganized into objects to allow distributing the code
2881         nicely among separate entities.
2882
2883         * Animometer/resources/extensions.js:
2884         (Point.elementClientSize): Returns the client size of an HTMLElement as a Point object.
2885         (Insets.prototype.get width): Follow the function opening brace style guidelines.
2886         (Insets.prototype.get height):
2887         (Insets.prototype.get size): Returns the size of an Insets as a Point object.
2888
2889         (window.DocumentExtension): Provides document helper functions. It should be assailable from the runner and the tests.
2890         (window.DocumentExtension.createElement): Creates an HTMLElement given its name, attributes and parentElement.
2891         (window.DocumentExtension.createSvgElement): Creates an SVGElement given its name, attributes and parentElement (moved from utilities.js).
2892         (window.DocumentExtension.insertCssRuleAfter): Inserts a CSS rule after an exiting rule given its text.
2893
2894         (ResultsTable.prototype._showHeader): Use DocumentExtension functions.
2895         (ResultsTable.prototype._showGraph): Use DocumentExtension functions and create a real button for "Graph..." option.
2896         (ResultsTable.prototype._showJSON): Use DocumentExtension functions and create a real button for "JSON..." option.
2897         (Options): Deleted.
2898
2899         * Animometer/runner/animometer.html: Restructure the page to use the flex box layout.
2900
2901         * Animometer/runner/resources/animometer.css:
2902         (html,body):
2903         (button):
2904
2905         (button.large-button):The large button appears in the animometer.html.
2906         (button.large-button:active):
2907         (button.large-button:disabled):
2908
2909         (button.small-button): The small button appears in the results table.
2910         (button.small-button:active):
2911
2912         (.tree): The tree class is used to list the suites and their tests.
2913         (.tree .expand-button): This button expands a tree element.
2914         (.tree .expand-button ~ ul): Hide the children (<ul>...</ul>) of a parent node by default.
2915         (.tree .expand-button:checked ~ ul): Show the children of a parent node only when checked.
2916         (.tree ul): Hide the list bullets.
2917         (.tree li): Indent every node in the tree relative to its parent.
2918         (.tree ul li): Indent all the non top level nodes only (the tests nodes in our case).
2919         (.tree > li:last-child): Do not indent the bottom of the last child node.
2920         (.tree-label): Style for all the labels in the tree.
2921         (label.tree-label): Style for the labels in the top level only (the suites nodes in our case).
2922         (label.tree-label:before): Style the unchecked case of the expand-button.
2923         (:checked ~ label.tree-label:before): Style the checked case of the expand-button.
2924
2925         (table.results-table): The results table appears while running the test and at the end.
2926         (.results-table td):
2927         (.results-table th):
2928
2929         (div.results-json): The JSON div appears per test or for the whole run.
2930
2931         (main): This is the flex box container.
2932
2933         (section): A section is displayed exclusively inside the <main>. It is hidden by default.
2934         (section.selected): When it is selected, its layout is flex layout.
2935         (section > footer): The header or the footer of a section should not take more than 15% of the container.
2936
2937         (section#home): The home section has <suites> and <options> parts to be laid out in the middle.
2938         (section#home > options):
2939         (section#home > suites): The <suites> should not take more than 40% of the width.
2940         (section#home > options > label): The benchmark title.
2941         (section#home > header > h2): The benchmark title.
2942         (section#home > options > label > input[type="number"]): Sets the width of the option edit control.
2943
2944         (section#running): The running section contain the runner <iframe> which takes the whole area of the <main>.
2945         (section#running > #running-test): This is the <iframe> container.
2946         (section#running > #running-test > iframe): The <iframe> is created by the runner for each test.
2947         (section#running > #progress): This is the progress bar.
2948         (section#running > #progress > #progress-completed): This is another element which grows while the runner is progressing.
2949         (section#running > #record): This the container of the record results table which is shown while running a test.
2950
2951         (section#results):
2952         (section#json):
2953         (section#test-json):
2954         (section#test-graph): All these sections have the same layout. A <data> element is laid out between <header> and <footer>.
2955
2956         (section#results > data):
2957         (section#json > data):
2958         (section#test-json > data):
2959         (section#test-graph > data): The <data> element should take 70% of the <section>.
2960
2961         (section#test-graph > data > svg):
2962         (.axis line):
2963         (.left-samples): These styles are for the d3 graph.
2964
2965         (section#test-json > data): This is the style of the JSON <data> element.
2966
2967         (iframe): Deleted.
2968         (label, p): Deleted.
2969         (section > p): Deleted.
2970         (section#home > p): Deleted.
2971         (section#home > p:first-child): Deleted.
2972         (#testContainer): Deleted.
2973         (section#running #progress-completed): Deleted.
2974         (section#results > table): Deleted.
2975         (section#results > table td, th): Deleted.
2976         (section#results > table tr.alt, td): Deleted.
2977         (section#results > table th): Deleted.
2978         (section#json > textarea): Deleted.
2979         (.options): Deleted.
2980         (.options p): Deleted.
2981         (#suites ul): Deleted.
2982         (#suites ul ul): Deleted.
2983         (#suites ul ul input, #suites ul ul label): Deleted.
2984         (#suites.showTests ul ul): Deleted.
2985         (.column): Deleted.
2986         (input[type="number"]): Deleted.
2987         (.buttons): Deleted.
2988         (.small-button): Deleted.
2989         (#graphContainer): Deleted.
2990         (.right-samples): Deleted.
2991         (.sample-time): Deleted.
2992         (.left-mean): Deleted.
2993         (.right-mean): Deleted.
2994
2995         * Animometer/runner/resources/animometer.js:
2996         (window.benchmarkRunnerClient.initialize): Initialize the client object with the options and the suites.
2997         (window.benchmarkRunnerClient.willStartFirstIteration): Use new css selectors for results and the record table.
2998         (window.benchmarkRunnerClient.didFinishLastIteration): Move the code which sets the JSON text to sectionsManager.showJSON().
2999
3000         (window.sectionsManager): Responsible of managing the <section>s elements inside animometer.html.
3001         (window.sectionsManager._sectionHeaderH1Element): Return the <h1> inside the <header> of a given section.
3002         (window.sectionsManager._sectionDataDivElement): Return the <div> inside the <data> of a given section.
3003         (window.sectionsManager.showScore): Show the score of the last benchmark run.
3004         (window.sectionsManager.showTestName): Show the test name for detailed results <section>.
3005         (window.sectionsManager.showJSON): Shows the JSON text of the last benchmark or for a specific test.
3006         (window.sectionsManager.showSection): Shows a specific <section> in the <main> container.
3007         (window.sectionsManager.setupSectionStyle): Sets css attributes for all the <section>s.
3008         (window.sectionsManager.setupRunningSectionStyle): Sets the css attributes for the running <section> only.
3009
3010         (window.optionsManager): Responsible of managing the user options and streaming them to/form the localStorage.
3011         (window.optionsManager._optionsElements): Returns the children <input> elements of the <options>.
3012         (window.optionsManager.updateUIFromLocalStorage): Restore the values of the <options> UI elements from the local storage.
3013         (window.optionsManager.updateLocalStorageFromUI): Saves the values of the <options> UI elements to the local storage.
3014
3015         (window.suitesManager): Responsible of managing the user suites and streaming them to/form the localStorage.
3016         (window.suitesManager._treeElement): Returns the suites tree container element.
3017         (window.suitesManager._suitesElements): Returns a list of the suites elements.
3018         (window.suitesManager._checkboxElement): Returns the checkbox element of a given suite.
3019         (window.suitesManager._localStorageNameForTest): Generates a string for the tuple <suite, test> to be saved in the localStorage.
3020         (window.suitesManager._updateSuiteCheckboxState): Updates the state of a suite checkbox from the state of its tests' checkboxes.
3021         (window.suitesManager._updateStartButtonState): Updates the state of the start button from the state of the suites' checkboxes.
3022         (window.suitesManager._onChangeSuiteCheckbox): Called when a suite checkbox is clicked.
3023         (window.suitesManager._onChangeTestCheckbox): Called when a test checkbox is clicked.
3024         (window.suitesManager._createSuiteElement): Creates suite node in the suites tree.
3025         (window.suitesManager._createTestElement): Creates test node in the suites tree.
3026         (window.suitesManager.createElements): Creates the suites tree dynamically from the array Suites.
3027         (window.suitesManager.updateUIFromLocalStorage): Restore the values of the <suites> UI elements from the local storage.
3028         (window.suitesManager.updateLocalStorageFromUI): aves the values of the <suites> UI elements to the local storage.
3029
3030         (window.benchmarkController): This is the UI controller of the animometer.html page.
3031         (window.benchmarkController.initialize): Called when the animometer.html page is loaded.
3032         (window.benchmarkController._runBenchmark): Starts a benchmark run.
3033         (window.benchmarkController.startTest): Called when the "Start Test" button is clicked.
3034         (window.benchmarkController.showResults): Called at the end of the test to show the final results.
3035         (window.benchmarkController.showJson): Called from the results page to show the JSON of the last benchmark run.
3036         (window.benchmarkController.showTestGraph): Called from the results the table to show a graph for the samples of a specific test.
3037         (window.benchmarkController.showTestJSON): Called from the results the table to show a JSON for the samples of a specific test.
3038
3039         (showSection): Deleted.
3040         (startTest): Deleted.
3041         (showResults): Deleted.
3042         (showJson): Deleted.
3043         (showTestGraph): Deleted.
3044         (showTestJSON): Deleted.
3045         (initialize.toggleTestsCheckbox.onchange): Deleted.
3046         (initialize): Deleted.
3047         (updateSuiteSelection): Deleted.
3048         (updateTestSelection): Deleted.
3049         (updateSuiteCheckbox): Deleted.
3050         (localStorageNameForTest): Deleted.
3051         (populateSettings.): Deleted.
3052         (populateSettings): Deleted.
3053
3054         * Animometer/runner/resources/benchmark-runner.js:
3055         (BenchmarkRunner): Pass the frameContainer element to the BenchmarkRunner.
3056         (BenchmarkRunner.prototype._appendFrame): Remove unused parameter unwanted styling code.
3057         (BenchmarkRunner.prototype.runMultipleIterations):  Use the this._client.iterationCount instead of passing it as a parameter also.
3058
3059         * Animometer/runner/resources/graph.js:
3060         (graph): Calculate the size of the chart from the container element.
3061
3062         * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
3063         (BouncingSvgImage):
3064         * Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js:
3065         (BouncingSvgParticlesStage.prototype._createDefs):
3066         (BouncingSvgParticlesStage.prototype._createClipStar):
3067         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
3068         (BouncingSvgShape.prototype._createShape):
3069         (BouncingSvgShapesStage.prototype.createGradient):
3070         Call DocumentExtension.createSvgElement() instead of calling Utilities.createSvgElement().
3071
3072         * Animometer/tests/resources/main.js:
3073         (Animator.prototype.animate):
3074         (Benchmark):
3075         (Benchmark.prototype.update):
3076         * Animometer/tests/resources/stage.js:
3077         (StageBenchmark.prototype.showResults):
3078         Rename the options to match the <input> ids in animometer.html.
3079
3080         * Animometer/tests/resources/utilities.js:
3081         (window.Utilities.createSvgElement): Deleted.
3082
3083         * Animometer/tests/text/layering-text.html:
3084         * Animometer/tests/text/resources/layering-text.js:
3085         (LayeringTextStage):
3086         (LayeringTextStage.prototype._setFontSize): Sets the size of the text dynamically such that they all fit in one stage.
3087
3088 2015-10-29  Simon Fraser  <simon.fraser@apple.com>
3089
3090         Animometer computes frame rate incorrectly
3091         https://bugs.webkit.org/show_bug.cgi?id=150698
3092
3093         Reviewed by Tim Horton.
3094
3095         The existing code incremented this._frameCount after checking against this._dropFrameCount.
3096         This has the effect of setting this._measureTimeOffset one frame too late, so
3097         we were measuring only two frames, not three, and thus computing an incorrect fps.
3098
3099         * Animometer/tests/resources/main.js:
3100         (Animator.prototype.animate):
3101
3102 2015-10-27  Jon Lee  <jonlee@apple.com>
3103
3104         Add an option to make the graphics benchmark runs a specific test
3105         https://bugs.webkit.org/show_bug.cgi?id=150528
3106         rdar://problem/23246614
3107
3108         Reviewed by Zalan Bujtas.
3109
3110         Add a checkbox that lets the user list all of the available tests, and select
3111         the ones to run repeatedly. The test checkboxes will update the state of the suite
3112         checkbox. The selected tests are stored in localStorage to make it easy to do
3113         repeated runs.
3114
3115         * Animometer/runner/animometer.html: Add a checkbox to show individual tests.
3116         Update other markup.
3117         * Animometer/runner/resources/animometer.css: Make the settings area a little wider
3118         to accommodate the longer names of the tests
3119         * Animometer/runner/resources/animometer.js:
3120         (startBenchmark): Change the way that the suites are fed into the benchmark
3121         runner. Go through each of the suites and their tests, and create a new Suite
3122         with just the enabled tests. While enumerating store the enabled tests into
3123         localStorage.
3124         (initialize): Initialization routine (taking over populateSettings). When the
3125         checkbox for showing tests is toggled, add or remove a class on #suites to show
3126         the individual tests.
3127         (updateSuiteSelection): Called whenever the user toggles the checkbox for a suite.
3128         Either select all or none of the tests.
3129         (updateTestSelection): Called whenever the user toggles the checkbox for a test.
3130         (updateSuiteCheckbox): Update the state of the test's suite's checkbox to
3131         indeterminate if there is at least one enabled test, unchecked if none are selected,
3132         and checked if all are selected.
3133         (localStorageNameForTest): Helper function to get the name of the test to use as
3134         a key to localStorage.
3135         (populateSettings): Add the tests for each suite into an inner list.
3136
3137 2015-10-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
3138
3139         Add an option to output the results of the graphics benchmark in JSON format
3140         https://bugs.webkit.org/show_bug.cgi?id=150484
3141         <rdar://problem/23243721>
3142
3143         Reviewed by Darin Adler.
3144
3145         * Animometer/resources/extensions.js:
3146         (ResultsDashboard): A new class to hold the iterations results.
3147         (ResultsDashboard.prototype.push): Appends an iteration results;
3148         (ResultsDashboard.prototype.toJSON): Converts the iterations results to JSON format.
3149
3150         (RecordTable.prototype.clear): Clears the results table.
3151         (RecordTable.prototype._showTitles): Shows the header titles and appends the sub-titles to a queue.
3152         (RecordTable.prototype._showHeader): Shows the table header titles.
3153         (RecordTable.prototype._showEmpty): Shows an empty table cell.
3154         (RecordTable.prototype._showValue): Shows a number value in the results table.
3155         (RecordTable.prototype._showSamples): Shows a button for the sampled data graph.
3156         (RecordTable.prototype._showTest): Shows the results of a single test.
3157         (RecordTable.prototype._showSuite): Shows the results of a single suite.
3158         (RecordTable.prototype.showRecord): Shows a single iteration for a single test.
3159         (RecordTable.prototype.showIterations): Shows the results of all the suites of the iterations.
3160
3161         (ResultsTable): RecordTable was renamed to ResultsTable.
3162         (ResultsTable.prototype.clear): Clears the table element.
3163         (ResultsTable.prototype._showHeaderRow): Shows a row in the results table header.
3164         (ResultsTable.prototype._showHeader): Shows the results table header.
3165         (ResultsTable.prototype._showEmpty): Shows an empty table cell.
3166         (ResultsTable.prototype._showText): Shows a string in a new table cell.
3167         (ResultsTable.prototype._showFixedNumber): Shows a number in a new table cell.
3168         (ResultsTable.prototype._showGraph): Shows a button for the sampled data graph.
3169         (ResultsTable.prototype._showJSON): Shows a button for the sampled data JSON.
3170         (ResultsTable.prototype._showTest): Shows the results of a single test.
3171         (ResultsTable.prototype._showSuite): Shows the results of a single suite.
3172         (ResultsTable.prototype._showIteration): Shows the results of a single iteration.
3173         (ResultsTable.prototype.showRecord): Shows a single iteration for a single test.
3174         (ResultsTable.prototype.showIterations): Shows all the results.
3175         (RecordTable): Deleted.
3176         (RecordTable.prototype.clear): Deleted.
3177         (RecordTable.prototype._showTitles): Deleted.
3178         (RecordTable.prototype._showHeader): Deleted.
3179         (RecordTable.prototype._showEmpty): Deleted.
3180         (RecordTable.prototype._showValue): Deleted.
3181         (RecordTable.prototype._showSamples): Deleted.
3182         (RecordTable.prototype._showTest): Deleted.
3183         (RecordTable.prototype._showSuite): Deleted.
3184         (RecordTable.prototype.showRecord): Deleted.
3185         (RecordTable.prototype.showIterations): Deleted.
3186
3187         * Animometer/resources/sampler.js:
3188         (Sampler.prototype.startSampling): Use forEach.
3189         (Sampler.prototype.sample): Use forEach.
3190         (Sampler.prototype.toJSON): Converts the sampler data to JSON format.
3191
3192         * Animometer/resources/strings.js: Added.
3193         This new file will be used to associate the strings used by the benchmark
3194         with IDs. A string can be changed in one place without having to change
3195         all the instances of this string in multiple files. There two groups of
3196         strings in this file. The first one is used by the UI elements and the second
3197         group is used when constructing the results JSON.
3198
3199         * Animometer/runner/animometer.html:
3200         * Animometer/runner/resources/animometer.css:
3201
3202         * Animometer/runner/resources/animometer.js:
3203         (window.benchmarkRunnerClient.willAddTestFrame):
3204         (window.benchmarkRunnerClient.willStartFirstIteration):
3205         (window.benchmarkRunnerClient.didRunSuites):
3206         (window.benchmarkRunnerClient.didFinishLastIteration):
3207         Make benchmarkRunnerClient uses ResultsDashboard instead of _iterationsSamplers
3208         Get the JSON from ResultsDashboard.toJSON() and pass it to ResultsTable.showIterations().
3209         Also set the textContent of the "#json" textarea with the results JSON.
3210
3211         (showResults): Delete unneeded code.
3212         (showJson): Shows the "json" section.
3213         (showTestGraph): Rename showGraph() to be showTestGraph().
3214         (showTestJSON): Shows the JSON of a single testResults.
3215         (showGraph): Deleted.
3216
3217         * Animometer/runner/resources/tests.js:
3218         Use the string table instead of putting literal strings.
3219
3220         * Animometer/tests/resources/stage.js:
3221         (StageBenchmark.prototype.showResults):
3222         Fix the parameters which are passed to RecordTable.showRecord().
3223
3224         * Animometer/tests/bouncing-particles/bouncing-canvas-images.html:
3225         * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html:
3226         * Animometer/tests/bouncing-particles/bouncing-css-images.html:
3227         * Animometer/tests/bouncing-particles/bouncing-css-shapes.html:
3228         * Animometer/tests/bouncing-particles/bouncing-svg-images.html:
3229         * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html:
3230         * Animometer/tests/examples/canvas-electrons.html:
3231         * Animometer/tests/examples/canvas-stars.html:
3232         * Animometer/tests/simple/simple-canvas-paths.html:
3233         * Animometer/tests/template/template-canvas.html:
3234         * Animometer/tests/template/template-css.html:
3235         * Animometer/tests/template/template-svg.html:
3236         * Animometer/tests/text/layering-text.html:
3237         Include the new strings.js file in all the test files.
3238
3239 2015-10-12  Jon Lee  <jonlee@apple.com>
3240
3241         Add canvas line dash test
3242         https://bugs.webkit.org/show_bug.cgi?id=150078
3243         <rdar://problem/23082347>
3244
3245         Reviewed by Dean Jackson.
3246
3247         * Animometer/runner/resources/tests.js: Add line dash test.
3248         * Animometer/tests/simple/resources/simple-canvas-paths.js:
3249         (CanvasLineDashStage): Create a new stage with a default dash pattern and stroke style.
3250         Maintain a step which will animate the dash.
3251         (CanvasLineDashStage.prototype.animate): Render the line path with the dash. Increment
3252         the dash offset to animate.
3253         (CanvasPathBenchmark.prototype.createStage): Add the test.
3254
3255 2015-10-12  Jon Lee  <jonlee@apple.com>
3256
3257         Add canvas line path tests
3258         https://bugs.webkit.org/show_bug.cgi?id=150076
3259         <rdar://problem/23082285>
3260
3261         Reviewed by Dean Jackson.
3262
3263         * Animometer/runner/resources/tests.js: Add new line path tests, with different
3264         line joins.
3265         * Animometer/tests/simple/resources/simple-canvas-paths.js:
3266         (CanvasLinePathStage): The stage is the same as the SimpleCanvasPathStrokeStage
3267         but sets the lineJoin on the context.
3268         (CanvasPathBenchmark.prototype.createStage): Add the tests.
3269
3270 2015-10-12  Jon Lee  <jonlee@apple.com>
3271
3272         Add missing paint objects for arc and arcTo fills
3273         https://bugs.webkit.org/show_bug.cgi?id=150075
3274         <rdar://problem/23082233>
3275
3276         Reviewed by Dean Jackson.
3277
3278         * Animometer/tests/simple/resources/simple-canvas-paths.js: Add missing paint objects
3279         for arcTo and arc segment fills.
3280         (CanvasArcToSegmentFill):
3281         (CanvasArcToSegmentFill.prototype.draw):
3282         (CanvasArcSegmentFill):
3283         (CanvasArcSegmentFill.prototype.draw):
3284
3285 2015-10-12  Jon Lee  <jonlee@apple.com>
3286
3287         Add canvas line segment tests
3288         https://bugs.webkit.org/show_bug.cgi?id=150073
3289         <rdar://problem/23082138>
3290
3291         Reviewed by Dean Jackson.
3292
3293         * Animometer/runner/resources/tests.js: Add new line segment tests, with different
3294         line caps.
3295         * Animometer/tests/simple/resources/simple-canvas-paths.js:
3296         (CanvasLineSegment): Add new line segment paint object.
3297         (CanvasLineSegmentStage): Create a new stage that sets the lineCap.
3298
3299 2015-10-12  Jon Lee  <jonlee@apple.com>
3300
3301         Add canvas path fill tests
3302         https://bugs.webkit.org/show_bug.cgi?id=150071
3303         <rdar://problem/23082001>
3304
3305         Reviewed by Dean Jackson.
3306
3307         * Animometer/runner/resources/tests.js: Add new pathTypes for path fills.
3308         * Animometer/tests/simple/resources/simple-canvas-paths.js:
3309         (CanvasLinePoint): Add basic point for a line, and call lineTo.
3310         (SimpleCanvasPathFillStage): Add a new stage similar to SimpleCanvasPathStrokeStage.
3311         (CanvasPathBenchmark.prototype.createStage): Add the tests.
3312
3313 2015-10-12  Jon Lee  <jonlee@apple.com>
3314
3315         Add canvas path tests
3316         https://bugs.webkit.org/show_bug.cgi?id=150067
3317         rdar://problem/23081463
3318
3319         Reviewed by Dean Jackson.
3320
3321         * Animometer/runner/resources/tests.js: Add a quadratic and bezier path test.
3322
3323         * Animometer/tests/simple/resources/simple-canvas.js:
3324         (SimpleCanvasStage.prototype.tune): This kind of test joins all of the segments
3325         into one long path, and tries to render that one path. Random points make it
3326         difficult to tell what is going on, so add a parameter to the constructor to
3327         confine the area where the random coordinates can land. The more complicated the
3328         case is, the larger an area the path will cover. Add an artificial minimum so
3329         that the first 200 points aren't confined to a space that is too small.
3330
3331         * Animometer/tests/simple/resources/simple-canvas-paths.js:
3332         (SimpleCanvasPathStrokeStage): Add a new kind of stage that inherits from
3333         SimpleCanvasStage. Each time the frame animates a random line width and stroke
3334         color are chosen. The path setup is done outside of each paint object.
3335         (CanvasQuadraticPoint): This point just calls quadraticCurveTo.
3336         (CanvasPathBenchmark.prototype.createStage): Add the tests.
3337
3338 2015-10-12  Jon Lee  <jonlee@apple.com>
3339
3340         Add basic canvas tests
3341         https://bugs.webkit.org/show_bug.cgi?id=150066
3342         rdar://problem/23081143
3343
3344         Reviewed by Dean Jackson.
3345
3346         This adds a new test suite that will cover all of the path-based canvas calls.
3347         The patch will be divided up to cover tests with similar techniques.
3348
3349         The simplest version uses a SimpleCanvasStage.
3350
3351         * Animometer/runner/resources/tests.js: Add tests for quadratic, bezier, arcTo,
3352         arc, and rect segments. Also include arcTo, arc, and rect fills.
3353         * Animometer/tests/resources/stage.js:
3354         (Stage.prototype.randomBool): Added for counterclockwise property for arc segments.
3355         (Stage.prototype.randomInt): Fix how values are rounded, used by randomBool. It should
3356         round instead of flooring everything.
3357         * Animometer/tests/simple/resources/simple-canvas.js: Added. Defines common classes
3358         used by all simple canvas tests. The page reads best bottom to top.
3359         (SimpleCanvasStage): Basic stage. Pass a canvasObject which will be used to create new
3360         objects as needed in tune().
3361         (SimpleCanvasStage.prototype.tune): Modeled on other tests. Adds and removed objects
3362         as specified by the provided |count|.
3363         (SimpleCanvasStage.prototype.animate): Iterate over all the objects and ask them to draw.
3364         There is no "animating" of the objects; they will just paint statically on the canvas.
3365         (SimpleCanvasAnimator): Basic animator clears the canvas prior to painting.
3366         (SimpleCanvasBenchmark): Hard-code the feedback loop parameters instead of including
3367         them in the query parameters to the test URLs.
3368         (SimpleCanvasBenchmark.prototype.createAnimator):
3369         * Animometer/tests/simple/simple-canvas-paths.html: Added.
3370
3371         * Animometer/tests/simple/resources/simple-canvas-paths.js: Added. There is no "animating"
3372         of these objects--they just paint statically on the canvas.
3373         (CanvasQuadraticSegment): Paint a quadratic segment stroke.
3374         (CanvasBezierSegment): Paint a bezier segment stroke.
3375         (CanvasArcToSegment): Paint an arcTo stroke.
3376         (CanvasArcSegment): Paint an arc stroke.
3377         (CanvasRect): Paint a rect.
3378         (CanvasRectFill): Paint a filled rect.
3379
3380         (CanvasPathBenchmark):
3381         (CanvasPathBenchmark.prototype.createStage): Look for the pathType and create the
3382         stage using the right paint object.
3383         (window.benchmarkClient.create):
3384
3385 2015-10-12  Jon Lee  <jonlee@apple.com>
3386
3387         Refactor tune() to pass in an integer-based count
3388         https://bugs.webkit.org/show_bug.cgi?id=150060
3389         <rdar://problem/23079425>
3390
3391         Reviewed by Dean Jackson.
3392
3393         All of the tune functions do an initial step of flooring the
3394         # of painting objects to add or remove. Factor that out since
3395         the complexity of all of these tests is always expressed in terms
3396         of countable items.
3397
3398         * Animometer/tests/resources/main.js:
3399         (Benchmark.prototype.update): Update the tuneValue.
3400
3401         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
3402         (BouncingParticlesStage.prototype.tune): Remove the count adjustment.
3403         * Animometer/tests/examples/resources/canvas-electrons.js:
3404         (CanvasElectronsStage.prototype.tune): Ditto.
3405         * Animometer/tests/examples/resources/canvas-stars.js:
3406         (CanvasStarsStage.prototype.tune): Ditto.
3407         * Animometer/tests/text/resources/layering-text.js:
3408         (LayeringTextStage.prototype.tune): Ditto.
3409
3410 2015-10-12  Jon Lee  <jonlee@apple.com>
3411
3412         Store test-interval in localStorage
3413         https://bugs.webkit.org/show_bug.cgi?id=150055
3414         <rdar://problem/23078879>
3415
3416         Reviewed by Dean Jackson.
3417
3418         * Animometer/runner/resources/animometer.js:
3419         (populateSettings): Keep track of the specified test interval in localStorage
3420         to make it easy to repeat a test suite.
3421
3422 2015-10-12  Jon Lee  <jonlee@apple.com>
3423
3424         Remove "../tests/" from the URLs of all tests
3425         https://bugs.webkit.org/show_bug.cgi?id=150054
3426         <rdar://problem/23078784>
3427
3428         Reviewed by Dean Jackson.
3429
3430         Presumably all tests will be running from the tests/ directory,
3431         so we don't have to specify it in all of the test URLs.
3432
3433         * Animometer/runner/resources/benchmark-runner.js:
3434         (BenchmarkRunnerState.prototype.prepareCurrentTest): Prepend
3435         "../tests/" to all tests.
3436         * Animometer/runner/resources/tests.js: Remove "../tests/" from
3437         all URLs.
3438
3439 2015-10-12  Jon Lee  <jonlee@apple.com>
3440
3441         Refactor test suites to a separate class.
3442         https://bugs.webkit.org/show_bug.cgi?id=150053
3443         <rdar://problem/23078645>
3444
3445         Reviewed by Dean Jackson.
3446
3447         Create a Suite class to refactor out prepare() and run().
3448         Generate the checkboxes representing the suites using Suites
3449         instead of maintaining a separate list. Also, save the
3450         selections out to localStorage.
3451
3452         * Animometer/runner/animometer.html: Remove the explicitly listed
3453         suites. These will be generated from Suites instead.
3454         * Animometer/runner/resources/animometer.js:
3455         (populateSettings): Iterate through Suites, and create the
3456         label and checkbox. Attach the Suite object to the checkbox so
3457         when the benchmark is started, we get direct access. Initialize
3458         the checkmark based on its value in localStorage. Set this to
3459         run when DOMContentLoaded is dispatched.
3460         (startBenchmark): Grab all of the checkboxes, inspect their
3461         values, add it to enabledSuites if selected. Remember whether
3462         the suite was enabled in localStorage, so that it's easy to do
3463         repeated runs.
3464         * Animometer/runner/resources/tests.js:
3465         (Suite): Create a new Suite class. Refactor out prepare() and
3466         run(), since all of them have the same implementation. Populate
3467         Suites with Suite instances instead of generic objects.
3468
3469 2015-10-12  Jon Lee  <jonlee@apple.com>
3470
3471         Update graph styles for legibility.
3472         https://bugs.webkit.org/show_bug.cgi?id=150052
3473         <rdar://problem/23078503>
3474
3475         Reviewed by Dean Jackson.
3476
3477         * Animometer/runner/resources/animometer.css: Update colors and
3478         stroke thicknesses to make the graphs easier to read.
3479         (.smaple-time): Correct to .sample-time
3480         * Animometer/runner/resources/graph.js:
3481         (graph): Ditto.
3482
3483 2015-10-12  Jon Lee  <jonlee@apple.com>
3484
3485         Update graph styles for legibility.
3486         https://bugs.webkit.org/show_bug.cgi?id=150052
3487         <rdar://problem/23078503>
3488
3489         Reviewed by Dean Jackson.
3490
3491         * Animometer/runner/resources/animometer.css: Update colors and
3492         stroke thicknesses to make the graphs easier to read.
3493         (.smaple-time): Correct to .sample-time
3494         * Animometer/runner/resources/graph.js:
3495         (graph): Ditto.
3496
3497 2015-10-12  Filip Pizlo  <fpizlo@apple.com>
3498
3499         Unreviewed, revert an unintended commit.
3500
3501         * JetStream/Octane2/crypto.js:
3502         (montRevert):
3503         (montReduce):
3504
3505 2015-10-05  Said Abou-Hallawa  <sabouhallawa@apple.com>
3506
3507         Add a graphics benchmark
3508         https://bugs.webkit.org/show_bug.cgi?id=149053
3509         <rdar://problem/18984169>
3510
3511         Reviewed by Dean Jackson.
3512
3513         Instead of measuring the FPS of the animation, this benchmark measures the
3514         test complexity when rendering at a set-point FPS which should be lower
3515         than 60 FPS. This benchmark tries to stay at the set-point FPS by using
3516         a closed loop control system PID function. The gain of the system is passed
3517         as a parameter when running the test. Measuring the FPS faithfully results
3518         very fluctuating values. A Kalman filter is used to give a better estimate
3519         for the current FPS.
3520
3521         The animation of the tests is done manually. requestAnimationFrame() is
3522         called with a callback. Inside this callback, the test is animating by
3523         changing the positions of the elements inside the page. The test complexity
3524         may change also if the current FPS is not equal to the desired FPS.
3525
3526         In this patch, the benchmark and the tests are included. The shared code
3527         and the tests runner are included in separate patches.
3528
3529         * Animometer/runner/animometer.html:
3530         * Animometer/runner/resources/animometer.js:
3531         Add two new examples for more complex animation techniques.
3532         Add an option to show/hide the test running results which is off by default.
3533
3534         * Animometer/runner/resources/tests.js: Added.
3535         (suiteFromName): Returns a suite given its name.
3536         (testFromName): Returns a test given its suite and name.
3537
3538         * Animometer/tests: Added.
3539         This directory includes all the test suites to be run by the benchmark.
3540         runner. All the tests should try to run on three stages: CSS, canvas and
3541         SVG.
3542
3543         * Animometer/tests/bouncing-particles: Added.
3544         * Animometer/tests/bouncing-particles/resources: Added.
3545         The bouncing particles test is an example of a simple animation technique.
3546
3547         * Animometer/tests/bouncing-particles/bouncing-canvas-images.html: Added.
3548         * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html: Added.
3549         * Animometer/tests/bouncing-particles/bouncing-css-images.html: Added.
3550         * Animometer/tests/bouncing-particles/bouncing-css-shapes.html: Added.
3551         * Animometer/tests/bouncing-particles/bouncing-svg-images.html: Added.
3552         * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html: Added.
3553         Bouncing particles test pages.
3554
3555         * Animometer/tests/bouncing-particles/resources/bouncing-particles.js: Added.
3556         (BouncingParticle): Base class for a bouncing particle.
3557         (BouncingParticle.prototype.center): Returns the center point or the particle.
3558         (BouncingParticle.prototype.animate): Moves the particle based on its current position, angle and velocity.
3559
3560         (BouncingParticlesAnimator): A sub class of Animator.
3561
3562         (BouncingParticlesStage): Represents the container of all the bouncing particles.
3563         (BouncingParticlesStage.prototype.parseShapeParamters): Gets the shape parameters for shape animating tests.
3564         (BouncingParticlesStage.prototype.randomRotater): Creates a rotater for the particles.
3565         (BouncingParticlesStage.prototype.animate): Animates all the particles.
3566         (BouncingParticlesStage.prototype.tune): Changes the test by adding or removing particles.
3567
3568         (BouncingParticlesBenchmark): Runs the benchmark for bouncing particles test.
3569         (BouncingParticlesBenchmark.prototype.createAnimator): Creates an animator of type BouncingParticlesAnimator.
3570
3571         * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js: Added.
3572         (BouncingCssShape): A sub class of BouncingParticle for animating CSS shapes.
3573         (BouncingCssShape.prototype._createSpan): Creates a <span> element and takes the shape and clipping classes into consideration.
3574         (BouncingCssShape.prototype._move): Moves the particle to a new location. Apply transform since it does not require layout.
3575         (BouncingCssShape.prototype.animate): Rotates and moves the shape to a new location.
3576
3577         (BouncingCssShapesStage): A sub class of BouncingParticlesStage for animating CSS shapes.
3578         (BouncingCssShapesStage.prototype.createParticle): Creates a particle of type BouncingCssShape.
3579         (BouncingCssShapesStage.prototype.particleWillBeRemoved): Removes the corresponding element form the parent children list.
3580
3581         (BouncingCssShapesBenchmark): A sub class of BouncingParticlesBenchmark for animating CSS shapes.
3582         (BouncingCssShapesBenchmark.prototype.createStage): Creates a stage of type BouncingCssShapesStage.
3583         (window.benchmarkClient.create): Creates a benchmark of type BouncingCssShapesBenchmark.
3584
3585         * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js: Added.
3586         (BouncingCssImage): A sub class of BouncingParticle for animating CSS images.
3587         (BouncingCssImage.prototype._move): Move the particle to a new location. Apply transform since it does not require layout.
3588         (BouncingCssImage.prototype.animate): Rotates and moves the shape to a new location.
3589
3590         (BouncingCssImagesStage): A sub class of BouncingParticlesStage for animating CSS images.
3591         (BouncingCssImagesStage.prototype.createParticle): Creates a particle of type BouncingCssImage.
3592         (BouncingCssImagesStage.prototype.particleWillBeRemoved): Removes the corresponding element form the parent children list.
3593
3594         (BouncingCssImagesBenchmark): A sub class of BouncingParticlesBenchmark for animating CSS images.
3595         (BouncingCssImagesBenchmark.prototype.createStage): Creates a stage of type BouncingCssImagesStage.
3596         (window.benchmarkClient.create): Creates a benchmark of type BouncingCssImagesBenchmark.
3597
3598         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js: Added.
3599         (BouncingCanvasParticle): A base sub-class of BouncingParticle for animating canvas particles.
3600         (BouncingCanvasParticle.prototype._applyRotation): Apply the particle rotation-around-center transform to the canvas context.
3601         (BouncingCanvasParticle.prototype._applyClipping): Apply the particle clipping to the canvas context.
3602         (BouncingCanvasParticle.prototype._draw): A non-implemented version of the drawing function.
3603         (BouncingCanvasParticle.prototype.animate): Carries out all the steps to redraw the canvas particle.
3604
3605         (BouncingCanvasParticlesStage): A base sub-class of BouncingParticlesStage for animating canvas particles.
3606
3607         (BouncingCanvasParticlesAnimator): A concrete sub-class of BouncingParticlesAnimator for animating canvas particles.
3608         (BouncingCanvasParticlesAnimator.prototype.animate): Overrides the base class method to clear the canvas before redrawing the stage.
3609
3610         (BouncingCanvasParticlesBenchmark): A base sub-class of StageBenchmark for animating canvas particles.
3611         (BouncingCanvasParticlesBenchmark.prototype.createAnimator): Creates the canvas particles animator.
3612
3613         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js: Added.
3614         (BouncingCanvasShape): A concrete sub-class of BouncingCanvasParticle for animating canvas shapes.
3615         (BouncingCanvasShape.prototype._applyFill): Sets the fillStyle in the canvas context.
3616         (BouncingCanvasShape.prototype._drawShape): Carries out the actual drawing.
3617         (BouncingCanvasShape.prototype._draw): Carries out all the steps to draw the shape.
3618
3619         (BouncingCanvasShapesStage): A concrete sub-class of BouncingCanvasParticle for animating canvas shapes.
3620         (BouncingCanvasShapesStage.prototype.createParticle): Creates a particle of type BouncingCanvasShape.
3621
3622         (BouncingCanvasShapesBenchmark): A concrete sub-class of BouncingCanvasParticlesBenchmark for animating canvas shapes.
3623         (BouncingCanvasShapesBenchmark.prototype.createStage): Creates a stage of type BouncingCanvasShapesStage.
3624         (window.benchmarkClient.create): Creates a benchmark of type BouncingCanvasShapesBenchmark.
3625
3626         * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js: Added.
3627         (BouncingCanvasImage): A concrete sub-class of BouncingCanvasParticle for animating canvas images.
3628         (BouncingCanvasImage.prototype._draw): Draws an image on the context of a canvas.
3629
3630         (BouncingCanvasImagesStage): A concrete sub-class of BouncingCanvasParticlesBenchmark for animating canvas images.
3631         (BouncingCanvasImagesStage.prototype.createParticle): Creates a particle of type BouncingCanvasImage.
3632
3633         (BouncingCanvasImagesBenchmark): A concrete sub-class of BouncingCanvasParticlesBenchmark for animating canvas images.
3634         (BouncingCanvasImagesBenchmark.prototype.createStage): Creates a stage of type BouncingCanvasImagesStage.
3635         (window.benchmarkClient.create): Creates a benchmark of type BouncingCanvasImagesBenchmark.
3636
3637         * Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js: Added.
3638         (BouncingSvgParticle): A base sub-class of BouncingParticle for animating SVG particles.
3639         (BouncingSvgParticle.prototype._applyClipping): Apply the particle clipping by setting the 'clip-path' attribute of the SVGElement.
3640         (BouncingSvgParticle.prototype._move): Moves the particle to a new location. Apply transform since it does not require layout.
3641         (BouncingSvgParticle.prototype.animate): Rotates and moves the shape to a new location.
3642         (BouncingSvgParticlesStage): A sub class of BouncingParticlesStage for animating SVGElements.
3643         (BouncingSvgParticlesStage.prototype._createDefs): Creates an SVGDefsElement.
3644         (BouncingSvgParticlesStage.prototype._ensureDefsIsCreated): Ensures there is only one SVGDefsElement is created.
3645         (BouncingSvgParticlesStage.prototype._createClipStar): Creates an SVGClipPathElement and sets its 'd' attribute to a star like shape.
3646         (BouncingSvgParticlesStage.prototype.ensureClipStarIsCreated): Ensure there is only one star SVGClipPathElement is created.
3647         (BouncingSvgParticlesStage.prototype.particleWillBeRemoved): Remove the corresponding element form the parent children list.
3648
3649         * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js: Added.
3650         (BouncingSvgShape): A concrete sub-class of BouncingSVGParticle for animating SVG shapes.
3651         (BouncingSvgShape.prototype._createShape): Creates an SVG shape.
3652         (BouncingSvgShape.prototype._applyFill): Applies the selected fill style to the SVG shape.
3653
3654         (BouncingSvgShapesStage): A concrete sub-class of BouncingSvgParticlesStage for animating SVG shapes.
3655         (BouncingSvgShapesStage.prototype.createGradient): Creates an SVGLinearGradientElement.
3656         (BouncingSvgShapesStage.prototype.createParticle): Creates a particle of type BouncingSvgShape.
3657         (BouncingSvgShapesStage.prototype.particleWillBeRemoved): Ensures the attached SVGLinearGradientElement is removed from the SVGDefsElement.
3658
3659         (BouncingSvgShapesBenchmark): A concrete sub-class of BouncingParticlesBenchmark for animating SVG images.
3660         (BouncingSvgShapesBenchmark.prototype.createStage): Creates a stage of type BouncingSvgShapesStage.
3661         (window.benchmarkClient.create): Creates a benchmark of type BouncingSvgShapesBenchmark.
3662
3663         * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js: Added.
3664         (BouncingSvgImage): A concrete sub-class of BouncingSVGParticle for animating SVG images.
3665
3666         (BouncingSvgImagesStage): A concrete sub-class of BouncingSVGParticlesBenchmark for animating SVG images.
3667         (BouncingSvgImagesStage.prototype.createParticle): Creates a particle of type BouncingSvgImage.
3668
3669         (BouncingSvgImagesBenchmark): A concrete sub-class of BouncingParticlesBenchmark for animating SVG images.
3670         (BouncingSvgImagesBenchmark.prototype.createStage): Creates a stage of type BouncingSvgImagesStage.
3671         (window.benchmarkClient.create): Creates a benchmark of type BouncingSvgImagesBenchmark.
3672
3673         * Animometer/tests/examples: Added.
3674         * Animometer/tests/examples/canvas-electrons.html: Added.
3675         * Animometer/tests/examples/canvas-stars.html: Added.
3676         Examples test pages.
3677
3678         * Animometer/tests/examples/resources: Added.
3679         * Animometer/tests/examples/resources/canvas-electrons.js: Added.
3680         (CanvasElectron): An object which draws and animate a electron object on a canvas stage.
3681         (CanvasElectron.prototype._draw): Draws the electron object.
3682         (CanvasElectron.prototype.animate): Animates the electron object.
3683
3684         (CanvasElectronsStage): A concrete sub-class of Stage for animating electrons.
3685         (CanvasElectronsStage.prototype.tune): Changes the test by adding or removing elements.
3686         (CanvasElectronsStage.prototype.animate): Animates the test elements.
3687
3688         (CanvasElectronsAnimator): A concrete sub-class of StageAnimator for animating canvas electrons.
3689         (CanvasElectronsAnimator.prototype.animate): Overrides the base class method to clear the canvas before redrawing the stage.
3690
3691         (CanvasElectronsBenchmark): A concrete sub-class of StageBenchmark for animating electrons.
3692         (CanvasElectronsBenchmark.prototype.createStage): Creates a stage of CanvasElectronsStage.
3693         (CanvasElectronsBenchmark.prototype.createAnimator): Creates an animator of type CanvasElectronsAnimator.
3694         (window.benchmarkClient.create): Creates a benchmark of type CanvasElectronsBenchmark.
3695
3696         * Animometer/tests/examples/resources/canvas-stars.js: Added.
3697         (CanvasStar): An object which draws and animate a star object on a canvas stage.
3698         (CanvasStar.prototype._draw): Draws the star object.
3699         (CanvasStar.prototype.animate): Animates the star object.
3700
3701         (CanvasStarsStage): A concrete sub-class of Stage for animating stars.
3702         (CanvasStarsStage.prototype.tune): Changes the test by adding or removing elements.
3703         (CanvasStarsStage.prototype.animate): Animates the test elements.
3704
3705         (CanvasStarsAnimator): A concrete sub-class of StageAnimator for animating canvas stars.
3706         (CanvasStarsAnimator.prototype.animate): Overrides the base class method to clear the canvas before redrawing the stage.
3707
3708         (CanvasStarsBenchmark): A concrete sub-class of Benchmark for animating stars.
3709         (CanvasStarsBenchmark.prototype.createStage): Creates a stage of CanvasStarsStage.
3710         (CanvasStarsBenchmark.prototype.createAnimator): Creates an animator of type CanvasStarsAnimator.
3711         (window.benchmarkClient.create): Creates a benchmark of type CanvasStarsBenchmark.
3712
3713         * Animometer/tests/resources: Added.
3714         This directory includes the script which is required to run an adaptive
3715         graphics benchmark. From an empty test page, the set of classes in this
3716         directory are responsible for measuring the current frame rate and
3717         changing the test to reach a desired FPS. It keeps asking the test page
3718         to tune itself by a certain value to increase or decrease the frame rate.
3719         It's also responsible for sampling the test state and the corresponding
3720         frame rate.
3721
3722         * Animometer/tests/resources/main.js: Added.
3723         (BenchmarkState): Tracks the state of the benchmark test.
3724         (BenchmarkState.prototype._timeOffset): Returns the timeOffset of a stage.
3725         (BenchmarkState.prototype._message): Returns the message of a stage.
3726         (BenchmarkState.prototype.update): Sets the currentTimeOffset to a new value.
3727         (BenchmarkState.prototype.samplingTimeOffset): Returns the timeOffset of the sampling stage.
3728         (BenchmarkState.prototype.currentStage): Returns the current stage of the benchmark.
3729         (BenchmarkState.prototype.currentMessage): Returns the message of the current stage and timeOffset.
3730         (BenchmarkState.prototype.currentProgress): Returns a percentage of how much the benchmark is running.
3731
3732         (Animator): Manages animating the test.
3733         (Animator.prototype.start): Called if animating using setInterval is requested.
3734         (Animator.prototype.timeDelta): Returns the current timeDelta
3735         (Animator.prototype.animate): Manages the test animation.
3736         (Animator.prototype.animateLoop): Called if animating using requestAnimationFrame is requested.
3737
3738         (Benchmark): Manages running the test benchmark and recording the sampled data.
3739         (Benchmark.prototype.start): Starts the benchmark.
3740         (Benchmark.prototype.update): Called from the animator.animate() to change the complexity of the test.
3741         (Benchmark.prototype.record): Shows the current (not final) results of the benchmark.
3742         (Benchmark.prototype.resolveWhenFinished): Spins until the benchmark is finished and returns its results.
3743         (Benchmark.prototype.run): Starts the test, runs it, waits until it is finished and return its results.
3744         (window.runBenchmark): Called from the benchmark runner through the suite controller run-callback.
3745
3746         * Animometer/tests/resources/math.js: Added.
3747         (Matrix): A matrix object.
3748         (Vector3): A vector of size 3 object.
3749         (Matrix3): A matrix of size 3x3 object.
3750
3751         (PIDController): Closed-loop controller for a set-point y.
3752         (PIDController.prototype._sat): Limits the output to a certain range.
3753         (PIDController.prototype.tune): Given the current output of a system, it produces a new pid value for tuning it.
3754
3755         (KalmanEstimator): Implement Kalman filter to get an estimate for a sampled data point.
3756         (KalmanEstimator.prototype.estimate): Returns an estimate for for a sampled data point.
3757
3758         * Animometer/tests/resources/utilities.js: Added.
3759         (window.Utilities._parse): Given a separator character, it pareses a string to a set of <key, value> pairs.
3760         (window.Utilities.parseParameters): Parses a test parameters.
3761         (window.Utilities.parseArguments): Parses a tag arguments.
3762         (window.Utilities.extendObject): Adds the attributes and their values of an object to another object.
3763         (window.Utilities.copyObject): Copies the attributes and their values of an object to a new object.
3764         (window.Utilities.mergeObjects): Copies the attributes and their values of two objects to a new object.
3765         (window.Utilities.createSvgElement): Creates an SVGElement given its name and its attributes.
3766
3767         * Animometer/tests/resources/stage.css: Added.
3768         * Animometer/tests/resources/stage.js: Added.
3769         (Rotater): Manages rotating an angle within a fixed time interval.
3770         (Rotater.prototype.get interval): Returns the time interval which is required to rotate 360 degrees.
3771         (Rotater.prototype.next): Moves the current time by a delta.
3772         (Rotater.prototype.degree): Returns the current rotating degree.
3773         (Rotater.prototype.rotateZ): Returns CSS formatted transform rotateZ() string for the current degree.
3774         (Rotater.prototype.rotate): Returns SVG formatted transform rotate() string for the current degree.
3775
3776         (Stage): A base class for managing the test complexity and test animation.
3777         (Stage.prototype.get size): Returns the size of the stage excluding the CSS padding.
3778         (Stage.prototype.random): Returns a random float.
3779         (Stage.prototype.randomInt): Returns a random integer.
3780         (Stage.prototype.randomPosition): Returns a random position.
3781         (Stage.prototype.randomSquareSize): Returns a square size.
3782         (Stage.prototype.randomVelocity): Returns a random velocity.
3783         (Stage.prototype.randomAngle): Returns a random angle.
3784         (Stage.prototype.randomColor): Returns a random color not too dark and not too light.
3785         (Stage.prototype.randomRotater): Creates a random rotater. Its velocity depends on choosing a random rotation time interval.
3786         (Stage.prototype.tune): A not-implemented version of this function.
3787         (Stage.prototype.animate): A not-implemented version of this function.
3788         (Stage.prototype.clear): Clears the stage from all its animation elements.
3789
3790         (StageAnimator): A base class for the stage-based animators.
3791         (StageAnimator.prototype.animate): Calls Animator.animate() which updates the test page and then calls Stage.animate() to force redraw.
3792
3793         (StageBenchmark): A base class for the stage-based benchmarks.
3794         (StageBenchmark.prototype.createStage): Creates the default stage.
3795         (StageBenchmark.prototype.createAnimator): Creates the default animator.
3796         (StageBenchmark.prototype.tune): Delegates the call to stage.
3797         (StageBenchmark.prototype.clear): Delegates the call to stage.
3798         (StageBenchmark.prototype.showResults): Shows the results/progress through its recordTable and progressBar.
3799
3800         * Animometer/tests/resources/yin-yang.png: Added.
3801         * Animometer/tests/resources/yin-yang.svg: Added.
3802         These images are shared among all the tests.
3803
3804         * Animometer/tests/template: Added.
3805         * Animometer/tests/template/resources: Added.