03b36268b68dc53f987fe965445f0ea2d9580eda
[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("Text suite",
284     [
285         {
286             url: "text/design.html?corpus=latin",
287             name: "Design: Latin only (12 items)"
288         },
289         {
290             url: "text/design.html?corpus=cjk",
291             name: "Design: CJK only (12 items)"
292         },
293         {
294             url: "text/design.html?corpus=arabic",
295             name: "Design: RTL and complex scripts only (12 items)"
296         },
297         {
298             url: "text/design-6.html?corpus=latin",
299             name: "Design: Latin only (6 items)"
300         },
301         {
302             url: "text/design-6.html?corpus=cjk",
303             name: "Design: CJK only (6 items)"
304         },
305         {
306             url: "text/design-6.html?corpus=arabic",
307             name: "Design: RTL and complex scripts only (6 items)"
308         },
309     ]
310 ));
311
312 Suites.push(new Suite("Suits suite",
313     [
314         {
315             url: "svg/suits.html?style=clip",
316             name: "Suits: clip only"
317         },
318         {
319             url: "svg/suits.html?style=shape",
320             name: "Suits: shape only"
321         },
322         {
323             url: "svg/suits.html?style=rotation",
324             name: "Suits: clip, shape, rotation"
325         },
326         {
327             url: "svg/suits.html?style=gradient",
328             name: "Suits: clip, shape, gradient"
329         },
330         {
331             url: "svg/suits.html?style=static",
332             name: "Suits: static"
333         },
334     ]
335 ));
336
337 Suites.push(new Suite("3D Graphics",
338     [
339         {
340             url: "3d/webgl.html",
341             name: "WebGL"
342         },
343     ]
344 ));
345
346 Suites.push(new Suite("Basic canvas path suite",
347     [
348         {
349             url: "simple/simple-canvas-paths.html?pathType=line&lineCap=butt",
350             name: "Canvas line segments, butt caps"
351         },
352         {
353             url: "simple/simple-canvas-paths.html?pathType=line&lineCap=round",
354             name: "Canvas line segments, round caps"
355         },
356         {
357             url: "simple/simple-canvas-paths.html?pathType=line&lineCap=square",
358             name: "Canvas line segments, square caps"
359         },
360         {
361             url: "simple/simple-canvas-paths.html?pathType=linePath&lineJoin=bevel",
362             name: "Canvas line path, bevel join"
363         },
364         {
365             url: "simple/simple-canvas-paths.html?pathType=linePath&lineJoin=round",
366             name: "Canvas line path, round join"
367         },
368         {
369             url: "simple/simple-canvas-paths.html?pathType=linePath&lineJoin=miter",
370             name: "Canvas line path, miter join"
371         },
372         {
373             url: "simple/simple-canvas-paths.html?pathType=linePath&lineDash=1",
374             name: "Canvas line path with dash pattern"
375         },
376         {
377             url: "simple/simple-canvas-paths.html?pathType=quadratic",
378             name: "Canvas quadratic segments"
379         },
380         {
381             url: "simple/simple-canvas-paths.html?pathType=quadraticPath",
382             name: "Canvas quadratic path"
383         },
384         {
385             url: "simple/simple-canvas-paths.html?pathType=bezier",
386             name: "Canvas bezier segments"
387         },
388         {
389             url: "simple/simple-canvas-paths.html?pathType=bezierPath",
390             name: "Canvas bezier path"
391         },
392         {
393             url: "simple/simple-canvas-paths.html?&pathType=arcTo",
394             name: "Canvas arcTo segments"
395         },
396         {
397             url: "simple/simple-canvas-paths.html?pathType=arc",
398             name: "Canvas arc segments"
399         },
400         {
401             url: "simple/simple-canvas-paths.html?pathType=rect",
402             name: "Canvas rects"
403         },
404         {
405             url: "simple/simple-canvas-paths.html?pathType=ellipse",
406             name: "Canvas ellipses"
407         },
408         {
409             url: "simple/simple-canvas-paths.html?pathType=lineFill",
410             name: "Canvas line path, fill"
411         },
412         {
413             url: "simple/simple-canvas-paths.html?pathType=quadraticFill",
414             name: "Canvas quadratic path, fill"
415         },
416         {
417             url: "simple/simple-canvas-paths.html?pathType=bezierFill",
418             name: "Canvas bezier path, fill"
419         },
420         {
421             url: "simple/simple-canvas-paths.html?&pathType=arcToFill",
422             name: "Canvas arcTo segments, fill"
423         },
424         {
425             url: "simple/simple-canvas-paths.html?pathType=arcFill",
426             name: "Canvas arc segments, fill"
427         },
428         {
429             url: "simple/simple-canvas-paths.html?pathType=rectFill",
430             name: "Canvas rects, fill"
431         },
432         {
433             url: "simple/simple-canvas-paths.html?pathType=ellipseFill",
434             name: "Canvas ellipses, fill"
435         }
436     ]
437 ));