summaryrefslogtreecommitdiffstats
path: root/third_party/webkit/PerformanceTests/MotionMark/resources/debug-runner/tests.js
blob: accaa3c3dfb27bc9ed18d020910e759d513c98da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
Utilities.extendObject(Strings.text, {
    samples: "Samples",
    complexity: "Time Complexity",
    frameRate: "FPS",
    confidenceInterval: "80% Confidence Interval",
    mergedRawComplexity: "Raw Complexity",
    graph: "Graph"
});


Utilities.extendObject(Headers, {
    details: [
        {
            title: Strings.text.graph
        },
        {
            title: Strings.text.confidenceInterval,
            children:
            [
                {
                    text: function(data) {
                        return data[Strings.json.complexity][Strings.json.bootstrap].confidenceLow.toFixed(2);
                    },
                    className: "right pad-left pad-right"
                },
                {
                    text: function(data) {
                        return " - " + data[Strings.json.complexity][Strings.json.bootstrap].confidenceHigh.toFixed(2);
                    },
                    className: "left"
                },
                {
                    text: function(data) {
                        var bootstrap = data[Strings.json.complexity][Strings.json.bootstrap];
                        return (100 * (bootstrap.confidenceLow / bootstrap.median - 1)).toFixed(2) + "%";
                    },
                    className: "left pad-left small"
                },
                {
                    text: function(data) {
                        var bootstrap = data[Strings.json.complexity][Strings.json.bootstrap];
                        return "+" + (100 * (bootstrap.confidenceHigh / bootstrap.median - 1)).toFixed(2) + "%";
                    },
                    className: "left pad-left small"
                }
            ]
        },
        {
            title: Strings.text.complexity,
            children:
            [
                {
                    text: function(data) {
                        return data[Strings.json.controller][Strings.json.measurements.average].toFixed(2);
                    },
                    className: "average"
                },
                {
                    text: function(data) {
                        return [
                            "± ",
                            data[Strings.json.controller][Strings.json.measurements.percent].toFixed(2),
                            "%"
                        ].join("");
                    },
                    className: function(data) {
                        var className = "stdev";

                        if (data[Strings.json.controller][Strings.json.measurements.percent] >= 10)
                            className += " noisy-results";
                        return className;
                    }
                }
            ]
        },
        {
            title: Strings.text.frameRate,
            children:
            [
                {
                    text: function(data) {
                        return data[Strings.json.frameLength][Strings.json.measurements.average].toFixed(2);
                    },
                    className: function(data, options) {
                        var className = "average";
                        if (Math.abs(data[Strings.json.frameLength][Strings.json.measurements.average] - options["frame-rate"]) >= 2)
                            className += " noisy-results";
                        return className;
                    }
                },
                {
                    text: function(data) {
                        var frameRateData = data[Strings.json.frameLength];
                        return [
                            "± ",
                            frameRateData[Strings.json.measurements.percent].toFixed(2),
                            "%"
                        ].join("");
                    },
                    className: function(data) {
                        var className = "stdev";

                        if (data[Strings.json.frameLength][Strings.json.measurements.percent] >= 10)
                            className += " noisy-results";
                        return className;
                    }
                }
            ]
        },
        {
            title: Strings.text.mergedRawComplexity,
            children:
            [
                {
                    text: function(data) {
                        return data[Strings.json.complexity][Strings.json.complexity].toFixed(2);
                    },
                    className: "average"
                },
                {
                    text: function(data) {
                        return [
                            "± ",
                            data[Strings.json.complexity][Strings.json.measurements.stdev].toFixed(2),
                            "ms"
                        ].join("");
                    },
                    className: "stdev"
                }
            ]
        }
    ]
})

///////////
// Suites

Suites.push(new Suite("HTML suite",
    [
        {
            url: "bouncing-particles/bouncing-css-shapes.html?particleWidth=12&particleHeight=12&shape=circle",
            name: "CSS bouncing circles"
        },
        {
            url: "bouncing-particles/bouncing-css-shapes.html?particleWidth=40&particleHeight=40&shape=rect&clip=star",
            name: "CSS bouncing clipped rects"
        },
        {
            url: "bouncing-particles/bouncing-css-shapes.html?particleWidth=50&particleHeight=50&shape=circle&fill=gradient",
            name: "CSS bouncing gradient circles"
        },
        {
            url: "bouncing-particles/bouncing-css-shapes.html?particleWidth=80&particleHeight=80&shape=circle&blend",
            name: "CSS bouncing blend circles"
        },
        {
            url: "bouncing-particles/bouncing-css-shapes.html?particleWidth=80&particleHeight=80&shape=circle&filter",
            name: "CSS bouncing filter circles"
        },
        {
            url: "bouncing-particles/bouncing-css-images.html?particleWidth=80&particleHeight=80&imageSrc=../resources/yin-yang.svg",
            name: "CSS bouncing SVG images"
        },
        {
            url: "bouncing-particles/bouncing-tagged-images.html?particleWidth=100&particleHeight=100",
            name: "CSS bouncing tagged images"
        },
        {
            url: "dom/leaves.html",
            name: "Leaves 2.0"
        },
        {
            url: "dom/focus.html",
            name: "Focus 2.0"
        },
        {
            url: "dom/particles.html",
            name: "DOM particles, SVG masks"
        },
        {
            url: "dom/compositing-transforms.html?particleWidth=50&particleHeight=50&filters=yes&imageSrc=../resources/yin-yang.svg",
            name: "Composited Transforms"
        }
    ]
));

Suites.push(new Suite("Canvas suite",
    [
        {
            url: "bouncing-particles/bouncing-canvas-shapes.html?particleWidth=40&particleHeight=40&shape=rect&clip=star",
            name: "canvas bouncing clipped rects"
        },
        {
            url: "bouncing-particles/bouncing-canvas-shapes.html?particleWidth=50&particleHeight=50&shape=circle&fill=gradient",
            name: "canvas bouncing gradient circles"
        },
        {
            url: "bouncing-particles/bouncing-canvas-images.html?particleWidth=80&particleHeight=80&imageSrc=../resources/yin-yang.svg",
            name: "canvas bouncing SVG images"
        },
        {
            url: "bouncing-particles/bouncing-canvas-images.html?particleWidth=80&particleHeight=80&imageSrc=../resources/yin-yang.png",
            name: "canvas bouncing PNG images"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=strokes",
            name: "Stroke shapes"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=fills",
            name: "Fill shapes"
        },
        {
            url: "simple/tiled-canvas-image.html",
            name: "Canvas put/get image data"
        },
    ]
));

Suites.push(new Suite("SVG suite",
    [
        {
            url: "bouncing-particles/bouncing-svg-shapes.html?particleWidth=12&particleHeight=12&shape=circle",
            name: "SVG bouncing circles",
        },
        {
            url: "bouncing-particles/bouncing-svg-shapes.html?particleWidth=40&particleHeight=40&shape=rect&clip=star",
            name: "SVG bouncing clipped rects",
        },
        {
            url: "bouncing-particles/bouncing-svg-shapes.html?particleWidth=50&particleHeight=50&shape=circle&fill=gradient",
            name: "SVG bouncing gradient circles"
        },
        {
            url: "bouncing-particles/bouncing-svg-images.html?particleWidth=80&particleHeight=80&imageSrc=../resources/yin-yang.svg",
            name: "SVG bouncing SVG images"
        },
        {
            url: "bouncing-particles/bouncing-svg-images.html?particleWidth=80&particleHeight=80&imageSrc=../resources/yin-yang.png",
            name: "SVG bouncing PNG images"
        },
    ]
));

Suites.push(new Suite("3D Graphics",
    [
        {
            url: "3d/webgl.html",
            name: "WebGL"
        },
    ]
));

Suites.push(new Suite("Basic canvas path suite",
    [
        {
            url: "simple/simple-canvas-paths.html?pathType=line&lineCap=butt",
            name: "Canvas line segments, butt caps"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=line&lineCap=round",
            name: "Canvas line segments, round caps"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=line&lineCap=square",
            name: "Canvas line segments, square caps"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=linePath&lineJoin=bevel",
            name: "Canvas line path, bevel join"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=linePath&lineJoin=round",
            name: "Canvas line path, round join"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=linePath&lineJoin=miter",
            name: "Canvas line path, miter join"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=linePath&lineDash=1",
            name: "Canvas line path with dash pattern"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=quadratic",
            name: "Canvas quadratic segments"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=quadraticPath",
            name: "Canvas quadratic path"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=bezier",
            name: "Canvas bezier segments"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=bezierPath",
            name: "Canvas bezier path"
        },
        {
            url: "simple/simple-canvas-paths.html?&pathType=arcTo",
            name: "Canvas arcTo segments"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=arc",
            name: "Canvas arc segments"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=rect",
            name: "Canvas rects"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=ellipse",
            name: "Canvas ellipses"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=lineFill",
            name: "Canvas line path, fill"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=quadraticFill",
            name: "Canvas quadratic path, fill"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=bezierFill",
            name: "Canvas bezier path, fill"
        },
        {
            url: "simple/simple-canvas-paths.html?&pathType=arcToFill",
            name: "Canvas arcTo segments, fill"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=arcFill",
            name: "Canvas arc segments, fill"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=rectFill",
            name: "Canvas rects, fill"
        },
        {
            url: "simple/simple-canvas-paths.html?pathType=ellipseFill",
            name: "Canvas ellipses, fill"
        }
    ]
));