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