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