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