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