1 2016-04-06 Jon Lee <jonlee@apple.com>
3 Update master benchmark with SVG test
4 https://bugs.webkit.org/show_bug.cgi?id=156273
6 Reviewed by Dean Jackson.
7 Provisionally reviewed by Said Abou-Hallawa.
9 Switch masks tests for SVG path test.
11 * Animometer/resources/debug-runner/tests.js: Move mask test here.
12 * Animometer/resources/runner/tests.js: Add SVG test here.
13 * Animometer/tests/dom/particles.html: Renamed from PerformanceTests/Animometer/tests/master/particles.html.
14 * Animometer/tests/dom/resources/dom-particles.js: Renamed from PerformanceTests/Animometer/tests/master/resources/dom-particles.js.
16 * Animometer/tests/master/resources/particles.js: Add minPosition for bounds checking. Prevents particle from being
18 * Animometer/tests/master/resources/svg-particles.js: Added.
19 (Particle): The particle is either a path object or a rect using a path as a clip. The
20 same path is used either way. For each particle create a linear gradient with a random
22 (SVGParticlesStage): Look in #shapes to see how many different kinds of paths are available.
23 This makes the test more generic in case other shapes need to be tested.
24 * Animometer/tests/master/svg-particles.html: Added. Have two defs, one that houses each
25 particle's gradient, and one that holds the shape templates.
27 2016-03-27 Hunseop Jeong <hs85.jeong@samsung.com>
29 [EFL] REGRESSION(r188793): It made 200 layout tests and Bindings/event-target-wrapper.html performance test fail
30 https://bugs.webkit.org/show_bug.cgi?id=148470
32 Reviewed by Darin Adler.
34 * Skipped: Unskip the Bindings/event-target-wrapper test.
36 2016-03-23 Jon Lee <jonlee@apple.com>
38 Update focus and leaves tests
39 https://bugs.webkit.org/show_bug.cgi?id=155825
41 Reviewed by Simon Fraser.
43 Particles would improperly disappear, before they were fully off stage. Update the calculation.
44 * Animometer/tests/dom/resources/leaves.js:
45 * Animometer/tests/master/resources/leaves.js:
47 * Animometer/tests/master/focus.html: Update the center element styling.
48 * Animometer/tests/master/resources/focus.js:
49 (FocusElement.Utilities.createClass): Give enough space in the container for each particle for the blur
50 to spread. It should be about 3x more space than the blur radius on each side.
51 (Stage.call.initialize): Ditto for the center element.
53 2016-03-23 Jon Lee <jonlee@apple.com>
55 Update support for other platforms
56 https://bugs.webkit.org/show_bug.cgi?id=155824
58 Reviewed by Simon Fraser.
60 * Animometer/resources/debug-runner/animometer.css: Remove extraneous media query. All of it should
61 be handled in the release stylesheet.
62 * Animometer/resources/debug-runner/animometer.js: Add support for browsers that return an HTMLCollection
63 when retrieving radio elements with a name, instead of the selected value.
64 * Animometer/resources/runner/animometer.css: Adjust the queries for devices of varying widths.
65 (.frame-container): Move overflow:hidden to #stage.
66 * Animometer/tests/master/resources/stage.css: Consolidate into tests/resources/stage.css.
67 * Animometer/tests/resources/stage.css:
68 (body): Remove overflow:hidden.
69 (#stage): Set overflow:hidden here.
70 (#center-text): Moved from master/resources/stage.css.
72 Update stylesheet hrefs.
73 * Animometer/tests/master/canvas-stage.html:
74 * Animometer/tests/master/focus.html:
75 * Animometer/tests/master/leaves.html:
76 * Animometer/tests/master/multiply.html:
77 * Animometer/tests/master/particles.html:
78 * Animometer/tests/master/text.html: Adjust text size to fit in the device screen.
80 2016-03-23 Jon Lee <jonlee@apple.com>
82 Make the benchmark require device to be in landscape orientation
83 https://bugs.webkit.org/show_bug.cgi?id=155822
84 rdar://problem/25258650
86 Reviewed by Ryosuke Niwa.
88 Check that the device is in landscape orientation. If not, disable the button to start it,
89 and show a warning message.
91 * Animometer/developer.html: Add a message about how the browser should be set up. Include a
92 warning message that appears if the orientation is incorrect on mobile devices.
93 * Animometer/index.html: Ditto.
95 * Animometer/resources/debug-runner/animometer.css: Migrate the .hidden rule into the release
96 stylesheet. Update the style to accommodate the new UI.
97 * Animometer/resources/runner/animometer.css:
99 * Animometer/resources/runner/animometer.js:
100 (window.benchmarkController.initialize): Add the orientation listener is needed.
101 (window.benchmarkController.addOrientationListenerIfNecessary): Only mobile devices need this. Check
102 to see for support of window.orientation.
103 (window.benchmarkController._orientationChanged): Toggle the warning based on whether we match the
104 landscape query. Set a state variable, which is needed for the debug harness. Call updateStartButtonState.
105 (window.benchmarkController.updateStartButtonState):
106 * Animometer/resources/debug-runner/animometer.js: Change _updateStartButtonState to return
107 a boolean about whether at least one test is selected. That will be used in
108 benchmarkController.updateStartButtonState(). Move the load event listener to the release version.
109 (window.benchmarkController.updateStartButtonState): Override the release version, and also check
110 that at least one test is selected.
112 2016-03-22 Geoffrey Garen <ggaren@apple.com>
114 MallocBench: consolidate regression testing for aligned allocation
115 https://bugs.webkit.org/show_bug.cgi?id=155762
117 Reviewed by Michael Saboff.
119 * MallocBench/MallocBench.xcodeproj/project.pbxproj:
120 * MallocBench/MallocBench/Benchmark.cpp:
121 * MallocBench/MallocBench/memalign.cpp: Removed.
122 * MallocBench/MallocBench/memalign.h: Removed. The stress_aligned test
123 covers this and much more.
125 * MallocBench/MallocBench/stress_aligned.cpp:
126 (benchmark_stress_aligned): Include specific tests for extreme sizes
129 2016-03-21 Jon Lee <jonlee@apple.com>
131 Update benchmark tests
132 https://bugs.webkit.org/show_bug.cgi?id=155723
134 Reviewed by Darin Adler.
135 Provisionally reviewed by Said Abou-Hallawa.
137 Add quadratic and bezier segments to the canvas path test.
139 * Animometer/resources/runner/tests.js: Some of the query strings are unnecessary.
141 * Animometer/tests/master/resources/canvas-stage.js:
142 (tune): Update to be able to take an array of possible constructors. Choose one randomly.
143 * Animometer/tests/master/resources/canvas-tests.js:
144 (CanvasLinePoint.Utilities.createClass): Move the point selection out to a separate
145 function called randomPoint() for reuse. Move X_LOOPS, Y_LOOPS, and offsets into the
147 (randomPoint): Scale the grid down a little bit so that the lines along the edge of the
148 canvas are not cut off when the stroke size is thick.
149 (CanvasQuadraticSegment): Added.
150 (CanvasBezierSegment): Added.
151 (SimpleCanvasStage): Pass in an array of the different segment types. Since line segments
152 are short compared to the curved ones, make it twice as likely to render a line segment.
153 (SimpleCanvasStage.animate): Update the drawing code so that we render all line segments.
155 Add a helper method that selects a random element from an array.
157 * Animometer/tests/resources/main.js:
158 (Stage.randomElementInArray): Select a random element from the provided array.
160 * Animometer/tests/bouncing-particles/resources/bouncing-tagged-images.js: Refactor.
161 * Animometer/tests/dom/resources/leaves.js: Ditto.
162 * Animometer/tests/master/resources/dom-particles.js: Ditto.
163 * Animometer/tests/master/resources/image-data.js: Ditto.
164 * Animometer/tests/master/resources/leaves.js: Ditto.
165 * Animometer/tests/simple/resources/simple-canvas-paths.js: Ditto.
167 Add canvas tests that includes all stroke and fill paths. This makes it possible to avoid having to
168 include the full simple canvas suite for perf testing.
170 * Animometer/resources/debug-runner/tests.js: Add new tests. Move the canvas test into the Canvas
172 * Animometer/tests/simple/resources/simple-canvas-paths.js: Add a CanvasStroke and CanvasFill particle
173 that random selects an object to render.
175 * Animometer/resources/debug-runner/tests.js: Move 3D suite before basic canvas suite.
176 When updating the perf bot script, we will include the suites up to this one, but exclude
177 the basic canvas suite.
179 Move compositing transforms test to HTML suite and remove the empty Miscellaneous suite.
181 * Animometer/resources/debug-runner/tests.js:
182 * Animometer/tests/dom/compositing-transforms.html: Renamed from PerformanceTests/Animometer/tests/misc/compositing-transforms.html.
183 * Animometer/tests/dom/resources/compositing-transforms.js: Renamed from PerformanceTests/Animometer/tests/misc/resources/compositing-transforms.js.
185 Clean up miscellaneous test suite. Add a canvas ellipse test, and remove the other
188 * Animometer/resources/debug-runner/tests.js: Add ellipse tests to the simple suite.
189 * Animometer/tests/misc/canvas-electrons.html: Removed.
190 * Animometer/tests/misc/canvas-stars.html: Removed.
191 * Animometer/tests/misc/resources/canvas-electrons.js: Removed.
192 * Animometer/tests/misc/resources/canvas-stars.js: Removed.
193 * Animometer/tests/simple/resources/simple-canvas-paths.js: Add ellipse primitives.
195 Merge text tests together into one.
197 * Animometer/resources/runner/tests.js: Remove international.html.
198 * Animometer/tests/master/international.html: Removed.
199 * Animometer/tests/master/resources/text.js:
200 (animate): Update styling. Manually calculate gradients for the shadow particles.
201 Reduce the step size for y direction to avoid cutting text off at the margins. Increase
202 step for x since there will be a little more room.
203 * Animometer/tests/master/text.html: Add more translations and lay it out in a table.
205 2016-03-20 Jon Lee <jonlee@apple.com>
207 Add a link to show debug data
208 https://bugs.webkit.org/show_bug.cgi?id=155724
210 Reviewed by Simon Fraser.
212 * Animometer/developer.html: Attach the onclick handler to the score.
213 * Animometer/index.html: Ditto.
215 2016-03-18 Dean Jackson <dino@apple.com>
217 Add a basic WebGL test to Animometer
218 https://bugs.webkit.org/show_bug.cgi?id=155475
219 <rdar://problem/25156860>
221 Reviewed by Simon Fraser and Jon Lee.
223 Add a pretty simple WebGL test to Animometer
224 which tries to draw a number of animated triangles.
225 The result still needs a bit of tuning.
227 * Animometer/resources/debug-runner/tests.js: Add a new
228 Suite for "3D" tests.
229 * Animometer/tests/3d/resources/webgl.js: Added.
230 * Animometer/tests/3d/webgl.html: Added.
232 2016-03-18 Jon Lee <jonlee@apple.com>
234 Add support for statically linking to a specific test
235 https://bugs.webkit.org/show_bug.cgi?id=155631
237 Rubber-stamped by Darin Adler.
239 * Animometer/developer.html: Update to call restartBenchmark instead so that it works for
240 both the preset and the manually set test sessions.
241 * Animometer/resources/debug-runner/animometer.css:
242 (.tree .link): Style the "link" UI.
243 * Animometer/resources/debug-runner/animometer.js: Move updateDisplay from suitesManager
244 to optionsManager since this is a visual option and has nothing to do with the suites
245 settings. Update the construction of the test UI by including a "link" after each test.
246 Clicking on that link brings up a JS prompt with a URL and a query string with the current
247 parameters of the controller, and selected test. Pasting this URL into the location bar will
248 automatically start running the selected test.
249 (suitesManager.suitesFromQueryString): Iterate through the Suites and tests and find the one
250 that matches the provided parameters. Returns an object similar to the form in
251 suitesManager.updateLocalStorageFromUI.
252 (benchmarkController.initialize): After settings up the events and options, try parsing the
253 query string and running the benchmark immediately. Otherwise, fall back to the form.
254 (benchmarkController.startBenchmark): Store the options and suites into member variables for
255 reuse in restartBenchmark.
256 (benchmarkController.startBenchmarkImmediatelyIfEncoded): Convert the query string to an object.
257 If that's successful, find the suite and test referenced in the query string. Start the benchmark if
258 the search for the test succeeded.
259 * Animometer/resources/extensions.js:
260 (Utilities.stripNonASCIICharacters): Helper method to convert the name of the suite and test
261 into a query-string-friendly version.
262 (Utilities.convertObjectToQueryString): Helper method to convert an object to query string
264 (Utilities.convertQueryStringToObject): Helper method to convert query string into an object
265 with properties and values.
267 2016-03-16 Jon Lee <jonlee@apple.com>
269 Add a new benchmark test
270 https://bugs.webkit.org/show_bug.cgi?id=155570
272 Reviewed by Simon Fraser.
274 New Leaves test includes various image sizes and opacity.
276 * Animometer/resources/debug-runner/tests.js: Add it to the HTML test suite.
277 * Animometer/tests/dom/leaves.html: Added.
278 * Animometer/tests/dom/resources/leaves.js: Added. Override the
279 (Particle.call.reset): Uses a range of sizes, and opacity.
280 (Particle.call.animate): Opacity goes up then down. When it hits 0, reset the particle.
281 (Particle.call.move): Set transform and opacity.
282 * Animometer/tests/master/resources/leaves.js: Get rid of the closure so that it
283 can be used in this test. Update the relative path so that it works in both the master
286 2016-03-15 Simon Fraser <simon.fraser@apple.com>
288 Add developer Animometer test that bounces P3-tagged images
289 https://bugs.webkit.org/show_bug.cgi?id=155511
291 Reviewed by Tim Horton.
293 Add a test for rendering performance of tagged images. The 5 images are tagged
294 with the Display P3 colorspace.
296 * Animometer/resources/debug-runner/tests.js:
297 * Animometer/tests/bouncing-particles/bouncing-tagged-images.html: Added.
298 * Animometer/tests/bouncing-particles/resources/bouncing-tagged-images.js: Added.
299 * Animometer/tests/bouncing-particles/resources/image1.jpg: Added.
300 * Animometer/tests/bouncing-particles/resources/image2.jpg: Added.
301 * Animometer/tests/bouncing-particles/resources/image3.jpg: Added.
302 * Animometer/tests/bouncing-particles/resources/image4.jpg: Added.
303 * Animometer/tests/bouncing-particles/resources/image5.jpg: Added.
305 2016-03-09 Jon Lee <jonlee@apple.com>
307 Enhance existing Animometer tests
308 https://bugs.webkit.org/show_bug.cgi?id=155261
310 Reviewed by Simon Fraser.
312 * Animometer/tests/master/resources/canvas-tests.js: Add a gradient to
313 the filled circles. To expose more of the gradient, add another circle.
314 (SimpleCanvasStage.call.animate): For each frame, create a gradient with
315 undulating stop points and colors. Fill the circles twice; once with
316 the solid color, and once with the gradient.
318 * Animometer/tests/master/resources/dom-particles.js: Refactor the
319 emission variables into a separate stage for this test. Add a colorOffset
320 variable to make the colors of each particle slightly different, since
321 the ramp controller can add large numbers of particles all at once, which
322 would otherwise get all the same color.
323 * Animometer/tests/master/resources/particles.js:
324 (initialize): Remove the code specific to the SVG mask test.
326 * Animometer/tests/master/resources/image-data.js:
327 (initialize): Remove unused local variable.
328 * Animometer/tests/master/resources/multiply.js:
329 (initialize): Make the test harder by adding more total particles.
331 2016-03-09 Jon Lee <jonlee@apple.com>
334 https://bugs.webkit.org/show_bug.cgi?id=155257
336 Reviewed by Simon Fraser.
338 * Animometer/resources/extensions.js:
339 (UnitBezier.Utilities.createClass): Add a class that computes Bezier points
340 assuming that two of the control points are at (0,0) and (1,1). Taken from
341 WebCore/platform/graphics/UnitBezier.h
342 * Animometer/resources/runner/tests.js: Add a test for English text and one
343 for international text.
344 * Animometer/tests/master/international.html: Added.
345 * Animometer/tests/master/resources/text.js: Added. The test assumes there is
346 #template div which it will copy. The copies are placed behind the template, and
347 are set with different colors each frame. They are moved around with CSS transform.
348 * Animometer/tests/master/text.html: Added.
350 Remove the other text tests, since these ones cover the same techniques.
351 * Animometer/tests/text/layering-text.html: Removed.
352 * Animometer/tests/text/resources/layering-text.js: Removed.
353 * Animometer/tests/text/resources/text-boxes.js: Removed.
354 * Animometer/tests/text/text-boxes.html: Removed.
355 * Animometer/resources/debug-runner/tests.js:
357 2016-03-09 Jon Lee <jonlee@apple.com>
360 https://bugs.webkit.org/show_bug.cgi?id=155232
362 Reviewed by Dean Jackson.
363 Provisionally reviewed by Said Abou-Hallawa.
365 The image test renders PNGs and moves them with translate and rotate
366 transforms. Each particle has a lifetime, and when the lifetime ends or
367 the particle goes offscreen, it resets itself somewhere on the stage.
369 * Animometer/resources/debug-runner/tests.js: Remove the CSS bouncing PNG
370 images test, because this one tests the same technique.
371 * Animometer/resources/runner/tests.js: Added here as "Leaves".
372 * Animometer/tests/master/leaves.html: Added.
373 * Animometer/tests/master/resources/particles.js: Refactor out the parts
374 specific to the DOM particles test. Consequently make velocity a public
376 (initialize): The options parameter is never used, so remove it.
377 (animate): Remove unused local variable.
378 * Animometer/tests/master/resources/leaves.js: Maintains a focal point that
379 moves back and forth across the canvas. That point affects the velocity
380 of the particles. When the focal point is on the leftmost side, it is
381 between [-6, -2], and set in reset(). When the focal point is on the rightmost
382 side, it will be from [2, 6].
383 * Animometer/tests/master/resources/dom-particles.js: Move JS specific to
384 this test here from particles.js.
387 * Animometer/tests/master/resources/compass100.png: Added.
388 * Animometer/tests/master/resources/console100.png: Added.
389 * Animometer/tests/master/resources/contribute100.png: Added.
390 * Animometer/tests/master/resources/debugger100.png: Added.
391 * Animometer/tests/master/resources/inspector100.png: Added.
392 * Animometer/tests/master/resources/layout100.png: Added.
393 * Animometer/tests/master/resources/performance100.png: Added.
394 * Animometer/tests/master/resources/script100.png: Added.
395 * Animometer/tests/master/resources/shortcuts100.png: Added.
396 * Animometer/tests/master/resources/standards100.png: Added.
397 * Animometer/tests/master/resources/storage100.png: Added.
398 * Animometer/tests/master/resources/styles100.png: Added.
399 * Animometer/tests/master/resources/timeline100.png: Added.
401 2016-03-03 Jon Lee <jonlee@apple.com>
403 Add ability to retrieve raw data from release harness
404 https://bugs.webkit.org/show_bug.cgi?id=155026
406 Reviewed by Simon Fraser.
408 * Animometer/developer.html: Remove the special UI in the debug
410 * Animometer/resources/runner/animometer.css: Add styles for the
412 * Animometer/resources/runner/animometer.js: Let 'j' show the JSON
413 results, but only if the overlay doesn't exist. Add 'esc' key to dismiss
415 (window.benchmarkController.selectResults): Cycle the cases around
416 so that the first 's' press selects both the benchmark score and
417 the individual test scores.
418 * Animometer/resources/debug-runner/animometer.css: Remove
420 * Animometer/resources/debug-runner/animometer.js: Make the same
421 call to handleKeyPress.
423 2016-03-03 Jon Lee <jonlee@apple.com>
425 Make sure multiply test particles have at least some opacity
426 https://bugs.webkit.org/show_bug.cgi?id=155027
428 Reviewed by Simon Fraser.
430 * Animometer/tests/master/resources/multiply.js:
431 (initialize): Have the elements spin a little faster to make it
432 more obvious when the system is being stressed.
434 (animate): Make sure each element being animated has at least 1%
437 2016-03-03 Jon Lee <jonlee@apple.com>
440 https://bugs.webkit.org/show_bug.cgi?id=154962
442 Rubber-stamped by Darin Adler.
444 * Animometer/tests/master/image-data.html: Make each canvas have a compositing layer.
445 * Animometer/tests/master/resources/image-data.js:
446 (initialize): Update to load multiple images serially.
448 (tune): Use display instead of visibility. When showing an element anew, move it somewhere else.
449 (_createTestElement): Set up the element, refactor out placement of element to _refreshElement.
450 (_refreshElement): Place element in a tile grid.
452 (_getRandomNeighboringPixelIndex): Use a more conservative distribution to make the effect last a little longer.
453 * Animometer/tests/master/resources/compass.svg: Added.
454 * Animometer/tests/master/resources/console.svg: Added.
455 * Animometer/tests/master/resources/contribute.svg: Added.
456 * Animometer/tests/master/resources/debugger.svg: Added.
457 * Animometer/tests/master/resources/inspector.svg: Added.
458 * Animometer/tests/master/resources/layout.svg: Added.
459 * Animometer/tests/master/resources/performance.svg: Added.
460 * Animometer/tests/master/resources/script.svg: Added.
461 * Animometer/tests/master/resources/shortcuts.svg: Added.
462 * Animometer/tests/master/resources/standards.svg: Added.
463 * Animometer/tests/master/resources/storage.svg: Added.
464 * Animometer/tests/master/resources/styles.svg: Added.
465 * Animometer/tests/master/resources/timeline.svg: Added.
467 2016-03-02 Jon Lee <jonlee@apple.com>
469 Add some new controllers, and refine tests
470 https://bugs.webkit.org/show_bug.cgi?id=154914
472 Reviewed by Simon Fraser.
476 * Animometer/tests/master/focus.html: Move each particle into a layer. Put the particle
477 in a container element. Expand the container element by the max blur radius, and clip
478 overflow. This way, when the blur is applied, it avoids causing layer resizes.
479 * Animometer/tests/master/resources/focus.js:
480 (FocusElement.Utilities.createClass): Create a container element, and put the particle
482 (hide): Set display:none.
483 (show): Set display:block.
484 (animate): Apply filters to the container element.
485 (FocusStage.call.initialize): Instead of inserting and removing elements from the DOM,
486 keep them in the stage, but set the display style instead. Use this._offsetIndex to
487 keep track of which elements are displayed.
488 (FocusStage.call.animate): Move some calculations around to avoid doing unneeded math.
489 (FocusStage.call.getBlurValue): Make sure elements are always blurred.
490 (FocusStage.call.getOpacityValue): Make sure elements have some opacity.
491 * Animometer/tests/master/resources/multiply.js: Have the particles on the edge of the
492 stage appear less black when the complexity gets large enough.
493 (tune): Have this._distanceFactor calculate the factor. Avoid calculating square root each
496 2016-03-02 Jon Lee <jonlee@apple.com>
498 Add some new controllers, and refine tests
499 https://bugs.webkit.org/show_bug.cgi?id=154914
501 Reviewed by Simon Fraser.
503 Add a controller that centers around 30 fps instead of 60 fps.
505 * Animometer/developer.html: Add a new option.
506 * Animometer/resources/debug-runner/animometer.js:
507 * Animometer/resources/runner/animometer.js:
508 (this._processData.findRegression): When calculating the complexity-frameLength regression,
509 check the controller, and use a 30 fps baseline if needed.
510 * Animometer/resources/statistics.js:
511 (Regression.Utilities.createClass): Update to allow clients to specify the baseline
513 * Animometer/tests/resources/main.js:
514 (tune): Override some of the constants in RampController. Move those constants out for
517 Add a fixed controller, with no step.
519 * Animometer/developer.html: Add a controller that takes no step.
520 * Animometer/resources/debug-runner/animometer.js:
521 * Animometer/tests/resources/main.js:
522 (Rotater.Utilities.createClass):
524 Switch to ramp controller as default.
526 * Animometer/developer.html: Increase the test length to 20 seconds.
527 * Animometer/resources/debug-runner/animometer.js: Rename the "adjustment" field to "controller"
528 since that is a more accurate description.
529 * Animometer/resources/debug-runner/graph.js:
530 * Animometer/resources/runner/animometer.js: Update preferences for release suite.
532 2016-02-26 Jon Lee <jonlee@apple.com>
534 Address Dean's comments in 154673.
536 * Animometer/developer.html:
537 * Animometer/resources/debug-runner/animometer.js:
538 * Animometer/resources/debug-runner/graph.js:
540 2016-02-25 Jon Lee <jonlee@apple.com>
542 Update animation benchmark and tests
543 https://bugs.webkit.org/show_bug.cgi?id=154673
545 Reviewed by Dean Jackson.
549 * Animometer/tests/master/resources/canvas-tests.js:
550 (CanvasLineSegment.Utilities.createClass): Line segments near the edge of the stage get clipped.
551 Update circle position and radius to minimize impact.
552 * Animometer/tests/master/resources/particles.js: Get rid of rotating gradient background, and
553 have 3 locations for emitting particles.
554 * Animometer/tests/master/resources/multiply.js: Update distance metric so that fringe tiles get
556 (initialize): Fix some of the math for laying out the tiles.
557 (animate): When a tile isn't used, set visibility: hidden.
559 2016-02-24 Jon Lee <jonlee@apple.com>
561 Update animation benchmark and tests
562 https://bugs.webkit.org/show_bug.cgi?id=154673
564 Reviewed by Dean Jackson.
566 Update the ramp controller.
568 The controller refines the complexity interval to test across.
570 * Animometer/resources/statistics.js: Add functions that estimate cumulative distribution function.
571 (Regression): For the flat regression, force the first segment to be at 60 fps.
572 (valueAt): Add convenience function to return interpolated value based on the regression used.
573 (_calculateRegression): Include the number of points included for both segments, and the piecewise
575 * Animometer/tests/resources/math.js: Make the Kalman estimator subclass Experiment, and allow it
578 * Animometer/tests/resources/main.js: Initialize the tier such that it starts at 10^0 = 1.
579 Increase the number of ramps. Maintain three FPS thresholds-- the frame rate of interest, a limit
580 on the lowest FPS we care to go for later interpolation, and a minimum FPS threshold we want to
581 aim for each ramp. Also keep three estimators: a running average of the change point, a minimum
582 boundary for each ramp, and an estimator for all the frames within an interval. The first two
583 are used to determine the parameters of the next ramp, and the latter allows us to refine the
585 (update): During the tier phase, it is possible that the highest complexity possible for a test
586 won't stress the system enough to trigger stopping the tier phase and transitioning to the ramps.
587 If the complexity doesn't change when going to the next tier, we've maxed the test out, and move
588 on. When the tier phase completed, turn off Controller.frameLengthEstimator, which estimates the
590 (tune): At each interval, look at the confidence distribution of being on the 60 FPS side or the
591 slow side. If the slowest FPS we achieve at the ramp's maximum complexity is not at least
592 _fpsRampSlowThreshold, then increase the maximum complexity. If we ever achieve 60 FPS, increase
593 the ramp's minimum complexity to that level. If, at an even lower complexity, a glitch causes the
594 FPS to drop, we reset the minimum complexity.
596 Have the bootstrap calculation occur between tests. Clean up harness.
598 * Animometer/resources/debug-runner/animometer.js: Run bootstrap after a test has
599 completed to avoid doing all of it at the end before showing the results. Clean up
600 parameters being passed around.
601 * Animometer/resources/debug-runner/tests.js:
603 * Animometer/resources/runner/animometer.js:
604 (this._processData.calculateScore): Save the results to the same object holding the data.
605 (this._processData._processData): In the case where a file is dragged, calculate the score
606 serially. Grab the results object and move it to the results variable and remove it from
607 the data object. This avoids serializing the results into the JSON.
608 (this._processData.findRegression): Include the samples used for bootstrapping. Reduce the
609 resample size to shorten the wait.
610 * Animometer/resources/runner/benchmark-runner.js:
611 * Animometer/resources/statistics.js:
612 (bootstrap): Update how bootstrapData is sorted. In some regression results the mix of
613 floats and integers causes an alphabetical sort to occur.
614 * Animometer/resources/strings.js:
616 Add meta charset so that encodings between harness and test match.
618 * Animometer/tests/bouncing-particles/bouncing-canvas-images.html:
619 * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html:
620 * Animometer/tests/bouncing-particles/bouncing-css-images.html:
621 * Animometer/tests/bouncing-particles/bouncing-css-shapes.html:
622 * Animometer/tests/bouncing-particles/bouncing-svg-images.html:
623 * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html:
624 * Animometer/tests/master/canvas-stage.html:
625 * Animometer/tests/master/focus.html:
626 * Animometer/tests/master/image-data.html:
627 * Animometer/tests/master/multiply.html:
628 * Animometer/tests/master/particles.html:
629 * Animometer/tests/misc/canvas-electrons.html:
630 * Animometer/tests/misc/canvas-stars.html:
631 * Animometer/tests/misc/compositing-transforms.html:
632 * Animometer/tests/simple/simple-canvas-paths.html:
633 * Animometer/tests/simple/tiled-canvas-image.html:
634 * Animometer/tests/template/template-canvas.html:
635 * Animometer/tests/template/template-css.html:
636 * Animometer/tests/template/template-svg.html:
637 * Animometer/tests/text/layering-text.html:
638 * Animometer/tests/text/text-boxes.html:
640 Update test harness reporting.
642 * Animometer/developer.html: Add missing meta charset.
643 * Animometer/index.html: Remove unnecessary utf-8 declaration.
644 * Animometer/resources/debug-runner/animometer.css: Add convenience classes for
645 formatting the results table.
646 * Animometer/resources/debug-runner/animometer.js: Adjust which stats are shown.
647 * Animometer/resources/debug-runner/tests.js: Display bootstrapping statistics.
648 * Animometer/resources/strings.js: Move strings not used by the release harness.
650 Switch to a pseudo-random number generator.
652 * Animometer/resources/statistics.js: Add a Pseudo class, with a simple
653 pseudo-random number generator.
654 (_calculateRegression): Reset the generator before running bootstrap.
655 (bootstrap): Deleted.
657 Replace Math.random with Pseudo.random.
658 * Animometer/tests/master/resources/canvas-tests.js:
659 * Animometer/tests/master/resources/focus.js:
660 * Animometer/tests/master/resources/particles.js:
661 * Animometer/tests/resources/main.js:
663 Use bootstrapping to get confidence interval in the breakpoint.
665 For the ramp controller, calculate the piecewise regression, and then use
666 bootstrapping in order to find the 95% confidence interval. Use the raw data.
668 * Animometer/developer.html: Default to the complexity graph. Add a legend
669 checkbox to toggle visibility of the bootstrap score and histogram.
670 * Animometer/resources/debug-runner/animometer.css: Make some more space to show
671 the old raw and average scores in the legend. Add new styles for the data.
672 * Animometer/resources/debug-runner/graph.js:
673 (_addRegressionLine): Allow passing an array for the variance bar tied to the
674 regression line. Now |stdev| is |range|.
675 (createComplexityGraph): Add bootstrap median, and overlay a histogram of
676 the bootstrap samples. Switch raw samples from circles to X's.
677 (onComplexityGraphOptionsChanged): Allow toggling of the bootstrap data.
678 (onGraphTypeChanged): Move the regressions for the raw and average samples to the
679 legend. In the subtitle use the bootstrap median, and include the 95% confidence
681 * Animometer/resources/runner/animometer.js:
682 (this._processData.findRegression): Factor out the code that determines which
683 samples to include when calculating the piecewise regression. For series that have
684 many samples, or a wider range of recorded complexities, throw away the 2.5%
685 lowest and highest samples before calculating the regression. Keep all samples
686 if the number of samples to regress is small or the range of complexities is
688 (this._processData._calculateScore): Factor out regression calculation to
689 findRegression(). Bootstrap the change point of the regression. The score is the
691 * Animometer/resources/statistics.js:
692 (_calculateRegression): Correct an issue in the calculation of the regression, where
693 the denominator can be 0.
694 (bootstrap): Template for bootstrapping. Create a bootstrap sample array, Create
695 re-samples by random selection with replacement. Return the 95% confidence samples,
696 the bootstrap median, mean, and the data itself.
697 * Animometer/resources/strings.js: Add bootstrap.
698 * Animometer/tests/resources/main.js:
699 (processSamples): Don't prematurely cut the sample data.
703 * Animometer/resources/debug-runner/animometer.js: Add spacing in the JSON output.
704 Multiple tests output a lot of JSON and can hang when selecting JSON with no whitespace.
705 * Animometer/resources/debug-runner/animometer.css:
706 (#complexity-graph .series.raw circle): Update the color.
707 * Animometer/resources/debug-runner/graph.js: Use the FPS axis instead of the
708 complexity axis, which can vary in domain. For determining the complexity domain,
709 only use samples after samplingTimeOffset.
711 Allow dropping results JSON.
713 * Animometer/developer.html: Add a button.
714 * Animometer/resources/debug-runner/animometer.css:
715 * Animometer/resources/debug-runner/animometer.js: Read the data and go straight
716 to the dashboard. With JSON output, write out only the options and the raw data.
718 Teach the harness to evaluate the samples and determine the test score.
720 This will allow us to update how the score is calculated separately from the samples recorded.
721 This also prepares the harness to be able to accept JSON of prior runs.
723 * Animometer/resources/strings.js: Clean up and remove unneeded strings and reduce some of the
725 * Animometer/resources/debug-runner/tests.js: Update to use the new strings.
727 * Animometer/tests/resources/main.js: Allow all controllers to show a complexity-FPS graph.
728 (_processComplexitySamples): Factor out some of the sample processing done in the ramp
729 controller for the benefit of the other controllers. |complexitySamples| contains a list of
730 samples. Sort the samples by complexity. Optionally remove the top x% of samples.
731 Group them, and calculate distribution of samples within the same complexity, and add those as
732 new entries into |complexityAverageSamples|.
733 (Controller.processSamples): Move the code responsible for determining the complexity and FPS
734 scores out to ResultsDashboard. The structure of the data returned by the controller is:
737 controller: [time-regression, time-regression, ...], // optional, data specific to controller
739 samples: { // all of the sample data
741 complexity: [...], // processed from controller samples
742 complexityAverage: [...], // processed from complexity samples
746 (AdaptiveController.processSamples): Adding the target frame length is no longer necessary; we
747 now pass the test options to the graph.
748 (Regression): Move to statistics.js.
749 * Animometer/resources/statistics.js: Move Regression to here. Add a check if the sampling range
750 only contains one sample, since we cannot calculate a regression from one sample point.
752 Teach the test harness to evaluate the data.
753 * Animometer/resources/runner/animometer.js:
754 (ResultsDashboard): Store the options used to run the test and the computed results/score separately
755 from the data. The results are stored as:
758 score: /* geomean of iteration score */,
761 score: /* geomean of tests */,
771 frameLength: { ... },
778 complexityAverage: { ... }
785 { ...next iteration... }
789 * Animometer/resources/debug-runner/animometer.js: Pass options around instead of relying
790 on what was selected in the form. This will later allow for dropping previous results, and
791 using those runs' options when calculating scores.
792 (ResultsTable._addGraphButton): Simplify button action by using attached test data.
793 * Animometer/resources/debug-runner/graph.js: Refactor to use the data.
795 Consolidate JS files, and move statistics out to a separate JS.
797 Preparation for having the Controller only handle recording and storage of the samples,
798 and leave the evaluation of the test score out to the harness. Move Experiment to
799 a new statistics.js, where Regression will also eventually go. Get rid of algorithm.js
800 and move it to utilities.js since the Heap is used only for Experiments.
802 * Animometer/tests/resources/algorithm.js: Removed. Heap is in utilities.js.
803 * Animometer/tests/resources/sampler.js: Removed. Experiment is in statistics.js,
805 * Animometer/tests/resources/main.js: Move Sampler here.
806 * Animometer/resources/statistics.js: Added. Move Statistics and Experiment here.
807 * Animometer/resources/extensions.js: Move Heap here. Attach static method to create
808 a max or min heap to Heap, instead of a new Algorithm object.
811 * Animometer/developer.html:
812 * Animometer/index.html:
813 * Animometer/tests/bouncing-particles/bouncing-canvas-images.html:
814 * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html:
815 * Animometer/tests/bouncing-particles/bouncing-css-images.html:
816 * Animometer/tests/bouncing-particles/bouncing-css-shapes.html:
817 * Animometer/tests/bouncing-particles/bouncing-svg-images.html:
818 * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html:
819 * Animometer/tests/master/canvas-stage.html:
820 * Animometer/tests/master/focus.html:
821 * Animometer/tests/master/image-data.html:
822 * Animometer/tests/master/multiply.html:
823 * Animometer/tests/master/particles.html:
824 * Animometer/tests/misc/canvas-electrons.html:
825 * Animometer/tests/misc/canvas-stars.html:
826 * Animometer/tests/misc/compositing-transforms.html:
827 * Animometer/tests/simple/simple-canvas-paths.html:
828 * Animometer/tests/simple/tiled-canvas-image.html:
829 * Animometer/tests/template/template-canvas.html:
830 * Animometer/tests/template/template-css.html:
831 * Animometer/tests/template/template-svg.html:
832 * Animometer/tests/text/layering-text.html:
833 * Animometer/tests/text/text-boxes.html:
835 Fix the cursor in the graph analysis when the min
838 * Animometer/resources/debug-runner/graph.js:
840 (createComplexityGraph):
842 2016-02-23 Geoffrey Garen <ggaren@apple.com>
844 Fix some issues in MallocBench
845 https://bugs.webkit.org/show_bug.cgi?id=154600
847 Reviewed by Oliver Hunt.
849 * MallocBench/MallocBench.xcodeproj/project.pbxproj: Make nimlang.ops
850 a part of the build so that it copies to the right place for execution.
852 * MallocBench/MallocBench/Interpreter.cpp:
853 (Interpreter::Interpreter): Don't try to open .ops files for writing
854 because we're only going to read and we might need extra permissions to
857 (Interpreter::~Interpreter): Give more context when opening a file fails
858 to help with debugging.
860 * MallocBench/MallocBench/stress.cpp:
861 (benchmark_stress): Reduce iterations to complete in less than 10 seconds.
863 2016-02-23 Michael Saboff <msaboff@apple.com>
865 Unreviewed change to revert extraneous changes made part of change set 196955.
867 * MallocBench/MallocBench/Interpreter.cpp:
868 (Interpreter::doMallocOp):
869 (Interpreter::Thread::switchTo):
870 (writeData): Deleted.
872 2016-02-19 Michael Saboff <msaboff@apple.com>
874 MallocBench: Added recording for nimlang website, new recording details and added new options
875 https://bugs.webkit.org/show_bug.cgi?id=154485
877 Reviewed by Geoff Garen.
879 Added new capabilities to MallocBench. These include:
880 Added a recording of http://nim-lang.org/docs/lib.html.
881 Added thread id to the recording and the ability to playback switching threads in MallocBench
882 Added aligned allocations to recordings and the ability to playback
883 Added --use-thread-id option to honor recorded thread ids
884 Added --detailed-report to output remaining allocations by size after playback
885 Added --no-warmup to not run the warm up iteration
887 Changed the way that options are passed down to the benchmarks. Instead of passing individual
888 boolean or numeric option values, just pass a reference the CommandLine itself. Each benchmark
889 can access the options that are appropriate. The Benchmark class also uses the options for
890 is parallel, run counts and warm up.
892 Added thread id and aligned malloc to the Op by noticing that structure padding and Opcode allowed
893 for another 32 bits of data. Breaking that unused 32 bits into a 16 bit thread id value and a
894 16 bit log base 2 of the alignment for aligned malloc allowed for existing recordings to playback
895 without any incompatibilities.
897 Threaded operation is simulated by creating threads as needed. As long as the next Op's thread id
898 is the same as the last, operation continues as normal. When the next Op has a different thread id,
899 we switch to that thread using the shared Op stream to continue playing back. There is a mutex to
900 assure that only one thread is really running at a time and a condition variable used to wait
901 that the current thread id matches each block thread's thread id. This doesn't simulate true
902 concurrent threading, but is instead plays back Ops recorded for multiple thread faithfully.
904 * MallocBench/MallocBench.xcodeproj/project.pbxproj:
905 * MallocBench/MallocBench/Benchmark.cpp:
907 (Benchmark::Benchmark):
908 (Benchmark::runOnce):
910 * MallocBench/MallocBench/Benchmark.h:
911 (Benchmark::isValid):
912 * MallocBench/MallocBench/CommandLine.cpp:
913 (CommandLine::printUsage):
914 * MallocBench/MallocBench/CommandLine.h:
915 (CommandLine::isValid):
916 (CommandLine::benchmarkName):
917 (CommandLine::isParallel):
918 (CommandLine::useThreadID):
919 (CommandLine::detailedReport):
920 (CommandLine::warmUp):
921 (CommandLine::heapSize):
923 * MallocBench/MallocBench/Interpreter.cpp:
924 (Interpreter::Interpreter):
926 (Interpreter::readOps):
927 (Interpreter::doOnSameThread):
928 (Interpreter::switchToThread):
929 (Interpreter::detailedReport):
932 (Interpreter::doMallocOp):
933 (Interpreter::Thread::Thread):
934 (Interpreter::Thread::stop):
935 (Interpreter::Thread::~Thread):
936 (Interpreter::Thread::runThread):
937 (Interpreter::Thread::waitToRun):
938 (Interpreter::Thread::switchTo):
939 * MallocBench/MallocBench/Interpreter.h:
940 (Interpreter::Thread::isMainThread):
941 * MallocBench/MallocBench/alloc_free.cpp: Added.
942 (benchmark_alloc_free):
943 * MallocBench/MallocBench/alloc_free.h: Added.
944 * MallocBench/MallocBench/balloon.cpp:
946 * MallocBench/MallocBench/balloon.h:
947 * MallocBench/MallocBench/big.cpp:
949 * MallocBench/MallocBench/big.h:
950 * MallocBench/MallocBench/churn.cpp:
952 * MallocBench/MallocBench/churn.h:
953 * MallocBench/MallocBench/facebook.cpp:
954 (benchmark_facebook):
955 * MallocBench/MallocBench/facebook.h:
956 * MallocBench/MallocBench/flickr.cpp:
958 (benchmark_flickr_memory_warning):
959 * MallocBench/MallocBench/flickr.h:
960 * MallocBench/MallocBench/fragment.cpp:
962 (benchmark_fragment):
963 (benchmark_fragment_iterate):
964 * MallocBench/MallocBench/fragment.h:
965 * MallocBench/MallocBench/list.cpp:
966 (benchmark_list_allocate):
967 (benchmark_list_traverse):
968 * MallocBench/MallocBench/list.h:
969 * MallocBench/MallocBench/main.cpp:
971 * MallocBench/MallocBench/medium.cpp:
973 * MallocBench/MallocBench/medium.h:
974 * MallocBench/MallocBench/memalign.cpp:
976 (benchmark_memalign):
977 * MallocBench/MallocBench/memalign.h:
978 * MallocBench/MallocBench/message.cpp:
979 (benchmark_message_one):
980 (benchmark_message_many):
981 * MallocBench/MallocBench/message.h:
982 * MallocBench/MallocBench/nimlang.cpp: Added.
984 * MallocBench/MallocBench/nimlang.h: Added.
985 * MallocBench/MallocBench/nimlang.ops: Added.
986 * MallocBench/MallocBench/realloc.cpp:
988 * MallocBench/MallocBench/realloc.h:
989 * MallocBench/MallocBench/reddit.cpp:
991 (benchmark_reddit_memory_warning):
992 * MallocBench/MallocBench/reddit.h:
993 * MallocBench/MallocBench/stress.cpp:
996 * MallocBench/MallocBench/stress.h:
997 * MallocBench/MallocBench/stress_aligned.cpp:
998 (benchmark_stress_aligned):
999 * MallocBench/MallocBench/stress_aligned.h:
1000 * MallocBench/MallocBench/theverge.cpp:
1001 (benchmark_theverge):
1002 (benchmark_theverge_memory_warning):
1003 * MallocBench/MallocBench/theverge.h:
1004 * MallocBench/MallocBench/tree.cpp:
1005 (benchmark_tree_allocate):
1006 (benchmark_tree_traverse):
1007 (benchmark_tree_churn):
1008 * MallocBench/MallocBench/tree.h:
1009 * MallocBench/run-malloc-benchmarks:
1011 2016-02-11 Jon Lee <jonlee@apple.com>
1013 Fix a missing refactoring.
1015 * Animometer/tests/master/resources/multiply.js:
1016 (animate): Move to Utilities.lerp.
1019 2016-02-10 Jon Lee <jonlee@apple.com>
1021 Add new benchmark tests.
1022 https://bugs.webkit.org/show_bug.cgi?id=154063
1024 Provisionally reviewed by Said Abou-Hallawa.
1026 Add tests for get/put image data, filters, opacity, and css transforms.
1028 * Animometer/resources/runner/benchmark-runner.js:
1029 (_runBenchmarkAndRecordResults): Update the body background color to match that of
1031 (this._runNextIteration): Clear the background color style for the results page.
1032 * Animometer/resources/runner/tests.js:
1033 * Animometer/tests/master/focus.html: Added.
1034 * Animometer/tests/master/image-data.html: Added.
1035 * Animometer/tests/master/multiply.html: Added.
1036 * Animometer/tests/master/resources/focus.js: Added.
1037 * Animometer/tests/master/resources/image-data.js: Added.
1038 * Animometer/tests/master/resources/multiply.js: Added.
1039 * Animometer/tests/master/resources/stage.css: Move common styles out.
1040 * Animometer/tests/resources/main.js: Update Stage.randomBool to use Math.random.
1041 Add Stage.randomSign for randomly setting a direction. Add the notion of the
1042 current timestamp of the test to Benchmark, since some animations cycle through
1043 colors and rely on an incremental counter like the time.
1045 2016-02-09 Said Abou-Hallawa <sabouhallawa@apple.com>
1047 Add internal benchmark tests for CSS mix-blend-modes and filters
1048 https://bugs.webkit.org/show_bug.cgi?id=154058
1050 Provisionally reviewed by Jon Lee.
1052 * Animometer/resources/debug-runner/tests.js: Include the new tests in the
1053 "HTML suite" of the debug runner.
1055 * Animometer/resources/extensions.js:
1056 (Utilities.browserPrefix):
1057 (Utilities.setElementPrefixedProperty): Utility functions to allow setting
1058 prefixed style properties.
1060 * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
1061 Set the mix-blend-mode and the filter to some random values if the options
1062 of the test requested that.
1064 * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
1065 (parseShapeParameters): Parse the url options "blend" and "filter" and set
1066 the corresponding flags.
1068 * Animometer/tests/resources/main.js:
1069 (randomStyleMixBlendMode):
1070 (randomStyleFilter): Return random mix-blend-mode and filter.
1072 2016-02-08 Jon Lee <jonlee@apple.com>
1074 Add a ramp controller
1075 https://bugs.webkit.org/show_bug.cgi?id=154028
1077 Provisionally reviewed by Said Abou-Hallawa.
1079 Enhance the graph to include a complexity-fps graph, in addition
1082 * Animometer/developer.html: Add a ramp option.
1083 * Animometer/resources/debug-runner/animometer.css: Update the style.
1084 * Animometer/resources/strings.js: Flatten the Strings.text constants.
1085 * Animometer/resources/debug-runner/animometer.js:
1086 (ResultsTable.call._addGraphButton): Refactor.
1087 (ResultsTable.call._addTest): Add regression data.
1088 (benchmarkController): Add a form that allows the user to switch between the two forms,
1089 Add a form that allows the user to toggle different data. Hide certain header columns
1090 depending on the selected controller.
1091 * Animometer/resources/debug-runner/graph.js: Add the complexity regressions.
1092 * Animometer/resources/debug-runner/tests.js: Add headers for the ramp results.
1093 * Animometer/resources/runner/animometer.js:
1094 (ResultsTable): If a header is disabled don't include them in _flattenedHeaders.
1095 * Animometer/tests/resources/main.js:
1096 (Controller): Allow options to specify the capacity for sample arrays.
1097 (Regression): A piecewise regression that tries to fit a slope and a flat profile.
1098 (_calculateRegression): Options can fix the slope and bias when calculating the minimal
1099 error. Sweep across the samples in time (which could be backward depending on the controller)
1100 and calculate the intersection point.
1101 (RampController): This controller assumes that the target frame rate is below
1102 58 FPS. It runs in two stages. The first stage quickly determines the order of
1103 magnitude of objects needed to stress the system by the setting the complexity
1104 to increasingly difficult tiers. Perform a series of ramps descending from a
1105 high-water mark of complexity. The complexity needed to reach the target frame
1106 length is done by performing a piecewise regression on each ramp, and track a
1107 running average of these values. For the next ramp, make that running average
1108 the center of the ramp. With a minimum complexity of 0, the high-water mark is
1109 twice that average. The score is based on the highest complexity that can
1112 2016-02-08 Jon Lee <jonlee@apple.com>
1114 Address Said's comments on the benchmark, and do some clean up.
1116 * Animometer/developer.html:
1117 * Animometer/resources/debug-runner/animometer.css: Add styles for averages.
1118 * Animometer/resources/debug-runner/animometer.js: Use the right
1120 * Animometer/resources/debug-runner/graph.js:
1121 (_addRegressionLine): Add missing code to draw the line and standard
1122 deviation highlight.
1123 (onGraphTypeChanged): Remove unneeded variables
1124 (onTimeGraphOptionsChanged):
1125 * Animometer/resources/runner/benchmark-runner.js:
1126 (_runBenchmarkAndRecordResults): Rename samplers to suiteResults and
1127 _suitesSamplers to _suitesResults.
1128 * Animometer/tests/resources/main.js:
1129 (results): Call processSamples().
1130 (update): Change sampling timestamp comparison.
1131 (_animateLoop): Move shouldStop call to before the update.
1132 * Animometer/tests/resources/sampler.js:
1133 (process): Rename to processSamples().
1135 2016-02-07 Jon Lee <jonlee@apple.com>
1137 Teach Controller to measure intervals, and turn off the frame length estimator.
1139 * Animometer/tests/resources/main.js: Default interval length is 100 ms.
1140 (start): Set the first interval.
1141 (_measureAndResetInterval): Reports the average frame length of the interval that just
1142 completed, and sets up the next interval.
1143 (update): If there is no length, then just use the estimator per frame, otherwise the
1144 estimator measures per interval. Add a didFinishInterval for subclasses to process
1145 prior to recording the sample. Update tune() to include whether an interval had
1147 (StepController): Step controllers don't measure on an interval basis.
1149 2016-02-07 Jon Lee <jonlee@apple.com>
1151 Minor refactoring. Rename Controller._estimator to Controller._frameLengthEstimator
1152 and switch the parameters for start(), update(), and tune(), so that the timestamp
1153 is first and stage is second.
1155 * Animometer/tests/resources/main.js:
1157 2016-02-07 Jon Lee <jonlee@apple.com>
1159 Move ResultsTable functionality not needed for release tests out.
1160 Move reporting of score and mean to selection of the time-based graph.
1162 * Animometer/developer.html: Rename graph-options to time-graph-options.
1163 * Animometer/resources/debug-runner/animometer.js:
1164 (DeveloperResultsTable): Moved from runner/animometer.js. Switch from mean
1165 values to "average" objects which can hold stdev. Move graph button and
1166 calculation of noisy measurements here. Sophisticated header processing
1167 is not needed in release suite.
1168 (populateTable): Use DeveloperResultsTable.
1169 * Animometer/resources/debug-runner/graph.js: Pull time graph creation to
1170 its own function, and add a new onGraphTypeChanged handler in preparation
1171 of a complexity graph to be added later.
1172 * Animometer/resources/runner/animometer.js:
1173 (ResultsTable): Simplify to just handle test names and scores.
1175 2016-02-07 Jon Lee <jonlee@apple.com>
1177 Tests: reuse objects already made.
1179 Avoid thrash of object creation and removal by maintaining an index that
1180 moves along the array as the adjust values change. If the tune value
1181 requires more objects than the maximum size of the object array, then create
1182 new objects. This means that the object array size never decreases.
1184 * Animometer/tests/master/resources/canvas-stage.js: Maintain a separate
1185 offsetIndex. For these tests, we want to avoid drawing the oldest objects,
1186 so the scene will draw the object at offsetIndex to the end of the array.
1187 (tune): Reverse the logic since "removal" of objects is much simpler and
1188 involves simply changing the offsetIndex.
1189 (animate): Update the for loop to draw from offsetIndex to the end.
1190 (complexity): Update the definition.
1191 * Animometer/tests/master/resources/canvas-tests.js: Maintain a separate
1192 offsetIndex. For these tests, we want to avoid drawing the newest objects,
1193 so the scene will draw the object at index 0 to the object at offsetIndex.
1194 (SimpleCanvasStage.animate): Fly-by removal of local stage variable,
1195 which is unneeded. Update the for loop to draw from offsetIndex to the end.
1196 * Animometer/tests/simple/resources/simple-canvas-paths.js:
1197 (SimpleCanvasStage.animate): Update the for loop to draw from 0 to
1199 * Animometer/tests/simple/resources/simple-canvas.js:
1200 (tune): Update logic. Here, offsetIndex represents the boundary of the last
1202 (animate): Update the for loop to draw from 0 to offsetIndex.
1203 (complexity): Update the definition.
1205 2016-02-07 Jon Lee <jonlee@apple.com>
1207 Tests: refactor and update styles.
1209 * Animometer/tests/resources/main.js: Add helper methods that return
1210 a color that hue rotates based on the date, and a counter value that
1211 increases based on the date. Fix randomInt() to not bias against the min and
1214 * Animometer/tests/master/resources/canvas-tests.js: Use new helper methods.
1215 * Animometer/tests/master/resources/dom-particles.js: Ditto.
1216 * Animometer/tests/master/resources/particles.js: Ditto.
1217 * Animometer/tests/simple/resources/simple-canvas-paths.js: Refactor to
1218 use a rotating color instead of a random color. The fast switching of color
1219 is too vivid to watch.
1221 * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
1222 (BouncingSvgParticlesStage.call.createGradient): Fix the gradient so
1223 that the last stop is located at the end.
1225 2016-02-07 Jon Lee <jonlee@apple.com>
1227 Refactor tune() to not return the complexity of the scene.
1229 We have stage.complexity() now, so returning the complexity through tune
1232 * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
1233 * Animometer/tests/master/resources/canvas-stage.js:
1234 * Animometer/tests/master/resources/particles.js:
1235 * Animometer/tests/misc/resources/canvas-electrons.js:
1236 * Animometer/tests/misc/resources/canvas-stars.js:
1237 * Animometer/tests/resources/main.js:
1238 * Animometer/tests/simple/resources/simple-canvas.js:
1239 * Animometer/tests/simple/resources/tiled-canvas-image.js:
1240 * Animometer/tests/template/resources/template-canvas.js:
1241 * Animometer/tests/template/resources/template-css.js:
1242 * Animometer/tests/template/resources/template-svg.js:
1243 * Animometer/tests/text/resources/layering-text.js:
1245 2016-02-07 Jon Lee <jonlee@apple.com>
1247 Make the fixed controller a step controller instead. Halfway through the test
1248 it will bump up the complexity 4-fold. Calculate the step timestamp using options
1249 instead of a separate parameter to the Controller constructor.
1251 * Animometer/developer.html: Change value to "step"
1252 * Animometer/resources/debug-runner/animometer.js:
1253 (window.suitesManager.updateEditsElementsState): Show number inputs when set to "step".
1254 * Animometer/tests/resources/main.js:
1255 (update): Provide a hook for subclasses to tune.
1256 (StepController): Maintain a flag determining whether we've stepped, and the time
1258 (Benchmark): Use the new StepController.
1260 2016-02-07 Jon Lee <jonlee@apple.com>
1262 Adjust the FPS graph scale.
1264 Instead of making the FPS graph linearly scale, scale it based on the frame length,
1265 but show the data in terms of FPS. Because it is inversely proportional, and most
1266 of the data never gets below 20, concentrate the axis from 20-60 FPS, since otherwise
1267 over half of the available graph space ends up blank.
1269 This means we should convert all of the FPS data to frame length data.
1271 * Animometer/resources/debug-runner/graph.js: Update the domain to be based on
1272 frame length in milliseconds instead of FPS. Update the cursor to consider all of the
1273 values being shown, and then pick the min and max values to represent the length of the
1275 * Animometer/resources/runner/animometer.js:
1276 * Animometer/resources/strings.js:
1277 * Animometer/tests/resources/main.js:
1278 (processSamples): Add the ability to only sample a range of the data instead of everything
1279 after an offset index. Update sampler to record the frame lengths instead of the frame
1282 2016-02-07 Jon Lee <jonlee@apple.com>
1284 Add option to use different methods for retrieving a timestamp.
1286 * Animometer/developer.html: Add performance.now and Date.now options.
1287 * Animometer/resources/runner/animometer.js: Default to performance.now.
1288 (window.benchmarkController.startBenchmark):
1289 * Animometer/tests/resources/main.js: Tie the desired method to _getTimestamp.
1290 (run): Use _getTimestamp.
1291 (_animateLoop): Ditto.
1293 2016-02-07 Jon Lee <jonlee@apple.com>
1295 Allow adding any number of markers to the graph. The markers can be labeled
1296 and contain timestamp and sample index data. Make it a part of the controller
1297 rather than keeping it in the sampler.
1299 * Animometer/resources/debug-runner/animometer.css: Add styles for markers
1300 * Animometer/resources/debug-runner/graph.js: Create the markers and add
1302 * Animometer/resources/runner/animometer.js: Assume the samplingTimeOffset
1303 is just one of the marks provided.
1304 * Animometer/resources/strings.js: Add Strings.json.marks.
1305 * Animometer/tests/resources/main.js:
1306 (Controller): Keep marks here. They are keyed by the marker name, so no two
1307 markers should have the same name.
1308 (recordFirstSample): Refactor to use mark.
1309 (mark): Allows for arbitrary data if needed later. The timestamp maintained
1310 is relative to the absolute start timestamp.
1311 (containsMark): Checks whether a mark with a specific comment exists.
1312 (processSamples): Removes the _startTimestamp offset from the marks before
1313 setting it in results.
1314 * Animometer/tests/resources/sampler.js: Remove marks.
1316 2016-02-07 Jon Lee <jonlee@apple.com>
1318 Get rid of options member variable in Benchmark.
1320 Options are only needed when initializing the stage or benchmark, so there's no
1321 need to also keep a reference to it.
1323 * Animometer/tests/resources/main.js: Get rid of options variable in Benchmark.
1324 Pass options to Controllers and Stages.
1325 (Controller.Utilities.createClass):
1326 (Benchmark.Utilities.createClass):
1327 (get options): Deleted.
1329 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js:
1330 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
1331 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
1332 * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
1333 * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
1334 * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
1335 * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
1336 * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
1337 * Animometer/tests/master/resources/canvas-stage.js:
1338 * Animometer/tests/master/resources/canvas-tests.js:
1339 * Animometer/tests/master/resources/particles.js:
1340 * Animometer/tests/misc/resources/canvas-electrons.js:
1341 * Animometer/tests/misc/resources/canvas-stars.js:
1342 * Animometer/tests/misc/resources/compositing-transforms.js:
1343 * Animometer/tests/simple/resources/simple-canvas-paths.js:
1344 * Animometer/tests/simple/resources/tiled-canvas-image.js:
1345 * Animometer/tests/template/resources/template-canvas.js:
1346 * Animometer/tests/template/resources/template-css.js:
1347 * Animometer/tests/template/resources/template-svg.js:
1348 * Animometer/tests/text/resources/layering-text.js:
1350 2016-02-07 Jon Lee <jonlee@apple.com>
1352 Update how the benchmark is run
1353 https://bugs.webkit.org/show_bug.cgi?id=153960
1355 Provisionally reviewed by Said Abou-Hallawa.
1357 Introduce the notion of a Controller. It is responsible for recording, updating,
1358 and processing the statistics and complexity of the benchmark. This allows
1359 plugging in different Controllers.
1361 This strips most of the functionality from Animator and BenchmarkState, so fold
1362 what's left into Benchmark. Now, Benchmarks only own a stage and a controller, but
1363 are responsible for driving the animation loop.
1365 Rewrite Animator._shouldRequestAnotherFrame into two different Controllers. One
1366 maintains a fixed complexity, and the other adapts the complexity to meet a
1369 Fix the Kalman estimator to be modeled on a scalar variable with no model.
1371 * Animometer/tests/resources/main.js: Remove BenchmarkState and Animator, and
1372 replace it with a Controller. Add a FixedController and refactor the previous controller
1373 to an AdaptiveController.
1375 (Controller): Controllers own the estimator and the sampler. When a new frame is
1376 displayed, the animation loop calls update(). The estimator and sampler record
1377 stats, then tune. Samplers can track multiple series of data. The basic controller
1378 tracks timestamp, complexity, and estimated frame rate.
1379 The Kalman estimation is based on the frame length rather than the frame
1380 rate. Because FPS is inverse proportional to frame length, in the case where the measured
1381 frame length is very small, the FPS ends up being a wildly large number (in the order of
1382 600-1000 "FPS"), and it pulls the estimator up drastically enough that it takes a while
1383 for it to settle back down. Using frame length reduces the impact of these spikes.
1384 Converging the estimation takes enough time to avoid initializing it immediately
1385 when the benchmark starts. Instead, the benchmark runs for a brief period of time (100ms)
1386 before running it in earnest. Allow controllers an opportunity to set the complexity
1387 before starting recording.
1388 When the benchmark is complete, the controller has an opportunity to process
1389 the samples. The default implementation calculates the raw FPS based on the time
1390 difference of the samples, and calculates the complexity score. This is moved from
1391 Benchmark.processSamples.
1393 (Controller): Initialize timestamps. These are at first relative to the start of the
1394 benchmark, but are offset by the absolute start time during start(). By default maintain
1395 3 data series, but subclasses can override.
1396 (start): Calls recordFirstSample() for subclasses to override if needed.
1397 (recordFirstSample): For basic controller, start sampling at the beginning.
1398 (update): Update the frame length estimator and sample.
1399 (shouldStop): Checks that the time is before _endTimestamp.
1400 (results): Returns the processed samples.
1401 (processSamples): Iterate through the sample data and collate them. Include scores.
1403 (FixedComplexityController): Controller that tunes the stage to the desired complexity
1404 prior to starting, and keeps it at that complexity.
1406 (AdaptiveController): Have the estimator estimate the interval frame rate instead of the
1408 The previous version of this controller ignored the frame that came after the
1409 adjustment. The raw FPS show that whatever noise the scene change adds is negligible
1410 compared to the noise of the system overall. Stop ignoring that frame and include all
1411 frames in the measurements.
1413 (Benchmark): Remove dependency on animator, and instantiate a runner based on what is
1414 selected. Most of the loop's functionality is in Controller, so remove here.
1415 (Benchmark.run): Remove start() since it is only called from run(), and fold it in here.
1416 (Benchmark._animateLoop): Fold in from Animator.animateLoop. Let the benchmark run for
1417 a brief period before calling Controller.start().
1419 * Animometer/tests/resources/math.js: Fix the Kalman estimator. The filter estimates
1420 a scalar variable, and makes basic assumptions regarding the model. As a result
1421 none of the linear algebra classes are needed, so remove Matrix, Vector3, and Matrix3.
1422 (SimpleKalmanEstimator): Calculate the gain based on the provided process and
1424 (KalmanEstimator): Deleted.
1425 (IdentityEstimator): Deleted.
1426 (PIDController): Refactor to use the Utilities.createClass() helper.
1428 The Kalman filter algorithm is explained here http://greg.czerniak.info/guides/kalman1/.
1429 The state, represented by a scalar, is the estimated frame length. There is no user
1430 transition of the state, and the state is the same as the measurement. With this model,
1431 the estimation error converges, so calculate the gain ahead of time.
1433 * Animometer/developer.html: Remove fixed-after-warmup since it is not useful.
1434 Replace the option to toggle the estimator, and make it possible to customize the
1435 estimator's error parameters. Show raw FPS by default, and remove interval FPS,
1436 which will be shown instead of the filtered raw FPS.
1437 * Animometer/resources/debug-runner/animometer.css: Put the header behind the graph.
1438 Remove #intervalFPS rules; move the color to #filteredFPS.
1439 * Animometer/resources/debug-runner/graph.js:
1440 (updateGraphData): Update the hr style to force the layout to be calculated
1441 correctly. Change the tick format to be in terms of seconds, since the timestamps
1442 are in milliseconds. Remove interval data.
1443 * Animometer/resources/runner/animometer.js:
1444 (window.benchmarkController.startBenchmark): Set Kalman parameters.
1445 * Animometer/resources/runner/benchmark-runner.js:
1446 (_runBenchmarkAndRecordResults): When a benchmark completes, expect it to return
1447 the final data, rather than passing a sampler from the controller. This avoids
1448 needing to expose the sampler variable in the benchmark.
1449 * Animometer/tests/resources/sampler.js:
1450 (process): Move the setting of the target frame rate to AdaptiveController.
1452 2016-02-06 Jon Lee <jonlee@apple.com>
1454 Code clean up: Move Rotater function closer to Stage static methods.
1455 The Rotater is used together with those methods; keep them close.
1457 * Animometer/tests/resources/main.js:
1459 2016-02-06 Jon Lee <jonlee@apple.com>
1461 Update the JS includes due to ResultsTable move.
1463 * Animometer/developer.html:
1464 * Animometer/index.html:
1466 2016-02-06 Jon Lee <jonlee@apple.com>
1468 Move createElement and createSVGElement to Utilities.
1470 * Animometer/resources/extensions.js:
1471 (Utilities.createElement): Added.
1472 (Utilities.createSVGElement): Added.
1473 (DocumentExtension.createElement): Deleted.
1474 (DocumentExtension.createSvgElement): Deleted.
1476 * Animometer/resources/debug-runner/animometer.js:
1477 * Animometer/resources/runner/animometer.js:
1478 * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
1479 * Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js:
1480 * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
1482 2016-02-06 Jon Lee <jonlee@apple.com>
1484 Add a convenience function for creating a class.
1486 The pattern for creating a class is common enough to add as a Utilities
1487 helper function. It also makes it easy to collapse class definitions when
1490 * Animometer/resources/debug-runner/animometer.js: Move ProgressBar definition,
1491 since it is only used here.
1492 * Animometer/resources/runner/animometer.js: Move ResultsDashboard and
1493 ResultsTable definition, since it is only used here.
1494 * Animometer/resources/extensions.js: Move Utilities definition to the top. Convert
1495 Point, Insets, SimplePromise.
1496 (ProgressBar): Moved to animometer.js.
1497 (ResultsDashboard): Moved to animometer.js.
1498 (ResultsTable): Moved to animometer.js.
1499 * Animometer/resources/runner/benchmark-runner.js: Convert BenchmarkRunnerState,
1501 * Animometer/tests/resources/main.js: Convert Rotater, Stage, Animator, Benchmark.
1502 * Animometer/tests/resources/sampler.js: Convert Experiment, Sampler.
1504 Convert test primitives.
1505 * Animometer/tests/master/resources/canvas-tests.js: Convert CanvasLineSegment,
1506 CanvasArc, CanvasLinePoint.
1507 * Animometer/tests/simple/resources/simple-canvas-paths.js: Convert CanvasLineSegment,
1508 CanvasLinePoint, CanvasQuadraticSegment, CanvasQuadraticPoint, CanvasBezierSegment,
1509 CanvasBezierPoint, CanvasArcToSegment, CanvasArcToSegmentFill, CanvasArcSegment,
1510 CanvasArcSegmentFill, CanvasRect, CanvasRectFill.
1511 * Animometer/tests/simple/resources/tiled-canvas-image.js: Convert CanvasImageTile.
1513 2016-02-06 Jon Lee <jonlee@apple.com>
1515 Minor improvements to debug harness.
1517 * Animometer/developer.html:
1518 * Animometer/resources/debug-runner/animometer.css:
1519 (#suites): Put the complexity text boxes closer to the test names.
1521 (#rawFPS circle): Make the interval FPS appear as a separate data series, with a line.
1522 (#intervalFPS path):
1523 (#intervalFPS circle):
1524 * Animometer/resources/debug-runner/animometer.js:
1525 (window.optionsManager.updateLocalStorageFromUI): Convert number inputs from text.
1526 (window.suitesManager._onChangeTestCheckbox): Refactor to take a checkbox.
1527 (window.suitesManager._createTestElement): Enhance such that typing into the complexity
1528 input will automatically select that test for running.
1529 (window.suitesManager.updateLocalStorageFromJSON): Make the harness work for private
1531 * Animometer/resources/debug-runner/graph.js: Separate the intervalFPS data, and show
1532 more accuracy in timestamps.
1534 2016-02-06 Jon Lee <jonlee@apple.com>
1536 Refactor helper methods for getting random values for a stage.
1538 Instead of requiring a Stage instance, just attach it to the Stage object.
1540 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
1541 * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
1542 * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
1543 * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
1544 * Animometer/tests/master/resources/canvas-tests.js:
1545 * Animometer/tests/master/resources/particles.js:
1546 * Animometer/tests/misc/resources/canvas-electrons.js:
1547 * Animometer/tests/misc/resources/canvas-stars.js:
1548 * Animometer/tests/misc/resources/compositing-transforms.js:
1549 * Animometer/tests/resources/main.js:
1550 * Animometer/tests/simple/resources/simple-canvas-paths.js:
1552 2016-02-05 Said Abou-Hallawa <sabouhallawa@apple.com>
1554 Add a new graphics test for CanvasRenderingContext2D functions: getImageData and putImageData
1555 https://bugs.webkit.org/show_bug.cgi?id=151716
1557 Reviewed by Darin Adler.
1559 The purpose of this test is to measure the performance of getImageData
1560 and putImageData functions. This test draws a background on the canvas
1561 and then gets some random tiles from this background and draw them in
1562 destinations different from their original sources.
1564 * Animometer/resources/debug-runner/tests.js: Adding the new test to the canvas simple tests suite.
1566 * Animometer/resources/extensions.js:
1567 (Array.prototype.shuffle): Shuffles the elements of an array.
1569 (Point.zero): Returns a new Point object whose x and y are equal zero.
1570 (Point.prototype.str): Used for debugging the Point object.
1572 * Animometer/tests/simple/resources/tiled-canvas-image.js: Added.
1574 (CanvasImageTile.prototype.getImageData):
1575 (CanvasImageTile.prototype.putImageData):
1576 (Stage.call.initialize):
1577 (Stage.call._createTiles):
1578 (Stage.call._nextTilePosition):
1580 (Stage.call._drawBackground):
1581 (Stage.call.animate):
1582 (Stage.call.complexity):
1584 * Animometer/tests/simple/tiled-canvas-image.html: Added.
1586 2016-01-07 Jon Lee <jonlee@apple.com>
1590 * Animometer/resources/runner/tests.js: Wrong URL from an
1592 * Animometer/tests/master/particles.html:
1593 * Animometer/tests/master/resources/dom-particles.js:
1594 (Particle.call.reset): Figured out a simpler way to set up
1596 (this.move.reset): Deleted.
1597 (this.move._applyAttributes): Deleted.
1598 * Animometer/tests/master/resources/particles.js:
1599 (Particle): Call move() after reset().
1601 2016-01-07 Jon Lee <jonlee@apple.com>
1603 Update benchmark test suite
1604 https://bugs.webkit.org/show_bug.cgi?id=152679
1606 Reviewed by Simon Fraser.
1608 Add a new test. The test has a rotating background
1609 gradient, and does a better job physically simulating
1612 * Animometer/resources/extensions.js: Teach Point to take constants as well as other Points.
1613 (Point.prototype.length): Added.
1614 (Point.prototype.normalize): Added.
1615 * Animometer/resources/runner/tests.js: Add the test to the master suite.
1616 * Animometer/tests/master/particles.html: Added.
1617 * Animometer/tests/master/resources/particles.js: Added. Parent class for different kinds of particles.
1619 (Particle.prototype.reset): If the particle starts slowing down in terms of its animation,
1621 (Particle.prototype.animate): Bounce off the walls elastically, and include gravity.
1622 (Particle.prototype.move): Subclasses should override.
1623 (ParticlesStage): Stage includes a rotating gradient background.
1624 * Animometer/tests/master/resources/dom-particles.js: Added. Creates a <div> and adds it to
1626 * Animometer/tests/resources/star.svg: Added.
1628 2016-01-03 Jon Lee <jonlee@apple.com>
1630 Update benchmark test suite
1631 https://bugs.webkit.org/show_bug.cgi?id=152679
1633 Reviewed by Simon Fraser.
1635 Move algorithm.js and sampler.js to tests/ and benchmark-runner.js to runner/.
1637 Needed by both harnesses.
1638 * Animometer/resources/runner/benchmark-runner.js: Renamed from PerformanceTests/Animometer/resources/debug-runner/benchmark-runner.js.
1639 * Animometer/developer.html:
1640 * Animometer/index.html:
1642 Needed only by the tests. Move to tests/. Statistics, in sampler.js, is used by ResultsDashboard, so move that
1644 * Animometer/resources/extensions.js:
1645 * Animometer/tests/resources/algorithm.js: Renamed from PerformanceTests/Animometer/resources/algorithm.js.
1646 * Animometer/tests/resources/sampler.js: Renamed from PerformanceTests/Animometer/resources/sampler.js.
1647 * Animometer/tests/bouncing-particles/bouncing-canvas-images.html:
1648 * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html:
1649 * Animometer/tests/bouncing-particles/bouncing-css-images.html:
1650 * Animometer/tests/bouncing-particles/bouncing-css-shapes.html:
1651 * Animometer/tests/bouncing-particles/bouncing-svg-images.html:
1652 * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html:
1653 * Animometer/tests/master/canvas-stage.html:
1654 * Animometer/tests/misc/canvas-electrons.html:
1655 * Animometer/tests/misc/canvas-stars.html:
1656 * Animometer/tests/misc/compositing-transforms.html:
1657 * Animometer/tests/simple/simple-canvas-paths.html:
1658 * Animometer/tests/template/template-canvas.html:
1659 * Animometer/tests/template/template-css.html:
1660 * Animometer/tests/template/template-svg.html:
1661 * Animometer/tests/text/layering-text.html:
1662 * Animometer/tests/text/text-boxes.html:
1664 2016-01-07 Jon Lee <jonlee@apple.com>
1666 Update benchmark test suite
1667 https://bugs.webkit.org/show_bug.cgi?id=152679
1669 Reviewed by Simon Fraser.
1671 Fix tests for other browsers.
1673 * Animometer/resources/extensions.js:
1674 (Point.elementClientSize): Some browsers return 0 for SVG clientWidth and clientHeight.
1675 Use getBoundingClientRect() instead.
1676 * Animometer/tests/misc/resources/canvas-electrons.js:
1677 (CanvasElectron.prototype._draw): Some browsers don't support ellipse.
1679 2016-01-07 Jon Lee <jonlee@apple.com>
1681 Add a waitUntilReady() step
1682 https://bugs.webkit.org/show_bug.cgi?id=152862
1684 Reviewed by Simon Fraser.
1686 Add a waitUntilReady() callback that lets the benchmark complete
1687 its setup before running the benchmark.
1689 * Animometer/tests/resources/main.js:
1690 (Benchmark.prototype.run): First call waitUntilReady, which returns
1691 a promise. When the promise resolves, run everything that was in this
1693 (Benchmark.prototype.waitUntilReady): Default implementation returns
1695 (Benchmark.prototype.resolveWhenFinished): Deleted.
1696 * Animometer/tests/template/resources/template-canvas.js:
1697 (new.TemplateCanvasStage.waitUntilReady): Example on how to override.
1699 2016-01-03 Jon Lee <jonlee@apple.com>
1701 Update data reporting and analysis
1702 https://bugs.webkit.org/show_bug.cgi?id=152670
1704 Reviewed by Simon Fraser.
1706 Show new graph data. Provide controls to show different series data. Provide an
1707 interactive cursor that shows the data at a given sample.
1709 * Animometer/developer.html: Add a nav section in #results. Each part of the graph
1710 has a checkbox for visual toggling, as well as companion spans to contain the data.
1711 The numbers will always be shown even if the SVG isn't.
1712 * Animometer/resources/debug-runner/animometer.css:
1713 (#suites): Adjust spacing when doing fixed complexity.
1714 (#test-graph nav): Place the nav in the upper right corner.
1715 (#test-graph-data > svg): Fix the FPS scale from 0-60. It makes the raw FPS goes past
1716 that scale. Allow it to show.
1717 (.target-fps): Add a dotted line for where the benchmark is supposed to settle for FPS.
1718 (#cursor line): The cursor contains a line and highlight circles for the data being shown.
1720 (#complexity path): This and rules afterward are named by series type.
1721 (#complexity circle):
1722 (#filteredFPS path):
1723 (#filteredFPS circle):
1725 (#intervalFPS circle):
1726 (.left-samples): Deleted.
1727 (.right-samples): Deleted.
1728 * Animometer/resources/debug-runner/animometer.js:
1729 (initialize): Add a "changed" listener when the checkboxes change in the nav.
1730 (onBenchmarkOptionsChanged): Renamed.
1731 (showTestGraph): All graph data is passed in as graphData instead of as arguments.
1732 * Animometer/resources/debug-runner/graph.js: Extend BenchmarkController. When showing
1733 a new graph, call updateGraphData(). It creates all of the d3 graphs. onGraphOptionsChanged()
1734 toggles the data on and off.
1735 (updateGraphData): Add the axes. Add the average lines and markers for sample time and
1736 target FPS. Add the cursor group. Use helper function addData() to add the data. On top of
1737 everything add a transparent area which will catch all of the mouse events. When the mouse
1738 moves in the graph, find the closest data point, show the data in the nav area, and highlight
1740 (addData): Adds a line and circle for each data point. Also adds a highlight cursor with a
1741 size a little larger than the circle radius for the data points.
1742 (onGraphOptionsChanged): Called when data is visually toggled.
1743 (showOrHideNodes): Helper function to toggle the .hidden class.
1744 * Animometer/resources/extensions.js:
1745 (ResultsDashboard.prototype.get data): Get rid of the arguments for _processData.
1746 (ResultsTable.prototype._addGraphButton): Shove all of the graph data into a singular object.
1748 Producing the JSON can take a while with all of the data. Make it on-demand with a
1751 * Animometer/resources/debug-runner/animometer.js:
1752 (showResults): When showing the results, don't serialize the JSON data. Move that to...
1753 (showJSONResults): ...here. Remove the button.
1755 * Animometer/developer.html: Add a button. The button will remove itself and populate
1756 the textarea with the JSON data.
1757 * Animometer/resources/debug-runner/animometer.css:
1758 (.hidden): Add a universal hidden class.
1759 (#results button.small-button): Promote the small-button styles to the whole results
1760 section for use in the JSON button.
1761 (#results button.small-button:active):
1762 (#results-data button.small-button): Deleted.
1763 (#results-data button.small-button:active): Deleted.
1765 Refactor how Animator does its recording.
1767 * Animometer/tests/resources/math.js: Create a new, simple estimator that just returns
1768 the same interval frame rate for adjustment.
1769 * Animometer/tests/resources/main.js:
1770 (Animator): Remove _dropFrameCount, and make variables more accurate described.
1771 (Animator.prototype.initialize): Use the identity estimator instead of using a bool.
1772 (Animator.prototype._intervalTimeDelta): Rename, only used internally.
1773 (Animator.prototype._shouldRequestAnotherFrame): Assume we drop one frame for adjustment
1774 of the scene. If we are within the number of frames to measure for the interval, just
1775 record the timestamp. Otherwise we are ready to evaluate and adjust the scene. Record
1776 the interval frame rate and the estimator's frame rate.
1778 Avoid processing the data through the Experiment while the test is running. Reconfigure
1779 the sampler to just record the raw samples. After the test is done, run the samples through
1780 the Experiment to get the score.
1782 * Animometer/resources/sampler.js:
1783 (Experiment): Fold _init() into the constructor since nobody else will call it. This is not
1784 needed until the test concludes, so remove startSampling(). Clients should just call sample().
1785 (Sampler): Pre-allocate arrays given the number of data points being recorded, and a capacity
1786 of how many samples will be used. The processor is a called when it's time to process the data
1787 since that is the client also telling the Sampler what to record.
1788 Introduce the notion of marks as well, which allows the client to mark when an
1789 event occurs. When we mark sample start, we can attach the timestamp there, instead of storing
1791 (Sampler.prototype.startSampling): Deleted. Clients should just call record().
1792 (Sampler.prototype.record): The data to record is passed in as variable arguments.
1793 (Sampler.prototype.mark): When adding a mark, a client needs to provide a unique string, and
1794 can provide extra data object for later retrieval.
1795 (Sampler.prototype.process): Renamed from toJSON. Trim the sampling arrays to what was used.
1796 Call the processor to process the samples.
1797 * Animometer/resources/debug-runner/benchmark-runner.js:
1798 (BenchmarkRunner.prototype._runBenchmarkAndRecordResults): Call process().
1800 * Animometer/resources/strings.js: Add some new strings, remove the graph ones since they are
1802 * Animometer/tests/resources/main.js:
1803 (Benchmark): Create a sampler with 4 series. The maximum number of points expected is the
1804 number of seconds multiplied by 60 fps. Benchmark, as a client of the Sampler, knows about all
1805 of the data being added to the Sampler. It is added through record(), and processed through
1807 (Benchmark.prototype.update): Mark when we've passed warmup and are starting to sample. Include
1808 the timestamp in the custom data for the mark. This avoids the need to store is separately in
1809 the Sampler. Fold what was in record() here, since nothing else needs this functionality.
1810 record() now just relays the information to the sampler.
1811 (Benchmark.prototype.record): Called by Animator, which provides the data to the sampler.
1812 Animator's calls to this is part of a later patch. Requires each stage to return its complexity.
1813 (Benchmark.prototype.processSamples): If the sampling mark exists, add it to the results.
1814 Go through all of the samples. All samples contain a timestamp and complexity. We
1815 calculate "raw FPS" which is the time differential from the previous sample. At regular intervals
1816 the Kalman-filtered FPS and the interval average FPS are also recorded. We also create two
1817 experiments, to get the scores for the complexity and smoothed FPS, and add those samples to
1818 the experiments. Grab those scores and add them into results also.
1820 Add complexity() to the tests for Benchmark.record().
1821 * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
1822 * Animometer/tests/misc/resources/canvas-electrons.js:
1823 * Animometer/tests/misc/resources/canvas-stars.js:
1824 * Animometer/tests/text/resources/layering-text.js:
1826 2015-12-27 Jon Lee <jonlee@apple.com>
1828 Simplify the test harness
1829 https://bugs.webkit.org/show_bug.cgi?id=152562
1831 Reviewed by Simon Fraser.
1833 Update the simple canvas tests. For the paths, start from the center instead of the
1834 top-left corner. Instead of using a coordinate limit, use a canonized factor, and
1835 use that along both the x and y axes, so that more capable tests use more of the
1838 * Animometer/tests/simple/resources/simple-canvas-paths.js:
1839 (CanvasLinePoint): Rewrite to use the coordinate maximum factor.
1840 (CanvasQuadraticPoint): Ditto.
1841 (CanvasBezierPoint): Ditto.
1842 * Animometer/tests/simple/resources/simple-canvas.js:
1843 (tune): Calculate a factor instead of a maximum coordinate.
1845 2015-12-27 Jon Lee <jonlee@apple.com>
1847 Simplify the test harness
1848 https://bugs.webkit.org/show_bug.cgi?id=152562
1850 Reviewed by Simon Fraser.
1852 All of the benchmarks use the default Animator(). Don't require new tests
1853 to pass a new instance, and instead just make one in the Benchmark constructor.
1855 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js:
1856 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
1857 * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
1858 * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
1859 * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
1860 * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
1861 * Animometer/tests/master/resources/canvas-tests.js:
1862 * Animometer/tests/misc/resources/canvas-electrons.js:
1863 * Animometer/tests/misc/resources/canvas-stars.js:
1864 * Animometer/tests/misc/resources/compositing-transforms.js:
1865 * Animometer/tests/resources/main.js:
1866 * Animometer/tests/simple/resources/simple-canvas-paths.js:
1867 * Animometer/tests/template/resources/template-canvas.js:
1868 * Animometer/tests/template/resources/template-css.js:
1869 * Animometer/tests/template/resources/template-svg.js:
1870 * Animometer/tests/text/resources/layering-text.js:
1871 * Animometer/tests/text/resources/text-boxes.js:
1873 Refactor the template.
1875 * Animometer/tests/template/resources/template-canvas.js:
1876 * Animometer/tests/template/resources/template-css.js:
1877 * Animometer/tests/template/resources/template-svg.js:
1878 * Animometer/tests/template/template-canvas.html:
1879 * Animometer/tests/template/template-css.html:
1880 * Animometer/tests/template/template-svg.html:
1882 Refactor the SVG suite.
1884 * Animometer/tests/bouncing-particles/bouncing-svg-images.html: Move scripts to the end.
1885 * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html: Ditto.
1887 * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html: Remove extraneous includes
1889 * Animometer/tests/text/text-boxes.html: Ditto.
1891 BouncingCanvasParticlesBenchmark is not necessary. Use Benchmark directly when subclassing.
1892 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js: Remove
1893 BouncingCanvasParticlesBenchmark.
1894 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js: Use Benchmark.
1895 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js: Ditto.
1897 * Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js: Require the shape
1898 in the constructor instead of having subclasses set the private variable.
1900 * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js: Refactor.
1901 * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
1903 Refactor the HTML suite.
1905 Move scripts to the end.
1906 * Animometer/tests/bouncing-particles/bouncing-css-images.html:
1907 * Animometer/tests/bouncing-particles/bouncing-css-shapes.html:
1908 * Animometer/tests/text/layering-text.html:
1909 * Animometer/tests/text/text-boxes.html:
1911 Refactor to use the new variables.
1912 * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
1913 * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
1914 * Animometer/tests/text/resources/layering-text.js:
1915 * Animometer/tests/text/resources/text-boxes.js:
1917 Refactor the bouncing canvas tests.
1919 * Animometer/tests/bouncing-particles/bouncing-canvas-images.html: Move scripts to the end.
1920 * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html: Move scripts to the end.
1922 * Animometer/tests/bouncing-particles/resources/bouncing-particles.js: Promote a few
1923 properties to "public" since they are used by subclasses.
1924 (BouncingParticlesStage): Fix the constructor, which was missing "this". Make particles
1925 "public" for subclasses.
1926 (BouncingParticlesStage.initialize): Fix the max velocity, which was accidentally changed.
1927 * Animometer/tests/misc/resources/compositing-transforms.js: Refactor.
1929 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
1930 BouncingCanvasParticlesAnimator is no longer needed.
1931 (BouncingCanvasParticle): Change constructor to take a shape as a parameter instead of
1932 having subclasses set the variable.
1934 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js: Refactor.
1935 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js: Refactor.
1937 Move example/ files into misc/.
1939 * Animometer/tests/misc/canvas-electrons.html: Renamed from PerformanceTests/Animometer/tests/examples/canvas-electrons.html.
1940 * Animometer/tests/misc/canvas-stars.html: Renamed from PerformanceTests/Animometer/tests/examples/canvas-stars.html.
1941 * Animometer/tests/misc/resources/canvas-electrons.js: Renamed from PerformanceTests/Animometer/tests/examples/resources/canvas-electrons.js.
1942 * Animometer/tests/misc/resources/canvas-stars.js: Renamed from PerformanceTests/Animometer/tests/examples/resources/canvas-stars.js.
1944 * Animometer/resources/debug-runner/tests.js: Update test URLs.
1946 Refactor miscellaneous suite.
1948 * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
1949 Remove BouncingParticlesAnimator and BouncingParticleBenchmark, which are
1951 (tune): Remove console assert.
1952 * Animometer/tests/resources/main.js: Add Rotater back in from stage.js.
1954 * Animometer/tests/examples/resources/canvas-electrons.js: Remove CanvasElectronsAnimator.
1955 * Animometer/tests/examples/resources/canvas-stars.js: Remove CanvasStarsAnimator.
1956 * Animometer/tests/misc/resources/compositing-transforms.js:
1957 * Animometer/tests/examples/canvas-electrons.html: Move scripts to the end.
1958 * Animometer/tests/examples/canvas-stars.html: Ditto.
1959 * Animometer/tests/misc/compositing-transforms.html: Ditto.
1961 Refactor the simple suite.
1963 * Animometer/tests/master/resources/canvas-stage.js:
1964 (tune): Remove coordinateMaximum since it is not needed in any
1965 of the master tests.
1966 * Animometer/tests/simple/resources/simple-canvas.js:
1967 SimpleCanvasAnimator and SimpleCanvasBenchmark are no longer
1969 (tune): Manage the objects differently, but instead of duplicating
1970 all of SimpleCanvasStage here, just replace tune(). Include
1971 coordinateMaximum, and remove items from the end of the list
1972 instead of the beginning.
1973 (StageBenchmark.call.createAnimator): Deleted.
1974 (StageBenchmark.call): Deleted.
1975 * Animometer/tests/simple/resources/simple-canvas-paths.js:
1976 * Animometer/tests/simple/simple-canvas-paths.html: Move
1979 Get rid of stage.js, StageAnimator, and StageBenchmark. Don't have the progress bar update during the test.
1981 * Animometer/resources/debug-runner/animometer.js:
1982 (initialize): Move the setting of testsCount to the debug runner.
1983 (didRunTest): Nicer name.
1984 * Animometer/resources/debug-runner/benchmark-runner.js:
1985 (BenchmarkRunner.prototype._runBenchmarkAndRecordResults): Don't pass in the progress bar to benchmarks.
1986 * Animometer/resources/extensions.js:
1987 (ProgressBar): Refactor. Make variables "private". Resetting the progress when instantiating.
1988 (ProgressBar.prototype.incrementRange): This is called every time a benchmark completes.
1989 * Animometer/resources/runner/animometer.js:
1990 (window.benchmarkRunnerClient.initialize): Remove unneeded setting of testsCount.
1991 * Animometer/resources/strings.js: These are no longer needed.
1992 * Animometer/tests/master/canvas-stage.html: Remove script inclusion. Other tests will follow.
1993 * Animometer/tests/master/resources/canvas-tests.js: Use Benchmark instead of StageBenchmark.
1994 * Animometer/tests/resources/main.js: Messages are no longer needed
1995 (Animator.prototype._shouldRequestAnotherFrame): Rename from animate(), since this method returns a boolean
1996 indicating whether another frame should be requested. Collapse the logic from StageAnimator into animateLoop.
1997 (BenchmarkState.prototype.currentStage): Deleted.
1998 (BenchmarkState.prototype.currentMessage): Deleted.
1999 (BenchmarkState.prototype.currentProgress): Deleted.
2000 (Animator.prototype.animate): Deleted.
2001 (Animator.prototype.animateLoop): The stage is animated only when we have another frame to draw.
2002 (Benchmark.prototype.record): No need to update the progress bar.
2003 * Animometer/tests/resources/stage.js: Removed. Rotater will appear in a later patch, in main.js.
2005 * Animometer/resources/debug-runner/benchmark-runner.js:
2006 (BenchmarkRunner.prototype._runBenchmarkAndRecordResults): Each test is run as a benchmark.
2007 Remove the call to runBenchmark by merging the options here, and calling benchmark.run()
2010 Make the class relationships more easily understandable. The benchmark owns the stage,
2011 animator, and options. Make the stage and animator no longer have their own references to
2012 the options. Make Stage a first-class citizen by promoting it to main.js. Later patches
2013 will try to get rid of stage.js altogether.
2014 * Animometer/tests/resources/main.js:
2015 (Stage): Moved from stage.js.
2016 (Animator): Don't pass in benchmark and options in its constructor. It will get initialized
2017 by benchmark-related parameters in initialize().
2018 (Animator.prototype.initialize): Add a back-reference to benchmark and cache an option.
2019 (Animator.prototype.get benchmark):
2020 (Animator.prototype.animate): Refactor to use the cached option, to remove its dependency on
2021 the options dictionary.
2022 (Benchmark): Require all benchmarks to have a stage and animator. The instance will initialize
2024 (Benchmark.prototype.get options):
2025 (Benchmark.prototype.get stage): BenchmarkStates.stages will need to be renamed to avoid confusion.
2026 (Benchmark.prototype.get animator):
2027 (Benchmark.prototype.start):
2028 (Benchmark.prototype.update): Ask the stage directly to tune or clear instead of adding another
2029 level of indirection.
2030 (window.runBenchmark): Deleted. Remove the need for a benchmarkClient. Also remove the standalone
2031 path, since tests can be individually selected, and remove the need for runBenchmark since that is
2032 handled in BenchmarkRunner._runBenchmarkAndRecordResults.
2033 * Animometer/tests/resources/stage.js:
2034 (Stage): Deleted. Moved to main.js.
2035 (StageBenchmark): What's left is updating the progress bar; to be removed.
2036 (StageAnimator): What's left can be folded in Animator.
2038 Refactor master suite.
2039 * Animometer/tests/master/resources/canvas-stage.js: This now only has SimpleCanvasStage.
2040 (animate): Push the clearRect() into each stage.
2042 (StageBenchmark.call.createAnimator): Deleted.
2043 (StageBenchmark.call): Deleted.
2044 * Animometer/tests/master/resources/canvas-tests.js: SimpleCanvasPathStrokeStage is no longer needed.
2045 (CanvasLineSegment.prototype.draw):
2047 (CanvasLinePoint): Remove the draw call because depending on its index it either needs to be moveTo
2048 or lineTo, and it is otherwise a very small draw operation that doesn't need the overhead of the
2049 function call. Do all of the drawing through the stage.
2051 Refactor the subclass pattern. Introduce Utilities.createSubclass().
2053 * Animometer/resources/debug-runner/benchmark-runner.js:
2054 * Animometer/resources/extensions.js:
2055 (window.Utilities.createSubclass): Takes the super class, a function representing
2056 the class's constructor, and additional methods to attach to the new class's
2058 * Animometer/tests/text/text-boxes.html: Remove unneeded reference to utilities.js.
2061 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js:
2062 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
2063 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
2064 * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
2065 * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
2066 * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
2067 * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
2068 * Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js:
2069 * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
2070 * Animometer/tests/examples/resources/canvas-electrons.js:
2071 * Animometer/tests/examples/resources/canvas-stars.js:
2072 * Animometer/tests/master/resources/canvas-stage.js:
2073 * Animometer/tests/master/resources/canvas-tests.js:
2074 * Animometer/tests/misc/resources/compositing-transforms.js:
2075 * Animometer/tests/resources/stage.js:
2076 * Animometer/tests/simple/resources/simple-canvas-paths.js:
2077 * Animometer/tests/simple/resources/simple-canvas.js:
2078 * Animometer/tests/template/resources/template-canvas.js:
2079 * Animometer/tests/template/resources/template-css.js:
2080 * Animometer/tests/template/resources/template-svg.js:
2081 * Animometer/tests/text/resources/layering-text.js: Reorder some of the methods
2082 and properties since they rely on each other.
2083 * Animometer/tests/text/resources/text-boxes.js:
2085 * Animometer/resources/debug-runner/animometer.js: Arrange calls
2086 in the order they are evoked.
2087 * Animometer/resources/debug-runner/benchmark-runner.js:
2088 (BenchmarkRunnerState.prototype.next): Get rid of return value since
2089 no caller to next() uses it.
2090 (BenchmarkRunnerState.prototype.prepareCurrentTest): Refactor the
2091 promise to resolve simply when onload() is called instead of
2093 (BenchmarkRunner.prototype._runTestAndRecordResults): Suite.run
2094 simply calls runBenchmark(). Call it directly rather than through
2096 (BenchmarkRunner.prototype.step): Remove unused parameter in
2098 (BenchmarkRunner.prototype.runMultipleIterations): Use this instead
2099 of self since it is outside of the closure which needed the self
2101 (resolveIfReady): Deleted.
2102 (BenchmarkRunner.prototype.waitForElement): Deleted.
2103 * Animometer/resources/runner/tests.js: prepare() and run() are
2105 (Suite.prototype.prepare): Deleted.
2106 (Suite.prototype.run): Deleted.
2107 * Animometer/tests/master/canvas-stage.html: Move all scripts to
2108 the end of the page.
2110 2015-12-23 Simon Fraser <simon.fraser@apple.com>
2112 Add an Animometer developer test which animates text-rich boxes
2113 https://bugs.webkit.org/show_bug.cgi?id=152544
2115 Reviewed by Zalan Bujtas.
2117 Add a test that draws lots of international text. This is a particle test,
2118 moving the boxes around with absolution positioning.
2120 * Animometer/resources/debug-runner/tests.js:
2121 * Animometer/tests/text/resources/text-boxes.js: Added.
2123 (BouncingTextBox.prototype._move):
2124 (BouncingTextBox.prototype.animate):
2125 (BouncingTextBoxStage):
2126 (BouncingTextBoxStage.prototype.createParticle):
2127 (BouncingTextBoxStage.prototype.particleWillBeRemoved):
2128 (BouncingTextBoxsBenchmark):
2129 (BouncingTextBoxsBenchmark.prototype.createStage):
2130 (window.benchmarkClient.create):
2131 * Animometer/tests/text/text-boxes.html: Added.
2133 2015-12-23 Jon Lee <jonlee@apple.com>
2135 Split benchmark into two different pages
2136 https://bugs.webkit.org/show_bug.cgi?id=152458
2138 Reviewed by Simon Fraser.
2140 Add tests to 'animometer' suite.
2142 * Animometer/resources/runner/tests.js:
2143 * Animometer/tests/master/canvas-stage.html: Added.
2144 * Animometer/tests/master/resources/canvas-stage.js: Added.
2145 * Animometer/tests/master/resources/canvas-tests.js: Added.
2146 * Animometer/tests/master/resources/stage.css: Added.
2148 2015-12-23 Jon Lee <jonlee@apple.com>
2150 Split benchmark into two different pages
2151 https://bugs.webkit.org/show_bug.cgi?id=152458
2153 Reviewed by Simon Fraser.
2157 * Animometer/resources/debug-runner/benchmark-runner.js:
2158 (BenchmarkRunner.prototype._runTestAndRecordResults): When the testing is complete the frame owning the
2159 sampler goes away, and a later call to get the JSON data is no longer available. Process the data
2160 right here, instead, and just reference it when displaying the results in ResultsDashboard.prototype._processData.
2161 * Animometer/resources/extensions.js:
2162 (Array.prototype.fill.Array.prototype.fill): Add a null check. Remove braces around single-line clause.
2163 (Array.prototype.find.Array.prototype.find): Update the null check.
2164 (ResultsDashboard.prototype._processData): Use the already-processed data.
2165 * Animometer/resources/runner/animometer.css:
2166 (.frame-container > iframe): Remove calc().
2168 Move Array functions to extensions.js since that is included by the harness.
2169 Add ES6 Array polyfills.
2171 * Animometer/resources/algorithm.js:
2172 (Array.prototype.swap): Moved to extensions.js.
2173 * Animometer/resources/extensions.js:
2174 (Array.prototype.swap):
2175 (Array.prototype.fill): Added.
2176 (Array.prototype.find): Added.
2178 Adjust styles for iPad.
2180 * Animometer/resources/runner/animometer.css:
2181 (@media screen and (min-device-width: 768px)): Apply to iPad as well.
2182 (@media screen and (max-device-width: 1024px)): Update width for iPads.
2184 Adjustment styles for iOS.
2186 * Animometer/developer.html: Different divs contain the iframe, so use a class instead and
2187 update the style rules.
2188 * Animometer/index.html:
2189 * Animometer/resources/debug-runner/animometer.css: Remove extraneous rules.
2190 (@media screen and (min-device-width: 1800px)): Move this up.
2191 * Animometer/resources/runner/animometer.css: Add rules to accomodate iOS.
2193 Get rid of prefixed flex properties for now.
2195 * Animometer/resources/debug-runner/animometer.css:
2196 * Animometer/resources/runner/animometer.css:
2198 Update the structure of the harness. Remove the JSON-per-test but keep
2199 the JSON of the whole test run. Use the full page in order to display
2202 * Animometer/developer.html: Update several of the JS file includes to UTF-8. Remove header and footer. Test results screen includes score,
2203 average, and worst 5% statistics.
2204 * Animometer/index.html: Make structure similar to developer.html.
2205 * Animometer/resources/debug-runner/animometer.css: Remove most of the
2206 button rules since they are superfluous. Move the progress bar to the
2207 top, fixed. Update the results page rules.
2208 * Animometer/resources/debug-runner/animometer.js: Remove most of the
2209 additions to sectionsManager since they are no longer needed.
2210 (setSectionHeader): Updates header of the section.
2211 (window.suitesManager._updateStartButtonState): Update selector.
2212 (showResults): Add keypress event for selecting different data for
2213 copy/paste. Update how the results are populated. Include full test
2214 JSON in a textarea, rather than requiring a button press.
2216 * Animometer/resources/debug-runner/tests.js: Update structure of Headers. Define different kinds of headers. Headers can control their
2217 title, and the text used as the cell contents, including class name.
2218 * Animometer/resources/extensions.js:
2219 (ResultsTable): Update to include a flattened version of the headers,
2220 used while populating table contents. Remove unneeded helper functions
2221 for creating the table. Rename "show" to "add".
2222 * Animometer/resources/runner/animometer.css: Update rules to
2223 accommodate the new structure.
2224 * Animometer/resources/runner/animometer.js:
2225 (window.sectionsManager.setSectionScore): Helper function to set the
2226 score and mean for a section.
2227 (window.sectionsManager.populateTable): Helper function to set the table.
2228 (window.benchmarkController.showResults): Refactor.
2229 (window.benchmarkController.selectResults): Update selectors.
2230 * Animometer/resources/runner/tests.js: Set Headers. Debug harness
2233 Update debug runner to have similar names to the basic runner. Include
2234 that page's CSS and remove extraneous CSS rules.
2236 Get rid of the statistics table #record.
2238 * Animometer/developer.html: Rename #home to #intro. Rename .spacer to hr.
2239 * Animometer/resources/debug-runner/animometer.css: Set to flexbox when selected.
2240 * Animometer/resources/debug-runner/animometer.js: Remove recordTable.
2241 (window.suitesManager._updateStartButtonState): Update selector to #intro.
2242 (setupRunningSectionStyle): Deleted.
2244 * Animometer/resources/runner/animometer.css:
2245 (#test-container.selected): Change to flex-box only when visible.
2248 * Animometer/resources/debug-runner/benchmark-runner.js:
2249 (BenchmarkRunner.prototype._runTestAndRecordResults):
2250 * Animometer/resources/runner/tests.js:
2251 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-images.js:
2252 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
2253 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-shapes.js:
2254 * Animometer/tests/bouncing-particles/resources/bouncing-css-images.js:
2255 * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
2256 * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
2257 * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
2258 * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
2259 * Animometer/tests/examples/resources/canvas-electrons.js:
2260 * Animometer/tests/examples/resources/canvas-stars.js:
2261 * Animometer/tests/misc/resources/compositing-transforms.js:
2262 * Animometer/tests/resources/main.js:
2263 * Animometer/tests/resources/stage.js:
2264 (StageBenchmark): Remove _recordTable.
2265 * Animometer/tests/simple/resources/simple-canvas-paths.js:
2266 * Animometer/tests/simple/resources/simple-canvas.js:
2267 * Animometer/tests/template/resources/template-canvas.js:
2268 * Animometer/tests/template/resources/template-css.js:
2269 * Animometer/tests/template/resources/template-svg.js:
2270 * Animometer/tests/text/resources/layering-text.js:
2272 * Animometer/resources/debug-runner/animometer.js:
2273 (willStartFirstIteration): Fix selector, since results-table is used
2274 in multiple places, so it cannot be an id.
2276 Make it possible to select the scores, or the whole table data,
2277 by cycling through different selections through key press of 's'.
2279 * Animometer/resources/runner/animometer.js:
2280 (window.benchmarkController.showResults): Attach a keypress handler
2281 if it hasn't been added already.
2282 (window.benchmarkController.selectResults):
2283 * Animometer/resources/runner/tests.js: Cycle through different
2286 Fix a few fly-by errors.
2288 * Animometer/resources/debug-runner/benchmark-runner.js:
2289 (BenchmarkRunnerState.prototype.prepareCurrentTest): Update the frame relative path
2290 since the files are now in the top directory instead of inside runner/.
2291 (BenchmarkRunner.prototype._runTestAndRecordResults): Incorrect reference to function.
2292 (BenchmarkRunner.prototype.step): Member variable is never used.
2294 A little stylistic cleanup.
2296 * Animometer/resources/debug-runner/benchmark-runner.js:
2297 * Animometer/resources/extensions.js:
2298 (window.DocumentExtension.createElement):
2299 * Animometer/tests/resources/main.js:
2300 (Benchmark.prototype.record):
2301 * Animometer/tests/resources/stage.js:
2302 (StageBenchmark.prototype.showResults): Reverse progress and message.
2303 The message appears less frequently than the progress.
2304 * Animometer/tests/simple/resources/simple-canvas.js:
2305 (SimpleCanvasBenchmark): Remove unused options.
2307 Add newer version of harness in a new page. Consolidate differences between the two
2310 * Animometer/developer.html: Include runner/animometer.js. Rename the JS function
2311 to run the benchmark to startBenchmark() instead of startTest(). Rename #running to
2313 * Animometer/index.html: Added. Similarly calls startBenchmark() and has #test-container.
2314 * Animometer/resources/debug-runner/animometer.css: Make the canvas 2:1 (1200px x 800px)
2317 Split out benchmarkRunnerClient and benchmarkController.
2319 * Animometer/resources/debug-runner/animometer.js: Move needed functions out of
2320 benchmarkRunnerClient, and leave the rest here to extend that object. Get rid of _resultsTable
2321 and move populating the results table into benchmarkController. Rename _resultsDashboard
2322 to results and make it accessible for other objects to use.
2323 (willAddTestFrame): This is unnecessary. Remove.
2325 (window.sectionsManager.showScore): Grab it from the results object instead of
2326 benchmarkRunnerClient.
2327 (window.sectionsManager.showSection): Deleted. Moved to runner/animometer.js.
2329 (window.benchmarkController._runBenchmark): Deleted. Mostly moved into _startBenchmark.
2330 (window.benchmarkController.startBenchmark): Refactor to call _startBenchmark.
2331 (window.benchmarkController.showResults): Include most of benchmarkRunnerClient.didFinishLastIteration()
2334 * Animometer/resources/debug-runner/benchmark-runner.js:
2335 (BenchmarkRunner.prototype._appendFrame): Remove unneeded call to willAddTestFrame.
2336 * Animometer/resources/extensions.js:
2337 (ResultsDashboard): Change the class to process the sampler data on-demand and hold onto that data
2338 for later referencing.
2339 (ResultsDashboard.prototype.toJSON): Deleted.
2340 (ResultsDashboard.prototype._processData): Rename toJSON to _processData since it's not really
2341 outputting JSON. Store the processed data into a member variable that can be referenced later.
2342 (ResultsDashboard.prototype.get data): Process the data if it hasn't already.
2343 (ResultsDashboard.prototype.get score): Process the data if it hasn't already, then return the
2345 (ResultsTable.prototype._showHeader): When outputting the results to a table, don't force the
2346 need for an empty children array. This was to allow for a header row in the table that spanned
2347 multiple columns. In the simpler harness, this is not needed.
2348 (ResultsTable.prototype._showEmptyCells):
2349 (ResultsTable.prototype._showTest): This hardcoded the columns. At least for the name and score,
2350 which is the bare minimum needed for the simpler harness, key off of the header name provided.
2351 * Animometer/resources/runner/animometer.css: Added. Use a similar 2:1 ratio. The score tables are
2352 split into the data and the headers, and are also displayed RTL so that a later patch allows a
2353 user to copy-paste the data easily.
2354 * Animometer/resources/runner/animometer.js: Added. Use a simpler version of benchmarkRunnerClient.
2355 The debug harness will extend these classes.
2356 (window.benchmarkController._startBenchmark): Used by both harnesses.
2357 (window.benchmarkController.startBenchmark): Set hard-coded options.
2358 (window.benchmarkController.showResults): Includes most of benchmarkRunnerClient.didFinishLastIteration()
2361 Get rid of utilities.js. Move it all into extensions.js.
2363 * Animometer/resources/extensions.js:
2364 * Animometer/tests/resources/utilities.js: Removed.
2366 * Animometer/tests/bouncing-particles/bouncing-canvas-images.html: Remove script link.
2367 * Animometer/tests/bouncing-particles/bouncing-canvas-shapes.html: Ditto.
2368 * Animometer/tests/bouncing-particles/bouncing-css-images.html: Ditto.
2369 * Animometer/tests/bouncing-particles/bouncing-css-shapes.html: Ditto.
2370 * Animometer/tests/bouncing-particles/bouncing-svg-images.html: Ditto.
2371 * Animometer/tests/bouncing-particles/bouncing-svg-shapes.html: Ditto.
2372 * Animometer/tests/examples/canvas-electrons.html: Ditto.
2373 * Animometer/tests/examples/canvas-stars.html: Ditto.
2374 * Animometer/tests/misc/compositing-transforms.html: Ditto.
2375 * Animometer/tests/simple/simple-canvas-paths.html: Ditto.
2376 * Animometer/tests/template/template-canvas.html: Ditto.
2377 * Animometer/tests/template/template-css.html: Ditto.
2378 * Animometer/tests/template/template-svg.html: Ditto.
2379 * Animometer/tests/text/layering-text.html: Ditto.
2381 Split tests.js into two. Add a new suite to runner/tests.js.
2383 * Animometer/developer.html: Update the script order. Scripts from
2384 debug-runner/ will always build on those from runner/, and have the
2386 * Animometer/resources/debug-runner/tests.js: Move "complex examples"
2387 suite into "miscellaneous tests".
2389 (Suite.prototype.prepare): Deleted.
2390 (Suite.prototype.run): Deleted.
2391 (suiteFromName): Deleted.
2392 * Animometer/resources/runner/tests.js: Added. Take definitions and
2393 functions needed by the test harness. Leave the test suites behind.
2394 (Suite): Moved from debug script.
2395 (Suite.prototype.prepare): Ditto.
2396 (Suite.prototype.run): Ditto.
2397 (suiteFromName): Ditto.
2398 (testFromName): Ditto.
2400 Move benchmark resources out into resources/debug-runner, and update URLs.
2402 * Animometer/developer.html: Renamed from PerformanceTests/Animometer/runner/animometer.html.
2403 * Animometer/resources/debug-runner/animometer.css: Renamed from PerformanceTests/Animometer/runner/resources/animometer.css.
2404 * Animometer/resources/debug-runner/animometer.js: Renamed from PerformanceTests/Animometer/runner/resources/animometer.js.
2405 * Animometer/resources/debug-runner/benchmark-runner.js: Renamed from PerformanceTests/Animometer/runner/resources/benchmark-runner.js.
2406 * Animometer/resources/debug-runner/d3.min.js: Renamed from PerformanceTests/Animometer/runner/resources/d3.min.js.
2407 * Animometer/resources/debug-runner/graph.js: Renamed from PerformanceTests/Animometer/runner/resources/graph.js.
2408 * Animometer/resources/debug-runner/tests.js: Renamed from PerformanceTests/Animometer/runner/resources/tests.js.
2410 2015-12-11 Jon Lee <jonlee@apple.com>
2412 Improve Animometer on iOS
2413 https://bugs.webkit.org/show_bug.cgi?id=152180
2415 Reviewed by Simon Fraser.
2417 Improve experience on phones. Make the canvas take
2418 up the whole screen.
2420 * Animometer/runner/animometer.html: Add meta viewport.
2421 Remove the container div.
2422 * Animometer/runner/resources/animometer.css: Have buttons lay
2423 out vertically. Update detail arrow glyph. Make the suites and
2424 options section lay out vertically. Remove the top spacers since
2425 we want the canvas to take over the whole screen. Minimal display
2426 is recommended for use.
2428 2015-12-07 Jon Lee <jonlee@apple.com>
2430 Update suites for benchmark
2431 https://bugs.webkit.org/show_bug.cgi?id=151957
2433 Reviewed by Simon Fraser.
2435 * Animometer/runner/animometer.html: Use spacers instead of relying on
2436 justify-content center to center the content. That allows the opening screen
2437 to grow downward when expanding the list of choices, otherwise it expands
2438 from the center, and off the top edge of the screen.
2439 * Animometer/runner/resources/animometer.css:
2440 (.tree): Don't overflow scroll.
2441 (.tree > li > label.tree-label:before): Use better glyphs.
2442 (.tree > li > :checked ~ label.tree-label:before):
2443 (main): Using flex-start for justify-content so that if the section grows too
2444 big it gets pinned to the top edge of the document instead of growing past it.
2445 (.spacer): Make the spacers have a minimum 20px and grow evenly.
2446 (section#home): Add a min-height so that the border will expand if the suite
2447 tests shown make the section grow past the height.
2448 * Animometer/runner/resources/animometer.js: Update the selectors.
2449 (window.suitesManager._treeElement):
2450 (window.suitesManager._suitesElements):
2451 (window.suitesManager._editsElements):
2453 2015-12-07 Jon Lee <jonlee@apple.com>
2455 Update options for benchmark
2456 https://bugs.webkit.org/show_bug.cgi?id=151956
2458 Reviewed by Simon Fraser.
2460 Move "Fix test complexity" and "Adaptive" checkboxes into a radio group.
2462 Move "Show running results" into a radio group, and add options to remove the HUD.
2464 * Animometer/runner/animometer.html: Get rid of the preamble. Wrap the options
2465 in a form for easier referencing in JS.
2466 * Animometer/runner/resources/animometer.css: Show the surrounding border if the
2467 body's display-minimal class name is set.
2468 * Animometer/runner/resources/animometer.js:
2470 Update the way optionsManager gets and sets default values. Include support for
2472 (window.optionsManager.valueForOption):
2473 (window.optionsManager.updateUIFromLocalStorage):
2474 (window.optionsManager.updateLocalStorageFromUI):
2476 (window.benchmarkRunnerClient.willStartFirstIteration):
2477 (window.sectionsManager.setupRunningSectionStyle):
2478 (window.suitesManager._treeElement): Fly-by whitespace fix.
2479 (window.suitesManager._suitesElements): Ditto.
2480 (window.suitesManager.updateEditsElementsState): Update options check.
2481 (window.suitesManager.updateDisplay): Add a new update function for the HUD.
2482 Attach a class to the body depending on the user's choice.
2483 (window.benchmarkController.initialize): Add an event listener when the form
2484 radio buttons update.
2485 (window.benchmarkController.onFormChanged):
2486 (window.optionsManager._optionsElements): Deleted.
2487 (window.optionsManager._adaptiveTestElement): Deleted.
2488 (window.benchmarkController.onChangeAdaptiveTestCheckbox): Deleted.
2489 * Animometer/tests/resources/main.js:
2490 (Benchmark.prototype.update): Update options checks.
2491 * Animometer/tests/resources/stage.js: Update option check.
2492 (StageBenchmark.prototype.showResults):
2494 2015-12-01 Simon Fraser <simon.fraser@apple.com>
2496 Add a basic compositing Animometer test
2497 https://bugs.webkit.org/show_bug.cgi?id=151724
2499 Reviewed by Dean Jackson.
2501 Add a "bouncing particles" test that moves composited layers around, optionally with a filter.
2503 This is added under a new "Miscellaneous" category.
2505 Remove the test templates category from the UI.
2507 * Animometer/runner/resources/tests.js:
2508 * Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
2509 (BouncingCssShape.prototype.animate):
2510 * Animometer/tests/misc/compositing-transforms.html: Added.
2511 * Animometer/tests/misc/resources/compositing-transforms.js: Added.
2512 (BouncingCompositedImage):
2513 (BouncingCompositedImage.prototype._move):
2514 (BouncingCompositedImage.prototype.animate):
2515 (CompositingTransformsStage):
2516 (CompositingTransformsStage.prototype.createParticle):
2517 (CompositingTransformsStage.prototype.particleWillBeRemoved):
2518 (CompositedTransformsBenchmark):
2519 (CompositedTransformsBenchmark.prototype.createStage):
2520 (window.benchmarkClient.create):
2522 2015-11-30 Said Abou-Hallawa <sabouhallawa@apple.com>
2524 Fix the graphics benchmark complexity bounds adjustment
2525 https://bugs.webkit.org/show_bug.cgi?id=151670
2527 Reviewed by Simon Fraser.
2529 Make sure the graphics benchmark complexity bounds adjustment is applied
2530 to the absolute lower bound.
2532 * Animometer/tests/resources/math.js:
2533 (PIDController.prototype._saturate):
2535 2015-11-30 Said Abou-Hallawa <sabouhallawa@apple.com>
2537 Add an option to select the results form the graphics benchmark
2538 https://bugs.webkit.org/show_bug.cgi?id=151666
2540 Reviewed by Ryosuke Niwa.
2542 We need an easy way to select the graphics benchmark results table such
2543 that when it is copied to the clipboard, rich text format is set to the
2546 * Animometer/runner/animometer.html: Add a new button to select the results table or JSON.
2548 * Animometer/runner/resources/animometer.js:
2549 (window.sectionsManager._sectionDataElement): Selects the container <data> element.
2550 (window.sectionsManager._sectionDataDivElement): Replace a literal string with a string table entry.
2551 (window.sectionsManager.showTestName): Replace a literal string with a string table entry.
2552 (window.sectionsManager.selectData): Selects the container <data> element in a selection.
2553 (window.sectionsManager.selectDataContents): Select the contents of container <data> element in a selection.
2554 (window.benchmarkController.selectResults): Selects the results table.
2555 (window.benchmarkController.showJSON): Function rename.
2556 (window.benchmarkController.selectJSON): Selects the contents of the results JSON.
2557 (window.benchmarkController.showJson): Deleted.
2559 2015-11-20 Simon Fraser <simon.fraser@apple.com>
2561 Animometer: graphs should not do interpolation
2562 https://bugs.webkit.org/show_bug.cgi?id=151526
2564 Reviewed by Simon Fraser.
2566 Having the graphs do interpolation is misleading, because you can't see the actual data.
2568 Also remove "shape-rendering: crispEdges;" so the lines get antialiased.
2570 * Animometer/runner/resources/animometer.css:
2571 (section#test-graph > data > svg): Deleted.
2572 * Animometer/runner/resources/graph.js:
2575 2015-11-19 Said Abou-Hallawa <sabouhallawa@apple.com>
2577 Calculate the graphics benchmark test gain adaptively
2578 https://bugs.webkit.org/show_bug.cgi?id=151208
2580 Reviewed by Darin Adler.
2582 We need to calculate the gain of the graphics benchmark tests adaptively
2583 and get rid of the gain and limits parameters we have to choose manually
2584 for every test. We are going to use the classic Ziegler–Nichols method for
2585 calculating the gain and integral and derivative times. We are going to
2586 try moving on a cubic curve during the manual stage from y0 to reach ysp.
2587 We also going to use a saturation actuator to ensure the system does not
2590 * Animometer/resources/extensions.js:
2591 (ResultsTable.prototype._isNoisyMeasurement): Fix a parameter name.
2592 (ResultsTable.prototype._isNoisyTest): Since score is a member of testResults, we need to limit our search to frame rate and complexity.
2593 (ResultsTable.prototype._showTest): Pass the correct parameter to _isNoisyMeasurement().
2595 * Animometer/resources/strings.js: Fix the indentation and name and value of a string.
2597 * Animometer/runner/resources/tests.js: Remove all the manual gains and limits parameters which had to be passed to every test.
2599 * Animometer/tests/resources/main.js:
2600 (BenchmarkState.prototype.currentStage): Fix an enum name.
2601 (Benchmark): Get rid of manual gain and limits.
2602 (Benchmark.prototype.update): Simplify the calculation by having all the times in ms.
2604 * Animometer/tests/resources/math.js:
2605 (PIDController): Get rid of the manual gain and limits and the magic numbers for Ti and Td.
2606 (PIDController.prototype._yPosition): Tells whether the test current output is moving towards the set-point or away from it.
2607 (PIDController.prototype._distanceUltimate): Calculates the ultimate distance from y0 after time t using a cubic formula.
2608 (PIDController.prototype._distance): Calculates the distance of y relative to y0.
2609 (PIDController.prototype._gainIncrement): Decides how much the proportional gain should be increased during the manual gain stage.
2610 (PIDController.prototype._updateStage): Updates the stage of the controller based on its current stage and the system output.
2611 (PIDController.prototype._tuneP): Tunes the system before calculating the PID controller gains.
2612 (PIDController.prototype._tunePID): PID tuning function.
2613 (PIDController.prototype._tune):
2614 (PIDController.prototype._saturate):
2615 (PIDController.prototype.tune): Manages calculating the controller parameters. It then returns a PID tuning value.
2616 (PIDController.prototype._sat): Deleted. We may need to return it back but the limits have to be calculated adaptively not manually.
2618 2015-11-17 Said Abou-Hallawa <sabouhallawa@apple.com>
2620 Reorganize the graphics benchmark string table
2621 https://bugs.webkit.org/show_bug.cgi?id=151334
2623 Reviewed by Simon Fraser.
2625 Make the graphics benchmark string table be an object of sub-objects. Each
2626 sub-object represents an associative array, the key is the string name and
2627 the value is the string data.
2629 * Animometer/resources/extensions.js:
2630 (ResultsDashboard.prototype.toJSON):
2631 (ResultsTable.prototype._showGraph):
2632 (ResultsTable.prototype._showJSON):
2633 (ResultsTable.prototype._isNoisyMeasurement):
2634 (ResultsTable.prototype._isNoisyTest):
2635 (ResultsTable.prototype._showTest):
2636 (ResultsTable.prototype._showSuite):
2637 (ResultsTable.prototype._showIteration):
2638 * Animometer/resources/sampler.js:
2639 (Sampler.prototype.toJSON):
2640 * Animometer/resources/strings.js:
2641 * Animometer/runner/resources/animometer.js:
2642 (window.benchmarkRunnerClient.didFinishLastIteration):
2643 (window.suitesManager.updateLocalStorageFromJSON):
2644 (window.benchmarkController.showResults):
2645 (window.benchmarkController.showJson):
2646 (window.benchmarkController.showTestGraph):
2647 (window.benchmarkController.showTestJSON):
2648 * Animometer/runner/resources/tests.js:
2649 * Animometer/tests/resources/main.js:
2651 2015-11-17 Said Abou-Hallawa <sabouhallawa@apple.com>
2653 Disable flattening the stage iframe of the graphics benchmark when running on iOS
2654 https://bugs.webkit.org/show_bug.cgi?id=151361
2656 Reviewed by Simon Fraser.
2658 Use fixed size for stage iframe of the graphics benchmark to disable
2659 flattening the iframe while animating the particles. Also ensure the
2660 bouncing particles do not go outside the iframe's boundaries.
2662 * Animometer/runner/resources/animometer.css:
2663 (section#running > #running-test > iframe):
2664 (@media screen and (min-device-width: 1800px)):
2665 * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
2666 (BouncingParticle.prototype.animate):
2668 2015-11-17 Said Abou-Hallawa <sabouhallawa@apple.com>
2670 Use the media queries to dynamically set the stage for the graphics benchmark
2671 https://bugs.webkit.org/show_bug.cgi?id=151327
2673 Reviewed by Simon Fraser.
2675 Clean setting the benchmark css rules by using the media queries. Accessing
2676 document.stylesheets.cssRules seems to be unreliable. Fix the test harness
2677 load event listener invocation. And also remove the options for normalizing
2678 the stage resolution for retina display.
2680 * Animometer/resources/extensions.js:
2681 (window.DocumentExtension.insertCssRuleAfter): Deleted.
2682 * Animometer/runner/animometer.html:
2683 * Animometer/runner/resources/animometer.css:
2684 (@media screen and (min-device-width: 1800px)):
2685 * Animometer/runner/resources/animometer.js:
2686 (window.sectionsManager.setupRunningSectionStyle):
2687 (window.benchmarkController.initialize):
2688 (window.sectionsManager.setupSectionStyle): Deleted.
2689 * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
2690 (BouncingParticlesStage):
2691 * Animometer/tests/text/layering-text.html:
2692 * Animometer/tests/text/resources/layering-text.js:
2693 (LayeringTextStage):
2694 (LayeringTextStage.prototype._setFontSize): Deleted.
2696 2015-11-16 Said Abou-Hallawa <sabouhallawa@apple.com>
2698 Remove the option for animating using setInterval from the graphics benchmark
2699 https://bugs.webkit.org/show_bug.cgi?id=151283
2701 Reviewed by Darin Adler.
2703 Get rid of the option to run animation using setInterval().
2705 * Animometer/tests/resources/main.js:
2706 (Animator.prototype.animate):
2708 (Benchmark.prototype.start):
2709 (Animator.prototype.start): Deleted.
2711 2015-11-16 Said Abou-Hallawa <sabouhallawa@apple.com>
2713 Highlight the alarming test results in the graphics benchmark results page
2714 https://bugs.webkit.org/show_bug.cgi?id=151286
2716 Reviewed by Simon Fraser.
2718 When showing the results of a test in the graphics benchmark the following
2719 criteria is going to be applied:
2721 1. If the standard deviation of the test complexity or the frame rate is
2722 equal to or more than 10%, the standard deviation and the test name
2723 will be displayed in red.
2724 2. If the average frame rate is not in the range = [(desired_frame_rate - 2)
2725 .. (desired_frame_rate + 2)], the average frame rate and the test name will
2726 be displayed in red.
2728 * Animometer/resources/extensions.js:
2729 (ResultsTable.prototype._showHeaderRow):
2730 (ResultsTable.prototype._showHeader):
2731 (ResultsTable.prototype._showEmptyCell):
2732 (ResultsTable.prototype._showText):
2733 (ResultsTable.prototype._showFixedNumber):
2734 (ResultsTable.prototype.):
2735 (ResultsTable.prototype._showGraph):
2736 (ResultsTable.prototype._showJSON):
2737 (ResultsTable.prototype._isAlarmingMeasurement):
2738 (ResultsTable.prototype._isAlarmingTestResults):
2739 (ResultsTable.prototype._showEmptyCells):
2740 (ResultsTable.prototype._showEmptyRow):
2741 (ResultsTable.prototype._showTest):
2742 (ResultsTable.prototype._showSuite):
2743 (ResultsTable.prototype._showIteration):
2744 (ResultsTable.prototype.showRecord):
2745 (ResultsTable.prototype.showIterations):
2746 (ResultsTable.prototype._showEmpty): Deleted.
2747 * Animometer/runner/resources/animometer.js:
2748 (window.benchmarkRunnerClient.didFinishLastIteration):
2749 * Animometer/tests/resources/stage.js:
2750 (StageBenchmark.prototype.showResults):
2752 2015-11-16 Said Abou-Hallawa <sabouhallawa@apple.com>
2754 Clean referencing the options object in the graphics benchmark
2755 https://bugs.webkit.org/show_bug.cgi?id=151284
2757 Reviewed by Simon Fraser.
2759 Get rid of the Benchmark.options member and rely only on the private member
2760 Benchmark._options. The animator need to have its own options member instead
2761 of accessing it from its reference to Benchmark object.
2763 * Animometer/tests/bouncing-particles/resources/bouncing-canvas-particles.js:
2764 (BouncingCanvasParticlesAnimator):
2765 (BouncingCanvasParticlesBenchmark.prototype.createAnimator):
2766 * Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
2767 (BouncingParticle.prototype.animate):
2768 (BouncingParticlesAnimator):
2769 (BouncingParticlesBenchmark.prototype.createAnimator):
2770 * Animometer/tests/examples/resources/canvas-electrons.js:
2771 (CanvasElectronsStage.prototype.animate):
2772 (CanvasElectronsAnimator):
2773 (CanvasElectronsBenchmark.prototype.createAnimator):
2774 (window.benchmarkClient.create):
2775 * Animometer/tests/examples/resources/canvas-stars.js:
2776 (CanvasStarsStage.prototype.animate):
2777 (CanvasStarsAnimator):
2778 (CanvasStarsBenchmark.prototype.createAnimator):
2779 (window.benchmarkClient.create):
2780 * Animometer/tests/resources/main.js:
2781 (BenchmarkState.prototype.currentProgress):
2783 (Animator.prototype.animate):
2785 (Benchmark.prototype.update):
2786 * Animometer/tests/resources/stage.js:
2787 (Stage.prototype.clear):
2789 (StageBenchmark.prototype.createAnimator):
2790 (StageBenchmark.prototype.tune):
2791 (StageBenchmark.prototype.showResults):
2792 * Animometer/tests/simple/resources/simple-canvas.js:
2793 (SimpleCanvasStage.prototype.animate):
2794 (SimpleCanvasAnimator):
2795 (SimpleCanvasAnimator.prototype.animate):
2796 (SimpleCanvasBenchmark.prototype.createAnimator):
2797 * Animometer/tests/template/resources/template-canvas.js:
2798 (TemplateCanvasStage.prototype.animate):
2799 (TemplateCanvasBenchmark.prototype.createAnimator):
2800 (window.benchmarkClient.create):
2802 2015-11-13 Said Abou-Hallawa <sabouhallawa@apple.com>
2804 Eliminate a request for layout every time an item is added to the stage of the graphics benchmark
2805 https://bugs.webkit.org/show_bug.cgi?id=151289
2807 Reviewed by Simon Fraser.
2809 Cache the stage size when it is created instead of requesting every time
2810 an object is added via clientWidth and clientHeight.
2812 * Animometer/resources/extensions.js:
2813 (Insets.elementPadding):
2814 * Animometer/tests/resources/stage.js:
2816 (Stage.prototype.get size):
2818 2015-11-06 Said Abou-Hallawa <sabouhallawa@apple.com>
2820 Initialize the graphics benchmark's Kalman filter with estimated 60 FPS
2821 https://bugs.webkit.org/show_bug.cgi?id=150965
2823 Reviewed by Darin Adler.
2825 This should give the benchmark more accurate reading at warmup time. And
2826 hence we can safely reduce the test running time to be 10 seconds.
2828 * Animometer/runner/animometer.html:
2829 Add "defer" back when loading resources/animometer.js since this script
2830 depends on many other scripts and we need to wait till the page is parsed.
2831 Also change the default test interval to be 10 seconds.
2833 * Animometer/runner/resources/graph.js:
2834 (graph): Make the test results curves smoother.
2836 * Animometer/tests/resources/main.js:
2837 (Animator): Initialize the Kalman filter with 60 FPS which should be true
2838 if the test page is empty.
2840 (Animator.prototype.animate):
2841 * Animometer/tests/resources/math.js:
2842 (KalmanEstimator): Fix the initial value of _vecX_est.
2843 _vecX_est[0] = current FPS (= 60FPS when the test page is empty)
2844 _vecX_est[1] = first time derivative of FPS (=0; FPS has been constant).
2845 _vecX_est[2] = second time derivative of FPS (=0; since _vecX_est[1]=0).
2846 (KalmanEstimator.prototype.estimate): Add some comments.
2848 2015-11-04 Said Abou-Hallawa <sabouhallawa@apple.com>
2850 Remove "defer" from the scripts' references in the graphics benchmark home page
2851 https://bugs.webkit.org/show_bug.cgi?id=150915
2853 Reviewed by Simon Fraser.
2855 It causes the benchmark to be very flakey.
2857 * Animometer/runner/animometer.html:
2859 2015-11-01 Said Abou-Hallawa <sabouhallawa@apple,com>
2861 Add an option to make the graphics benchmark runs a specific test with fixed complexity
2862 https://bugs.webkit.org/show_bug.cgi?id=150529
2864 Reviewed by Darin Adler.
2866 Beside each test in the suites tree, we are going to show the complexity
2867 arithmetic mean of the of the last run in an edit control. Based on a
2868 new option these edit controls will all be visible or hidden. If they are
2869 visible their values can be changed. The benchmark runner if it run in
2870 the non-adaptive mode will set the complexity of the test to the passed
2871 value and will not change it ever. The animator will animate the test and
2872 frame rate will also be measured.
2874 * Animometer/runner/animometer.html: Add a new option for the non-adaptive mode.
2876 * Animometer/runner/resources/animometer.css:
2877 (section#home input[type="number"]): Define the width of all the edit control in the <home> section.
2878 (section#home > suites input[type="number"]): The edit controls in the <suites> box will be right aligned and hidden by default.
2879 (section#home > suites input[type="number"].selected): When the class "selected" is added, the edit controls will be visible.
2880 (section#home > options > label > input[type="number"]): Deleted.
2882 * Animometer/runner/resources/animometer.js:
2883 (window.benchmarkRunnerClient.didFinishLastIteration): Update the local storage with the results of each test.
2884 (window.optionsManager._adaptiveTestElement): Returns the checkbox for setting the adaptive test option.
2885 (window.suitesManager._editElement): Returns the edit element associated with each test element in the suites tree.
2886 (window.suitesManager._editsElements): Returns a list of all the elements in the <suites> box.
2887 (window.suitesManager._localStorageNameForTest): Change this function to take strings.
2888 (window.suitesManager._createTestElement): Adds an edit control beside each test.
2889 (window.suitesManager.updateEditsElementsState): Adds/Removes the 'selected' class to/from all the tests edit elements.
2890 (window.suitesManager.updateUIFromLocalStorage): Reads the edit control value from the local storage.
2891 (window.suitesManager.updateLocalStorageFromUI): Saves the edit control value to the local storage.
2892 (window.suitesManager.updateLocalStorageFromJSON): Saves the last run results to the local storage.
2893 (window.benchmarkController.initialize): Shows/Hides the test edit controls based on the adaptive test option.
2894 (window.benchmarkController.onChangeAdaptiveTestCheckbox): An onchange event handler for the adaptive test checkbox.
2896 * Animometer/tests/resources/main.js:
2897 (Benchmark.prototype.update): Fix the complexity of the test if the running mode is non-adaptive test and desired complexity is not zero.
2898 (window.runBenchmark): Add the test complexity as a new benchmark option.
2900 2015-11-01 Said Abou-Hallawa <sabouhallawa@apple,com>
2902 Make the size of the benchmark canvas adaptive to the screen size and screen resolution
2903 https://bugs.webkit.org/show_bug.cgi?id=150530
2905 Reviewed by Darin Adler.
2907 We want to set the size of the benchmark stage dynamically such that it
2908 depends on the screen resolution and the device scale factor. This patch
2909 does more than that because the home page css was not done properly. To
2910 use the flex box layout, the animometer.css has to be rewritten almost from
2911 scratch. The suites tree has to be rewritten also because it was not collapsing
2912 and with the flex box layout it was going outside of the window area. The
2913 options handling and the local storage handling had to be rewritten to
2914 allow more flexibility with this patch and the future patches. The code
2915 in animometer.js was reorganized into objects to allow distributing the code
2916 nicely among separate entities.
2918 * Animometer/resources/extensions.js:
2919 (Point.elementClientSize): Returns the client size of an HTMLElement as a Point object.
2920 (Insets.prototype.get width): Follow the function opening brace style guidelines.
2921 (Insets.prototype.get height):
2922 (Insets.prototype.get size): Returns the size of an Insets as a Point object.
2924 (window.DocumentExtension): Provides document helper functions. It should be assailable from the runner and the tests.
2925 (window.DocumentExtension.createElement): Creates an HTMLElement given its name, attributes and parentElement.
2926 (window.DocumentExtension.createSvgElement): Creates an SVGElement given its name, attributes and parentElement (moved from utilities.js).
2927 (window.DocumentExtension.insertCssRuleAfter): Inserts a CSS rule after an exiting rule given its text.
2929 (ResultsTable.prototype._showHeader): Use DocumentExtension functions.
2930 (ResultsTable.prototype._showGraph): Use DocumentExtension functions and create a real button for "Graph..." option.
2931 (ResultsTable.prototype._showJSON): Use DocumentExtension functions and create a real button for "JSON..." option.
2934 * Animometer/runner/animometer.html: Restructure the page to use the flex box layout.
2936 * Animometer/runner/resources/animometer.css:
2940 (button.large-button):The large button appears in the animometer.html.
2941 (button.large-button:active):
2942 (button.large-button:disabled):
2944 (button.small-button): The small button appears in the results table.
2945 (button.small-button:active):
2947 (.tree): The tree class is used to list the suites and their tests.
2948 (.tree .expand-button): This button expands a tree element.
2949 (.tree .expand-button ~ ul): Hide the children (<ul>...</ul>) of a parent node by default.
2950 (.tree .expand-button:checked ~ ul): Show the children of a parent node only when checked.
2951 (.tree ul): Hide the list bullets.
2952 (.tree li): Indent every node in the tree relative to its parent.
2953 (.tree ul li): Indent all the non top level nodes only (the tests nodes in our case).
2954 (.tree > li:last-child): Do not indent the bottom of the last child node.
2955 (.tree-label): Style for all the labels in the tree.
2956 (label.tree-label): Style for the labels in the top level only (the suites nodes in our case).
2957 (label.tree-label:before): Style the unchecked case of the expand-button.
2958 (:checked ~ label.tree-label:before): Style the checked case of the expand-button.
2960 (table.results-table): The results table appears while running the test and at the end.
2961 (.results-table td):
2962 (.results-table th):
2964 (div.results-json): The JSON div appears per test or for the whole run.
2966 (main): This is the flex box container.
2968 (section): A section is displayed exclusively inside the <main>. It is hidden by default.
2969 (section.selected): When it is selected, its layout is flex layout.
2970 (section > footer): The header or the footer of a section should not take more than 15% of the container.
2972 (section#home): The home section has <suites> and <options> parts to be laid out in the middle.
2973 (section#home > options):
2974 (section#home > suites): The <suites> should not take more than 40% of the width.
2975 (section#home > options > label): The benchmark title.
2976 (section#home > header > h2): The benchmark title.
2977 (section#home > options > label > input[type="number"]): Sets the width of the option edit control.
2979 (section#running): The running section contain the runner <iframe> which takes the whole area of the <main>.
2980 (section#running > #running-test): This is the <iframe> container.
2981 (section#running > #running-test > iframe): The <iframe> is created by the runner for each test.
2982 (section#running > #progress): This is the progress bar.
2983 (section#running > #progress > #progress-completed): This is another element which grows while the runner is progressing.
2984 (section#running > #record): This the container of the record results table which is shown while running a test.
2988 (section#test-json):
2989 (section#test-graph): All these sections have the same layout. A <data> element is laid out between <header> and <footer>.
2991 (section#results > data):
2992 (section#json > data):
2993 (section#test-json > data):
2994 (section#test-graph > data): The <data> element should take 70% of the <section>.
2996 (section#test-graph > data > svg):
2998 (.left-samples): These styles are for the d3 graph.
3000 (section#test-json > data): This is the style of the JSON <data> element.
3003 (label, p): Deleted.
3004 (section > p): Deleted.
3005 (section#home > p): Deleted.
3006 (section#home > p:first-child): Deleted.
3007 (#testContainer): Deleted.
3008 (section#running #progress-completed): Deleted.
3009 (section#results > table): Deleted.
3010 (section#results > table td, th): Deleted.
3011 (section#results > table tr.alt, td): Deleted.
3012 (section#results > table th): Deleted.
3013 (section#json > textarea): Deleted.
3014 (.options): Deleted.
3015 (.options p): Deleted.
3016 (#suites ul): Deleted.
3017 (#suites ul ul): Deleted.
3018 (#suites ul ul input, #suites ul ul label): Deleted.
3019 (#suites.showTests ul ul): Deleted.
3021 (input[type="number"]): Deleted.
3022 (.buttons): Deleted.
3023 (.small-button): Deleted.
3024 (#graphContainer): Deleted.
3025 (.right-samples): Deleted.
3026 (.sample-time): Deleted.
3027 (.left-mean): Deleted.
3028 (.right-mean): Deleted.
3030 * Animometer/runner/resources/animometer.js:
3031 (window.benchmarkRunnerClient.initialize): Initialize the client object with the options and the suites.
3032 (window.benchmarkRunnerClient.willStartFirstIteration): Use new css selectors for results and the record table.
3033 (window.benchmarkRunnerClient.didFinishLastIteration): Move the code which sets the JSON text to sectionsManager.showJSON().
3035 (window.sectionsManager): Responsible of managing the <section>s elements inside animometer.html.
3036 (window.sectionsManager._sectionHeaderH1Element): Return the <h1> inside the <header> of a given section.
3037 (window.sectionsManager._sectionDataDivElement): Return the <div> inside the <data> of a given section.
3038 (window.sectionsManager.showScore): Show the score of the last benchmark run.
3039 (window.sectionsManager.showTestName): Show the test name for detailed results <section>.
3040 (window.sectionsManager.showJSON): Shows the JSON text of the last benchmark or for a specific test.
3041 (window.sectionsManager.showSection): Shows a specific <section> in the <main> container.
3042 (window.sectionsManager.setupSectionStyle): Sets css attributes for all the <section>s.
3043 (window.sectionsManager.setupRunningSectionStyle): Sets the css attributes for the running <section> only.
3045 (window.optionsManager): Responsible of managing the user options and streaming them to/form the localStorage.
3046 (window.optionsManager._optionsElements): Returns the children <input> elements of the <options>.
3047 (window.optionsManager.updateUIFromLocalStorage): Restore the values of the <options> UI elements from the local storage.
3048 (window.optionsManager.updateLocalStorageFromUI): Saves the values of the <options> UI elements to the local storage.
3050 (window.suitesManager): Responsible of managing the user suites and streaming them to/form the localStorage.
3051 (window.suitesManager._treeElement): Returns the suites tree container element.
3052 (window.suitesManager._suitesElements): Returns a list of the suites elements.
3053 (window.suitesManager._checkboxElement): Returns the checkbox element of a given suite.
3054 (window.suitesManager._localStorageNameForTest): Generates a string for the tuple <suite, test> to be saved in the localStorage.
3055 (window.suitesManager._updateSuiteCheckboxState): Updates the state of a suite checkbox from the state of its tests' checkboxes.
3056 (window.suitesManager._updateStartButtonState): Updates the state of the start button from the state of the suites' checkboxes.
3057 (window.suitesManager._onChangeSuiteCheckbox): Called when a suite checkbox is clicked.
3058 (window.suitesManager._onChangeTestCheckbox): Called when a test checkbox is clicked.
3059 (window.suitesManager._createSuiteElement): Creates suite node in the suites tree.
3060 (window.suitesManager._createTestElement): Creates test node in the suites tree.
3061 (window.suitesManager.createElements): Creates the suites tree dynamically from the array Suites.
3062 (window.suitesManager.updateUIFromLocalStorage): Restore the values of the <suites> UI elements from the local storage.
3063 (window.suitesManager.updateLocalStorageFromUI): aves the values of the <suites> UI elements to the local storage.
3065 (window.benchmarkController): This is the UI controller of the animometer.html page.
3066 (window.benchmarkController.initialize): Called when the animometer.html page is loaded.
3067 (window.benchmarkController._runBenchmark): Starts a benchmark run.
3068 (window.benchmarkController.startTest): Called when the "Start Test" button is clicked.
3069 (window.benchmarkController.showResults): Called at the end of the test to show the final results.
3070 (window.benchmarkController.showJson): Called from the results page to show the JSON of the last benchmark run.
3071 (window.benchmarkController.showTestGraph): Called from the results the table to show a graph for the samples of a specific test.
3072 (window.benchmarkController.showTestJSON): Called from the results the table to show a JSON for the samples of a specific test.
3074 (showSection): Deleted.
3075 (startTest): Deleted.
3076 (showResults): Deleted.
3077 (showJson): Deleted.
3078 (showTestGraph): Deleted.
3079 (showTestJSON): Deleted.
3080 (initialize.toggleTestsCheckbox.onchange): Deleted.
3081 (initialize): Deleted.
3082 (updateSuiteSelection): Deleted.
3083 (updateTestSelection): Deleted.
3084 (updateSuiteCheckbox): Deleted.
3085 (localStorageNameForTest): Deleted.
3086 (populateSettings.): Deleted.
3087 (populateSettings): Deleted.
3089 * Animometer/runner/resources/benchmark-runner.js:
3090 (BenchmarkRunner): Pass the frameContainer element to the BenchmarkRunner.
3091 (BenchmarkRunner.prototype._appendFrame): Remove unused parameter unwanted styling code.
3092 (BenchmarkRunner.prototype.runMultipleIterations): Use the this._client.iterationCount instead of passing it as a parameter also.
3094 * Animometer/runner/resources/graph.js:
3095 (graph): Calculate the size of the chart from the container element.
3097 * Animometer/tests/bouncing-particles/resources/bouncing-svg-images.js:
3099 * Animometer/tests/bouncing-particles/resources/bouncing-svg-particles.js:
3100 (BouncingSvgParticlesStage.prototype._createDefs):
3101 (BouncingSvgParticlesStage.prototype._createClipStar):
3102 * Animometer/tests/bouncing-particles/resources/bouncing-svg-shapes.js:
3103 (BouncingSvgShape.prototype._createShape):
3104 (BouncingSvgShapesStage.prototype.createGradient):
3105 Call DocumentExtension.createSvgElement() instead of calling Utilities.createSvgElement().
3107 * Animometer/tests/resources/main.js:
3108 (Animator.prototype.animate):
3110 (Benchmark.prototype.update):
3111 * Animometer/tests/resources/stage.js:
3112 (StageBenchmark.prototype.showResults):
3113 Rename the options to match the <input> ids in animometer.html.
3115 * Animometer/tests/resources/utilities.js:
3116 (window.Utilities.createSvgElement): Deleted.
3118 * Animometer/tests/text/layering-text.html:
3119 * Animometer/tests/text/resources/layering-text.js:
3120 (LayeringTextStage):
3121 (LayeringTextStage.prototype._setFontSize): Sets the size of the text dynamically such that they all fit in one stage.
3123 2015-10-29 Simon Fraser <simon.fraser@apple.com>
3125 Animometer computes frame rate incorrectly
3126 https://bugs.webkit.org/show_bug.cgi?id=150698
3128 Reviewed by Tim Horton.
3130 The existing code incremented this._frameCount after checking against this._dropFrameCount.
3131 This has the effect of setting this._measureTimeOffset one frame too late, so
3132 we were measuring only two frames, not three, and thus computing an incorrect fps.
3134 * Animometer/tests/resources/main.js:
3135 (Animator.prototype.animate):
3137 2015-10-27 Jon Lee <jonlee@apple.com>
3139 Add an option to make the graphics benchmark runs a specific test
3140 https://bugs.webkit.org/show_bug.cgi?id=150528
3141 rdar://problem/23246614
3143 Reviewed by Zalan Bujtas.
3145 Add a checkbox that lets the user list all of the available tests, and select
3146 the ones to run repeatedly. The test checkboxes will update the state of the suite
3147 checkbox. The selected tests are stored in localStorage to make it easy to do
3150 * Animometer/runner/animometer.html: Add a checkbox to show individual tests.
3151 Update other markup.
3152 * Animometer/runner/resources/animometer.css: Make the settings area a little wider
3153 to accommodate the longer names of the tests
3154 * Animometer/runner/resources/animometer.js:
3155 (startBenchmark): Change the way that the suites are fed into the benchmark
3156 runner. Go through each of the suites and their tests, and create a new Suite
3157 with just the enabled tests. While enumerating store the enabled tests into
3159 (initialize): Initialization routine (taking over populateSettings). When the
3160 checkbox for showing tests is toggled, add or remove a class on #suites to show
3161 the individual tests.
3162 (updateSuiteSelection): Called whenever the user toggles the checkbox for a suite.
3163 Either select all or none of the tests.
3164 (updateTestSelection): Called whenever the user toggles the checkbox for a test.
3165 (updateSuiteCheckbox): Update the state of the test's suite's checkbox to
3166 indeterminate if there is at least one enabled test, unchecked if none are selected,
3167 and checked if all are selected.
3168 (localStorageNameForTest): Helper function to get the name of the test to use as
3169 a key to localStorage.
3170 (populateSettings): Add the tests for each suite into an inner list.
3172 2015-10-26 Said Abou-Hallawa <sabouhallawa@apple.com>
3174 Add an option to output the results of the graphics benchmark in JSON format
3175 https://bugs.webkit.org/show_bug.cgi?id=150484
3176 <rdar://problem/23243721>
3178 Reviewed by Darin Adler.
3180 * Animometer/resources/extensions.js:
3181 (ResultsDashboard): A new class to hold the iterations results.
3182 (ResultsDashboard.prototype.push): Appends an iteration results;
3183 (ResultsDashboard.prototype.toJSON): Converts the iterations results to JSON format.
3185 (RecordTable.prototype.clear): Clears the results table.
3186 (RecordTable.prototype._showTitles): Shows the header titles and appends the sub-titles to a queue.
3187 (RecordTable.prototype._showHeader): Shows the table header titles.
3188 (RecordTable.prototype._showEmpty): Shows an empty table cell.
3189 (RecordTable.prototype._showValue): Shows a number value in the results table.
3190 (RecordTable.prototype._showSamples): Shows a button for the sampled data graph.
3191 (RecordTable.prototype._showTest): Shows the results of a single test.
3192 (RecordTable.prototype._showSuite): Shows the results of a single suite.
3193 (RecordTable.prototype.showRecord): Shows a single iteration for a single test.
3194 (RecordTable.prototype.showIterations): Shows the results of all the suites of the iterations.
3196 (ResultsTable): RecordTable was renamed to ResultsTable.
3197 (ResultsTable.prototype.clear): Clears the table element.
3198 (ResultsTable.prototype._showHeaderRow): Shows a row in the results table header.
3199 (ResultsTable.prototype._showHeader): Shows the results table header.
3200 (ResultsTable.prototype._showEmpty): Shows an empty table cell.
3201 (ResultsTable.prototype._showText): Shows a string in a new table cell.
3202 (ResultsTable.prototype._showFixedNumber): Shows a number in a new table cell.
3203 (ResultsTable.prototype._showGraph): Shows a button for the sampled data graph.
3204 (ResultsTable.prototype._showJSON): Shows a button for the sampled data JSON.
3205 (ResultsTable.prototype._showTest): Shows the results of a single test.
3206 (ResultsTable.prototype._showSuite): Shows the results of a single suite.
3207 (ResultsTable.prototype._showIteration): Shows the results of a single iteration.
3208 (ResultsTable.prototype.showRecord): Shows a single iteration for a single test.
3209 (ResultsTable.prototype.showIterations): Shows all the results.
3210 (RecordTable): Deleted.
3211 (RecordTable.prototype.clear): Deleted.
3212 (RecordTable.prototype._showTitles): Deleted.
3213 (RecordTable.prototype._showHeader): Deleted.
3214 (RecordTable.prototype._showEmpty): Deleted.
3215 (RecordTable.prototype._showValue): Deleted.
3216 (RecordTable.prototype._showSamples): Deleted.
3217 (RecordTable.prototype._showTest): Deleted.
3218 (RecordTable.prototype._showSuite): Deleted.
3219 (RecordTable.prototype.showRecord): Deleted.
3220 (RecordTable.prototype.showIterations): Deleted.
3222 * Animometer/resources/sampler.js:
3223 (Sampler.prototype.startSampling): Use forEach.