[MotionMark] Update Multiply test
[WebKit-https.git] / PerformanceTests / MotionMark / resources / debug-runner / tests.js
1 /*
2  * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23  * THE POSSIBILITY OF SUCH DAMAGE.
24  */
25 Utilities.extendObject(Strings.text, {
26     samples: "Samples",
27     complexity: "Time Complexity",
28     frameRate: "FPS",
29     confidenceInterval: "80% Confidence Interval",
30     mergedRawComplexity: "Raw Complexity",
31     graph: "Graph",
32     title: "MotionMark %s developer",
33 });
34
35
36 Utilities.extendObject(Headers, {
37     details: [
38         {
39             title: Strings.text.graph
40         },
41         {
42             title: Strings.text.confidenceInterval,
43             children:
44             [
45                 {
46                     text: function(data) {
47                         return data[Strings.json.complexity][Strings.json.bootstrap].confidenceLow.toFixed(2);
48                     },
49                     className: "right pad-left pad-right"
50                 },
51                 {
52                     text: function(data) {
53                         return " - " + data[Strings.json.complexity][Strings.json.bootstrap].confidenceHigh.toFixed(2);
54                     },
55                     className: "left"
56                 },
57                 {
58                     text: function(data) {
59                         var bootstrap = data[Strings.json.complexity][Strings.json.bootstrap];
60                         return (100 * (bootstrap.confidenceLow / bootstrap.median - 1)).toFixed(2) + "%";
61                     },
62                     className: "left pad-left small"
63                 },
64                 {
65                     text: function(data) {
66                         var bootstrap = data[Strings.json.complexity][Strings.json.bootstrap];
67                         return "+" + (100 * (bootstrap.confidenceHigh / bootstrap.median - 1)).toFixed(2) + "%";
68                     },
69                     className: "left pad-left small"
70                 }
71             ]
72         },
73         {
74             title: Strings.text.complexity,
75             children:
76             [
77                 {
78                     text: function(data) {
79                         return data[Strings.json.controller][Strings.json.measurements.average].toFixed(2);
80                     },
81                     className: "average"
82                 },
83                 {
84                     text: function(data) {
85                         return [
86                             "± ",
87                             data[Strings.json.controller][Strings.json.measurements.percent].toFixed(2),
88                             "%"
89                         ].join("");
90                     },
91                     className: function(data) {
92                         var className = "stdev";
93
94                         if (data[Strings.json.controller][Strings.json.measurements.percent] >= 10)
95                             className += " noisy-results";
96                         return className;
97                     }
98                 }
99             ]
100         },
101         {
102             title: Strings.text.frameRate,
103             children:
104             [
105                 {
106                     text: function(data) {
107                         return data[Strings.json.frameLength][Strings.json.measurements.average].toFixed(2);
108                     },
109                     className: function(data, options) {
110                         var className = "average";
111                         if (Math.abs(data[Strings.json.frameLength][Strings.json.measurements.average] - options["frame-rate"]) >= 2)
112                             className += " noisy-results";
113                         return className;
114                     }
115                 },
116                 {
117                     text: function(data) {
118                         var frameRateData = data[Strings.json.frameLength];
119                         return [
120                             "± ",
121                             frameRateData[Strings.json.measurements.percent].toFixed(2),
122                             "%"
123                         ].join("");
124                     },
125                     className: function(data) {
126                         var className = "stdev";
127
128                         if (data[Strings.json.frameLength][Strings.json.measurements.percent] >= 10)
129                             className += " noisy-results";
130                         return className;
131                     }
132                 }
133             ]
134         },
135         {
136             title: Strings.text.mergedRawComplexity,
137             children:
138             [
139                 {
140                     text: function(data) {
141                         return data[Strings.json.complexity][Strings.json.complexity].toFixed(2);
142                     },
143                     className: "average"
144                 },
145                 {
146                     text: function(data) {
147                         return [
148                             "± ",
149                             data[Strings.json.complexity][Strings.json.measurements.stdev].toFixed(2),
150                             "ms"
151                         ].join("");
152                     },
153                     className: "stdev"
154                 }
155             ]
156         }
157     ]
158 })
159
160 ///////////
161 // Suites
162
163 Suites.push(new Suite("HTML suite",
164     [
165         {
166             url: "bouncing-particles/bouncing-css-shapes.html?particleWidth=12&particleHeight=12&shape=circle",
167             name: "CSS bouncing circles"
168         },
169         {
170             url: "bouncing-particles/bouncing-css-shapes.html?particleWidth=40&particleHeight=40&shape=rect&clip=star",
171             name: "CSS bouncing clipped rects"
172         },
173         {
174             url: "bouncing-particles/bouncing-css-shapes.html?particleWidth=50&particleHeight=50&shape=circle&fill=gradient",
175             name: "CSS bouncing gradient circles"
176         },
177         {
178             url: "bouncing-particles/bouncing-css-shapes.html?particleWidth=80&particleHeight=80&shape=circle&blend",
179             name: "CSS bouncing blend circles"
180         },
181         {
182             url: "bouncing-particles/bouncing-css-shapes.html?particleWidth=80&particleHeight=80&shape=circle&filter",
183             name: "CSS bouncing filter circles"
184         },
185         {
186             url: "bouncing-particles/bouncing-css-images.html?particleWidth=80&particleHeight=80&imageSrc=../resources/yin-yang.svg",
187             name: "CSS bouncing SVG images"
188         },
189         {
190             url: "bouncing-particles/bouncing-tagged-images.html?particleWidth=100&particleHeight=100",
191             name: "CSS bouncing tagged images"
192         },
193         {
194             url: "dom/focus.html",
195             name: "Focus 2.0"
196         },
197         {
198             url: "dom/particles.html",
199             name: "DOM particles, SVG masks"
200         },
201         {
202             url: "dom/compositing-transforms.html?particleWidth=50&particleHeight=50&filters=yes&imageSrc=../resources/yin-yang.svg",
203             name: "Composited Transforms"
204         }
205     ]
206 ));
207
208 Suites.push(new Suite("Canvas suite",
209     [
210         {
211             url: "bouncing-particles/bouncing-canvas-shapes.html?particleWidth=40&particleHeight=40&shape=rect&clip=star",
212             name: "canvas bouncing clipped rects"
213         },
214         {
215             url: "bouncing-particles/bouncing-canvas-shapes.html?particleWidth=50&particleHeight=50&shape=circle&fill=gradient",
216             name: "canvas bouncing gradient circles"
217         },
218         {
219             url: "bouncing-particles/bouncing-canvas-images.html?particleWidth=80&particleHeight=80&imageSrc=../resources/yin-yang.svg",
220             name: "canvas bouncing SVG images"
221         },
222         {
223             url: "bouncing-particles/bouncing-canvas-images.html?particleWidth=80&particleHeight=80&imageSrc=../resources/yin-yang.png",
224             name: "canvas bouncing PNG images"
225         },
226         {
227             url: "simple/simple-canvas-paths.html?pathType=strokes",
228             name: "Stroke shapes"
229         },
230         {
231             url: "simple/simple-canvas-paths.html?pathType=fills",
232             name: "Fill shapes"
233         },
234         {
235             url: "simple/tiled-canvas-image.html",
236             name: "Canvas put/get image data"
237         },
238     ]
239 ));
240
241 Suites.push(new Suite("SVG suite",
242     [
243         {
244             url: "bouncing-particles/bouncing-svg-shapes.html?particleWidth=12&particleHeight=12&shape=circle",
245             name: "SVG bouncing circles",
246         },
247         {
248             url: "bouncing-particles/bouncing-svg-shapes.html?particleWidth=40&particleHeight=40&shape=rect&clip=star",
249             name: "SVG bouncing clipped rects",
250         },
251         {
252             url: "bouncing-particles/bouncing-svg-shapes.html?particleWidth=50&particleHeight=50&shape=circle&fill=gradient",
253             name: "SVG bouncing gradient circles"
254         },
255         {
256             url: "bouncing-particles/bouncing-svg-images.html?particleWidth=80&particleHeight=80&imageSrc=../resources/yin-yang.svg",
257             name: "SVG bouncing SVG images"
258         },
259         {
260             url: "bouncing-particles/bouncing-svg-images.html?particleWidth=80&particleHeight=80&imageSrc=../resources/yin-yang.png",
261             name: "SVG bouncing PNG images"
262         },
263     ]
264 ));
265
266 Suites.push(new Suite("Leaves suite",
267     [
268         {
269             url: "dom/leaves.html?style=simple",
270             name: "Translate-only Leaves"
271         },
272         {
273             url: "dom/leaves.html?style=scale",
274             name: "Translate + Scale Leaves"
275         },
276         {
277             url: "dom/leaves.html?style=opacity",
278             name: "Translate + Opacity Leaves"
279         }
280     ]
281 ));
282
283 Suites.push(new Suite("Multiply suite",
284     [
285         {
286             url: "dom/multiply.html?style=opacity",
287             name: "Multiply: CSS opacity only"
288         },
289         {
290             url: "dom/multiply.html?style=display",
291             name: "Multiply: CSS display only"
292         },
293         {
294             url: "dom/multiply.html?style=visibility",
295             name: "Multiply: CSS visibility only"
296         }
297     ]
298 ));
299
300 Suites.push(new Suite("Text suite",
301     [
302         {
303             url: "text/design.html?corpus=latin",
304             name: "Design: Latin only (12 items)"
305         },
306         {
307             url: "text/design.html?corpus=cjk",
308             name: "Design: CJK only (12 items)"
309         },
310         {
311             url: "text/design.html?corpus=arabic",
312             name: "Design: RTL and complex scripts only (12 items)"
313         },
314         {
315             url: "text/design-6.html?corpus=latin",
316             name: "Design: Latin only (6 items)"
317         },
318         {
319             url: "text/design-6.html?corpus=cjk",
320             name: "Design: CJK only (6 items)"
321         },
322         {
323             url: "text/design-6.html?corpus=arabic",
324             name: "Design: RTL and complex scripts only (6 items)"
325         },
326     ]
327 ));
328
329 Suites.push(new Suite("Suits suite",
330     [
331         {
332             url: "svg/suits.html?style=clip",
333             name: "Suits: clip only"
334         },
335         {
336             url: "svg/suits.html?style=shape",
337             name: "Suits: shape only"
338         },
339         {
340             url: "svg/suits.html?style=rotation",
341             name: "Suits: clip, shape, rotation"
342         },
343         {
344             url: "svg/suits.html?style=gradient",
345             name: "Suits: clip, shape, gradient"
346         },
347         {
348             url: "svg/suits.html?style=static",
349             name: "Suits: static"
350         },
351     ]
352 ));
353
354 Suites.push(new Suite("3D Graphics",
355     [
356         {
357             url: "3d/webgl.html",
358             name: "WebGL"
359         },
360     ]
361 ));
362
363 Suites.push(new Suite("Basic canvas path suite",
364     [
365         {
366             url: "simple/simple-canvas-paths.html?pathType=line&lineCap=butt",
367             name: "Canvas line segments, butt caps"
368         },
369         {
370             url: "simple/simple-canvas-paths.html?pathType=line&lineCap=round",
371             name: "Canvas line segments, round caps"
372         },
373         {
374             url: "simple/simple-canvas-paths.html?pathType=line&lineCap=square",
375             name: "Canvas line segments, square caps"
376         },
377         {
378             url: "simple/simple-canvas-paths.html?pathType=linePath&lineJoin=bevel",
379             name: "Canvas line path, bevel join"
380         },
381         {
382             url: "simple/simple-canvas-paths.html?pathType=linePath&lineJoin=round",
383             name: "Canvas line path, round join"
384         },
385         {
386             url: "simple/simple-canvas-paths.html?pathType=linePath&lineJoin=miter",
387             name: "Canvas line path, miter join"
388         },
389         {
390             url: "simple/simple-canvas-paths.html?pathType=linePath&lineDash=1",
391             name: "Canvas line path with dash pattern"
392         },
393         {
394             url: "simple/simple-canvas-paths.html?pathType=quadratic",
395             name: "Canvas quadratic segments"
396         },
397         {
398             url: "simple/simple-canvas-paths.html?pathType=quadraticPath",
399             name: "Canvas quadratic path"
400         },
401         {
402             url: "simple/simple-canvas-paths.html?pathType=bezier",
403             name: "Canvas bezier segments"
404         },
405         {
406             url: "simple/simple-canvas-paths.html?pathType=bezierPath",
407             name: "Canvas bezier path"
408         },
409         {
410             url: "simple/simple-canvas-paths.html?&pathType=arcTo",
411             name: "Canvas arcTo segments"
412         },
413         {
414             url: "simple/simple-canvas-paths.html?pathType=arc",
415             name: "Canvas arc segments"
416         },
417         {
418             url: "simple/simple-canvas-paths.html?pathType=rect",
419             name: "Canvas rects"
420         },
421         {
422             url: "simple/simple-canvas-paths.html?pathType=ellipse",
423             name: "Canvas ellipses"
424         },
425         {
426             url: "simple/simple-canvas-paths.html?pathType=lineFill",
427             name: "Canvas line path, fill"
428         },
429         {
430             url: "simple/simple-canvas-paths.html?pathType=quadraticFill",
431             name: "Canvas quadratic path, fill"
432         },
433         {
434             url: "simple/simple-canvas-paths.html?pathType=bezierFill",
435             name: "Canvas bezier path, fill"
436         },
437         {
438             url: "simple/simple-canvas-paths.html?&pathType=arcToFill",
439             name: "Canvas arcTo segments, fill"
440         },
441         {
442             url: "simple/simple-canvas-paths.html?pathType=arcFill",
443             name: "Canvas arc segments, fill"
444         },
445         {
446             url: "simple/simple-canvas-paths.html?pathType=rectFill",
447             name: "Canvas rects, fill"
448         },
449         {
450             url: "simple/simple-canvas-paths.html?pathType=ellipseFill",
451             name: "Canvas ellipses, fill"
452         }
453     ]
454 ));