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