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