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