Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / skia / infra / bots / recipes / perf_skottietrace.expected / Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-SkottieTracing.json
1 [
2   {
3     "cmd": [
4       "vpython",
5       "-u",
6       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
7       "--json-output",
8       "/path/to/tmp/json",
9       "ensure-directory",
10       "--mode",
11       "0777",
12       "[START_DIR]/tmp"
13     ],
14     "infra_step": true,
15     "name": "makedirs tmp_dir"
16   },
17   {
18     "cmd": [
19       "vpython",
20       "-u",
21       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
22       "--json-output",
23       "/path/to/tmp/json",
24       "copy",
25       "[START_DIR]/skia/infra/bots/assets/lottie-samples/VERSION",
26       "/path/to/tmp/"
27     ],
28     "infra_step": true,
29     "name": "Get lottie-samples VERSION",
30     "~followup_annotations": [
31       "@@@STEP_LOG_LINE@VERSION@42@@@",
32       "@@@STEP_LOG_END@VERSION@@@"
33     ]
34   },
35   {
36     "cmd": [
37       "vpython",
38       "-u",
39       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
40       "--json-output",
41       "/path/to/tmp/json",
42       "copy",
43       "42",
44       "[START_DIR]/tmp/LOTTIE_VERSION"
45     ],
46     "infra_step": true,
47     "name": "write LOTTIE_VERSION",
48     "~followup_annotations": [
49       "@@@STEP_LOG_LINE@LOTTIE_VERSION@42@@@",
50       "@@@STEP_LOG_END@LOTTIE_VERSION@@@"
51     ]
52   },
53   {
54     "cmd": [
55       "vpython",
56       "-u",
57       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
58       "--json-output",
59       "/path/to/tmp/json",
60       "rmtree",
61       "[START_DIR]/[SWARM_OUT_DIR]"
62     ],
63     "infra_step": true,
64     "name": "rmtree [SWARM_OUT_DIR]"
65   },
66   {
67     "cmd": [
68       "vpython",
69       "-u",
70       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
71       "--json-output",
72       "/path/to/tmp/json",
73       "ensure-directory",
74       "--mode",
75       "0777",
76       "[START_DIR]/[SWARM_OUT_DIR]"
77     ],
78     "infra_step": true,
79     "name": "makedirs [SWARM_OUT_DIR]"
80   },
81   {
82     "cmd": [
83       "vpython",
84       "-u",
85       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
86       "--json-output",
87       "/path/to/tmp/json",
88       "listdir",
89       "[START_DIR]/lottie-samples"
90     ],
91     "infra_step": true,
92     "name": "list lottie files",
93     "~followup_annotations": [
94       "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/LICENSE@@@",
95       "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/lottie 3!.json@@@",
96       "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/lottie(test)'!2.json@@@",
97       "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/lottie1.json@@@",
98       "@@@STEP_LOG_END@listdir@@@"
99     ]
100   },
101   {
102     "cmd": [
103       "catchsegv",
104       "[START_DIR]/build/dm",
105       "--resourcePath",
106       "[START_DIR]/skia/resources",
107       "--lotties",
108       "[START_DIR]/lottie-samples",
109       "--src",
110       "lottie",
111       "--nonativeFonts",
112       "--verbose",
113       "--traceMatch",
114       "skottie",
115       "--trace",
116       "[START_DIR]/[SWARM_OUT_DIR]/2.json",
117       "--match",
118       "^lottie 3!.json$",
119       "--config",
120       "8888",
121       "--nogpu"
122     ],
123     "env": {
124       "CHROME_HEADLESS": "1",
125       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
126     },
127     "name": "dm"
128   },
129   {
130     "cmd": [
131       "vpython",
132       "-u",
133       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
134       "--json-output",
135       "/path/to/tmp/json",
136       "copy",
137       "[START_DIR]/[SWARM_OUT_DIR]/2.json",
138       "/path/to/tmp/"
139     ],
140     "infra_step": true,
141     "name": "read [START_DIR]/[SWARM_OUT_DIR]/2.json",
142     "~followup_annotations": [
143       "@@@STEP_LOG_END@2.json@@@"
144     ]
145   },
146   {
147     "cmd": [
148       "python",
149       "-u",
150       "\nimport json\nimport sys\n\ntrace_output = sys.argv[1]\ntrace_json = json.loads(trace_output)\nlottie_filename = sys.argv[2]\noutput_json_file = sys.argv[3]\n\nperf_results = {}\nframe_max = 0\nframe_min = 0\nframe_cumulative = 0\ncurrent_frame_duration = 0\ntotal_frames = 0\nframe_start = False\nfor trace in trace_json:\n  if 'skottie::Animation::seek' in trace['name']:\n    if frame_start:\n      raise Exception('We got consecutive Animation::seek without a ' +\n                      'render. Something is wrong.')\n    frame_start = True\n    current_frame_duration = trace['dur']\n  elif 'skottie::Animation::render' in trace['name']:\n    if not frame_start:\n      raise Exception('We got an Animation::render without a seek first. ' +\n                      'Something is wrong.')\n\n    current_frame_duration += trace['dur']\n    frame_start = False\n    total_frames += 1\n    frame_max = max(frame_max, current_frame_duration)\n    frame_min = (min(frame_min, current_frame_duration)\n                 if frame_min else current_frame_duration)\n    frame_cumulative += current_frame_duration\n\nexpected_dm_frames = 25\nif total_frames != expected_dm_frames:\n  raise Exception(\n      'Got ' + str(total_frames) + ' frames instead of ' +\n      str(expected_dm_frames))\nperf_results['frame_max_us'] = frame_max\nperf_results['frame_min_us'] = frame_min\nperf_results['frame_avg_us'] = frame_cumulative/total_frames\n\n# Write perf_results to the output json.\nwith open(output_json_file, 'w') as f:\n  f.write(json.dumps(perf_results))\n",
151       "\n[{\"ph\":\"X\",\"name\":\"void skottie::Animation::seek(SkScalar)\",\"ts\":452,\"dur\":2.57,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void SkCanvas::drawPaint(const SkPaint &)\",\"ts\":473,\"dur\":2.67e+03,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void skottie::Animation::seek(SkScalar)\",\"ts\":3.15e+03,\"dur\":2.25,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void skottie::Animation::render(SkCanvas *, const SkRect *, RenderFlags) const\",\"ts\":3.15e+03,\"dur\":216,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void SkCanvas::drawPath(const SkPath &, const SkPaint &)\",\"ts\":3.35e+03,\"dur\":15.1,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void skottie::Animation::seek(SkScalar)\",\"ts\":3.37e+03,\"dur\":1.17,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void skottie::Animation::render(SkCanvas *, const SkRect *, RenderFlags) const\",\"ts\":3.37e+03,\"dur\":140,\"tid\":1,\"pid\":0}]\n",
152       "lottie 3!.json",
153       "/path/to/tmp/json"
154     ],
155     "env": {
156       "CHROME_HEADLESS": "1",
157       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
158     },
159     "name": "parse lottie 3!.json trace",
160     "~followup_annotations": [
161       "@@@STEP_LOG_LINE@json.output@{@@@",
162       "@@@STEP_LOG_LINE@json.output@  \"frame_avg_us\": 179.71, @@@",
163       "@@@STEP_LOG_LINE@json.output@  \"frame_max_us\": 218.25, @@@",
164       "@@@STEP_LOG_LINE@json.output@  \"frame_min_us\": 141.17@@@",
165       "@@@STEP_LOG_LINE@json.output@}@@@",
166       "@@@STEP_LOG_END@json.output@@@",
167       "@@@STEP_LOG_LINE@python.inline@@@@",
168       "@@@STEP_LOG_LINE@python.inline@import json@@@",
169       "@@@STEP_LOG_LINE@python.inline@import sys@@@",
170       "@@@STEP_LOG_LINE@python.inline@@@@",
171       "@@@STEP_LOG_LINE@python.inline@trace_output = sys.argv[1]@@@",
172       "@@@STEP_LOG_LINE@python.inline@trace_json = json.loads(trace_output)@@@",
173       "@@@STEP_LOG_LINE@python.inline@lottie_filename = sys.argv[2]@@@",
174       "@@@STEP_LOG_LINE@python.inline@output_json_file = sys.argv[3]@@@",
175       "@@@STEP_LOG_LINE@python.inline@@@@",
176       "@@@STEP_LOG_LINE@python.inline@perf_results = {}@@@",
177       "@@@STEP_LOG_LINE@python.inline@frame_max = 0@@@",
178       "@@@STEP_LOG_LINE@python.inline@frame_min = 0@@@",
179       "@@@STEP_LOG_LINE@python.inline@frame_cumulative = 0@@@",
180       "@@@STEP_LOG_LINE@python.inline@current_frame_duration = 0@@@",
181       "@@@STEP_LOG_LINE@python.inline@total_frames = 0@@@",
182       "@@@STEP_LOG_LINE@python.inline@frame_start = False@@@",
183       "@@@STEP_LOG_LINE@python.inline@for trace in trace_json:@@@",
184       "@@@STEP_LOG_LINE@python.inline@  if 'skottie::Animation::seek' in trace['name']:@@@",
185       "@@@STEP_LOG_LINE@python.inline@    if frame_start:@@@",
186       "@@@STEP_LOG_LINE@python.inline@      raise Exception('We got consecutive Animation::seek without a ' +@@@",
187       "@@@STEP_LOG_LINE@python.inline@                      'render. Something is wrong.')@@@",
188       "@@@STEP_LOG_LINE@python.inline@    frame_start = True@@@",
189       "@@@STEP_LOG_LINE@python.inline@    current_frame_duration = trace['dur']@@@",
190       "@@@STEP_LOG_LINE@python.inline@  elif 'skottie::Animation::render' in trace['name']:@@@",
191       "@@@STEP_LOG_LINE@python.inline@    if not frame_start:@@@",
192       "@@@STEP_LOG_LINE@python.inline@      raise Exception('We got an Animation::render without a seek first. ' +@@@",
193       "@@@STEP_LOG_LINE@python.inline@                      'Something is wrong.')@@@",
194       "@@@STEP_LOG_LINE@python.inline@@@@",
195       "@@@STEP_LOG_LINE@python.inline@    current_frame_duration += trace['dur']@@@",
196       "@@@STEP_LOG_LINE@python.inline@    frame_start = False@@@",
197       "@@@STEP_LOG_LINE@python.inline@    total_frames += 1@@@",
198       "@@@STEP_LOG_LINE@python.inline@    frame_max = max(frame_max, current_frame_duration)@@@",
199       "@@@STEP_LOG_LINE@python.inline@    frame_min = (min(frame_min, current_frame_duration)@@@",
200       "@@@STEP_LOG_LINE@python.inline@                 if frame_min else current_frame_duration)@@@",
201       "@@@STEP_LOG_LINE@python.inline@    frame_cumulative += current_frame_duration@@@",
202       "@@@STEP_LOG_LINE@python.inline@@@@",
203       "@@@STEP_LOG_LINE@python.inline@expected_dm_frames = 25@@@",
204       "@@@STEP_LOG_LINE@python.inline@if total_frames != expected_dm_frames:@@@",
205       "@@@STEP_LOG_LINE@python.inline@  raise Exception(@@@",
206       "@@@STEP_LOG_LINE@python.inline@      'Got ' + str(total_frames) + ' frames instead of ' +@@@",
207       "@@@STEP_LOG_LINE@python.inline@      str(expected_dm_frames))@@@",
208       "@@@STEP_LOG_LINE@python.inline@perf_results['frame_max_us'] = frame_max@@@",
209       "@@@STEP_LOG_LINE@python.inline@perf_results['frame_min_us'] = frame_min@@@",
210       "@@@STEP_LOG_LINE@python.inline@perf_results['frame_avg_us'] = frame_cumulative/total_frames@@@",
211       "@@@STEP_LOG_LINE@python.inline@@@@",
212       "@@@STEP_LOG_LINE@python.inline@# Write perf_results to the output json.@@@",
213       "@@@STEP_LOG_LINE@python.inline@with open(output_json_file, 'w') as f:@@@",
214       "@@@STEP_LOG_LINE@python.inline@  f.write(json.dumps(perf_results))@@@",
215       "@@@STEP_LOG_END@python.inline@@@"
216     ]
217   },
218   {
219     "cmd": [
220       "vpython",
221       "-u",
222       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
223       "--json-output",
224       "/path/to/tmp/json",
225       "remove",
226       "[START_DIR]/[SWARM_OUT_DIR]/2.json"
227     ],
228     "infra_step": true,
229     "name": "remove [START_DIR]/[SWARM_OUT_DIR]/2.json"
230   },
231   {
232     "cmd": [
233       "catchsegv",
234       "[START_DIR]/build/dm",
235       "--resourcePath",
236       "[START_DIR]/skia/resources",
237       "--lotties",
238       "[START_DIR]/lottie-samples",
239       "--src",
240       "lottie",
241       "--nonativeFonts",
242       "--verbose",
243       "--traceMatch",
244       "skottie",
245       "--trace",
246       "[START_DIR]/[SWARM_OUT_DIR]/3.json",
247       "--match",
248       "^lottie(test)'!2.json$",
249       "--config",
250       "8888",
251       "--nogpu"
252     ],
253     "env": {
254       "CHROME_HEADLESS": "1",
255       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
256     },
257     "name": "dm (2)"
258   },
259   {
260     "cmd": [
261       "vpython",
262       "-u",
263       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
264       "--json-output",
265       "/path/to/tmp/json",
266       "copy",
267       "[START_DIR]/[SWARM_OUT_DIR]/3.json",
268       "/path/to/tmp/"
269     ],
270     "infra_step": true,
271     "name": "read [START_DIR]/[SWARM_OUT_DIR]/3.json",
272     "~followup_annotations": [
273       "@@@STEP_LOG_END@3.json@@@"
274     ]
275   },
276   {
277     "cmd": [
278       "python",
279       "-u",
280       "\nimport json\nimport sys\n\ntrace_output = sys.argv[1]\ntrace_json = json.loads(trace_output)\nlottie_filename = sys.argv[2]\noutput_json_file = sys.argv[3]\n\nperf_results = {}\nframe_max = 0\nframe_min = 0\nframe_cumulative = 0\ncurrent_frame_duration = 0\ntotal_frames = 0\nframe_start = False\nfor trace in trace_json:\n  if 'skottie::Animation::seek' in trace['name']:\n    if frame_start:\n      raise Exception('We got consecutive Animation::seek without a ' +\n                      'render. Something is wrong.')\n    frame_start = True\n    current_frame_duration = trace['dur']\n  elif 'skottie::Animation::render' in trace['name']:\n    if not frame_start:\n      raise Exception('We got an Animation::render without a seek first. ' +\n                      'Something is wrong.')\n\n    current_frame_duration += trace['dur']\n    frame_start = False\n    total_frames += 1\n    frame_max = max(frame_max, current_frame_duration)\n    frame_min = (min(frame_min, current_frame_duration)\n                 if frame_min else current_frame_duration)\n    frame_cumulative += current_frame_duration\n\nexpected_dm_frames = 25\nif total_frames != expected_dm_frames:\n  raise Exception(\n      'Got ' + str(total_frames) + ' frames instead of ' +\n      str(expected_dm_frames))\nperf_results['frame_max_us'] = frame_max\nperf_results['frame_min_us'] = frame_min\nperf_results['frame_avg_us'] = frame_cumulative/total_frames\n\n# Write perf_results to the output json.\nwith open(output_json_file, 'w') as f:\n  f.write(json.dumps(perf_results))\n",
281       "\n[{\"ph\":\"X\",\"name\":\"void skottie::Animation::seek(SkScalar)\",\"ts\":452,\"dur\":2.57,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void SkCanvas::drawPaint(const SkPaint &)\",\"ts\":473,\"dur\":2.67e+03,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void skottie::Animation::seek(SkScalar)\",\"ts\":3.15e+03,\"dur\":2.25,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void skottie::Animation::render(SkCanvas *, const SkRect *, RenderFlags) const\",\"ts\":3.15e+03,\"dur\":216,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void SkCanvas::drawPath(const SkPath &, const SkPaint &)\",\"ts\":3.35e+03,\"dur\":15.1,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void skottie::Animation::seek(SkScalar)\",\"ts\":3.37e+03,\"dur\":1.17,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void skottie::Animation::render(SkCanvas *, const SkRect *, RenderFlags) const\",\"ts\":3.37e+03,\"dur\":140,\"tid\":1,\"pid\":0}]\n",
282       "lottie(test)'!2.json",
283       "/path/to/tmp/json"
284     ],
285     "env": {
286       "CHROME_HEADLESS": "1",
287       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
288     },
289     "name": "parse lottie(test)'!2.json trace",
290     "~followup_annotations": [
291       "@@@STEP_LOG_LINE@json.output@{@@@",
292       "@@@STEP_LOG_LINE@json.output@  \"frame_avg_us\": 179.71, @@@",
293       "@@@STEP_LOG_LINE@json.output@  \"frame_max_us\": 218.25, @@@",
294       "@@@STEP_LOG_LINE@json.output@  \"frame_min_us\": 141.17@@@",
295       "@@@STEP_LOG_LINE@json.output@}@@@",
296       "@@@STEP_LOG_END@json.output@@@",
297       "@@@STEP_LOG_LINE@python.inline@@@@",
298       "@@@STEP_LOG_LINE@python.inline@import json@@@",
299       "@@@STEP_LOG_LINE@python.inline@import sys@@@",
300       "@@@STEP_LOG_LINE@python.inline@@@@",
301       "@@@STEP_LOG_LINE@python.inline@trace_output = sys.argv[1]@@@",
302       "@@@STEP_LOG_LINE@python.inline@trace_json = json.loads(trace_output)@@@",
303       "@@@STEP_LOG_LINE@python.inline@lottie_filename = sys.argv[2]@@@",
304       "@@@STEP_LOG_LINE@python.inline@output_json_file = sys.argv[3]@@@",
305       "@@@STEP_LOG_LINE@python.inline@@@@",
306       "@@@STEP_LOG_LINE@python.inline@perf_results = {}@@@",
307       "@@@STEP_LOG_LINE@python.inline@frame_max = 0@@@",
308       "@@@STEP_LOG_LINE@python.inline@frame_min = 0@@@",
309       "@@@STEP_LOG_LINE@python.inline@frame_cumulative = 0@@@",
310       "@@@STEP_LOG_LINE@python.inline@current_frame_duration = 0@@@",
311       "@@@STEP_LOG_LINE@python.inline@total_frames = 0@@@",
312       "@@@STEP_LOG_LINE@python.inline@frame_start = False@@@",
313       "@@@STEP_LOG_LINE@python.inline@for trace in trace_json:@@@",
314       "@@@STEP_LOG_LINE@python.inline@  if 'skottie::Animation::seek' in trace['name']:@@@",
315       "@@@STEP_LOG_LINE@python.inline@    if frame_start:@@@",
316       "@@@STEP_LOG_LINE@python.inline@      raise Exception('We got consecutive Animation::seek without a ' +@@@",
317       "@@@STEP_LOG_LINE@python.inline@                      'render. Something is wrong.')@@@",
318       "@@@STEP_LOG_LINE@python.inline@    frame_start = True@@@",
319       "@@@STEP_LOG_LINE@python.inline@    current_frame_duration = trace['dur']@@@",
320       "@@@STEP_LOG_LINE@python.inline@  elif 'skottie::Animation::render' in trace['name']:@@@",
321       "@@@STEP_LOG_LINE@python.inline@    if not frame_start:@@@",
322       "@@@STEP_LOG_LINE@python.inline@      raise Exception('We got an Animation::render without a seek first. ' +@@@",
323       "@@@STEP_LOG_LINE@python.inline@                      'Something is wrong.')@@@",
324       "@@@STEP_LOG_LINE@python.inline@@@@",
325       "@@@STEP_LOG_LINE@python.inline@    current_frame_duration += trace['dur']@@@",
326       "@@@STEP_LOG_LINE@python.inline@    frame_start = False@@@",
327       "@@@STEP_LOG_LINE@python.inline@    total_frames += 1@@@",
328       "@@@STEP_LOG_LINE@python.inline@    frame_max = max(frame_max, current_frame_duration)@@@",
329       "@@@STEP_LOG_LINE@python.inline@    frame_min = (min(frame_min, current_frame_duration)@@@",
330       "@@@STEP_LOG_LINE@python.inline@                 if frame_min else current_frame_duration)@@@",
331       "@@@STEP_LOG_LINE@python.inline@    frame_cumulative += current_frame_duration@@@",
332       "@@@STEP_LOG_LINE@python.inline@@@@",
333       "@@@STEP_LOG_LINE@python.inline@expected_dm_frames = 25@@@",
334       "@@@STEP_LOG_LINE@python.inline@if total_frames != expected_dm_frames:@@@",
335       "@@@STEP_LOG_LINE@python.inline@  raise Exception(@@@",
336       "@@@STEP_LOG_LINE@python.inline@      'Got ' + str(total_frames) + ' frames instead of ' +@@@",
337       "@@@STEP_LOG_LINE@python.inline@      str(expected_dm_frames))@@@",
338       "@@@STEP_LOG_LINE@python.inline@perf_results['frame_max_us'] = frame_max@@@",
339       "@@@STEP_LOG_LINE@python.inline@perf_results['frame_min_us'] = frame_min@@@",
340       "@@@STEP_LOG_LINE@python.inline@perf_results['frame_avg_us'] = frame_cumulative/total_frames@@@",
341       "@@@STEP_LOG_LINE@python.inline@@@@",
342       "@@@STEP_LOG_LINE@python.inline@# Write perf_results to the output json.@@@",
343       "@@@STEP_LOG_LINE@python.inline@with open(output_json_file, 'w') as f:@@@",
344       "@@@STEP_LOG_LINE@python.inline@  f.write(json.dumps(perf_results))@@@",
345       "@@@STEP_LOG_END@python.inline@@@"
346     ]
347   },
348   {
349     "cmd": [
350       "vpython",
351       "-u",
352       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
353       "--json-output",
354       "/path/to/tmp/json",
355       "remove",
356       "[START_DIR]/[SWARM_OUT_DIR]/3.json"
357     ],
358     "infra_step": true,
359     "name": "remove [START_DIR]/[SWARM_OUT_DIR]/3.json"
360   },
361   {
362     "cmd": [
363       "catchsegv",
364       "[START_DIR]/build/dm",
365       "--resourcePath",
366       "[START_DIR]/skia/resources",
367       "--lotties",
368       "[START_DIR]/lottie-samples",
369       "--src",
370       "lottie",
371       "--nonativeFonts",
372       "--verbose",
373       "--traceMatch",
374       "skottie",
375       "--trace",
376       "[START_DIR]/[SWARM_OUT_DIR]/4.json",
377       "--match",
378       "^lottie1.json$",
379       "--config",
380       "8888",
381       "--nogpu"
382     ],
383     "env": {
384       "CHROME_HEADLESS": "1",
385       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
386     },
387     "name": "dm (3)"
388   },
389   {
390     "cmd": [
391       "vpython",
392       "-u",
393       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
394       "--json-output",
395       "/path/to/tmp/json",
396       "copy",
397       "[START_DIR]/[SWARM_OUT_DIR]/4.json",
398       "/path/to/tmp/"
399     ],
400     "infra_step": true,
401     "name": "read [START_DIR]/[SWARM_OUT_DIR]/4.json",
402     "~followup_annotations": [
403       "@@@STEP_LOG_END@4.json@@@"
404     ]
405   },
406   {
407     "cmd": [
408       "python",
409       "-u",
410       "\nimport json\nimport sys\n\ntrace_output = sys.argv[1]\ntrace_json = json.loads(trace_output)\nlottie_filename = sys.argv[2]\noutput_json_file = sys.argv[3]\n\nperf_results = {}\nframe_max = 0\nframe_min = 0\nframe_cumulative = 0\ncurrent_frame_duration = 0\ntotal_frames = 0\nframe_start = False\nfor trace in trace_json:\n  if 'skottie::Animation::seek' in trace['name']:\n    if frame_start:\n      raise Exception('We got consecutive Animation::seek without a ' +\n                      'render. Something is wrong.')\n    frame_start = True\n    current_frame_duration = trace['dur']\n  elif 'skottie::Animation::render' in trace['name']:\n    if not frame_start:\n      raise Exception('We got an Animation::render without a seek first. ' +\n                      'Something is wrong.')\n\n    current_frame_duration += trace['dur']\n    frame_start = False\n    total_frames += 1\n    frame_max = max(frame_max, current_frame_duration)\n    frame_min = (min(frame_min, current_frame_duration)\n                 if frame_min else current_frame_duration)\n    frame_cumulative += current_frame_duration\n\nexpected_dm_frames = 25\nif total_frames != expected_dm_frames:\n  raise Exception(\n      'Got ' + str(total_frames) + ' frames instead of ' +\n      str(expected_dm_frames))\nperf_results['frame_max_us'] = frame_max\nperf_results['frame_min_us'] = frame_min\nperf_results['frame_avg_us'] = frame_cumulative/total_frames\n\n# Write perf_results to the output json.\nwith open(output_json_file, 'w') as f:\n  f.write(json.dumps(perf_results))\n",
411       "\n[{\"ph\":\"X\",\"name\":\"void skottie::Animation::seek(SkScalar)\",\"ts\":452,\"dur\":2.57,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void SkCanvas::drawPaint(const SkPaint &)\",\"ts\":473,\"dur\":2.67e+03,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void skottie::Animation::seek(SkScalar)\",\"ts\":3.15e+03,\"dur\":2.25,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void skottie::Animation::render(SkCanvas *, const SkRect *, RenderFlags) const\",\"ts\":3.15e+03,\"dur\":216,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void SkCanvas::drawPath(const SkPath &, const SkPaint &)\",\"ts\":3.35e+03,\"dur\":15.1,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void skottie::Animation::seek(SkScalar)\",\"ts\":3.37e+03,\"dur\":1.17,\"tid\":1,\"pid\":0},{\"ph\":\"X\",\"name\":\"void skottie::Animation::render(SkCanvas *, const SkRect *, RenderFlags) const\",\"ts\":3.37e+03,\"dur\":140,\"tid\":1,\"pid\":0}]\n",
412       "lottie1.json",
413       "/path/to/tmp/json"
414     ],
415     "env": {
416       "CHROME_HEADLESS": "1",
417       "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
418     },
419     "name": "parse lottie1.json trace",
420     "~followup_annotations": [
421       "@@@STEP_LOG_LINE@json.output@{@@@",
422       "@@@STEP_LOG_LINE@json.output@  \"frame_avg_us\": 179.71, @@@",
423       "@@@STEP_LOG_LINE@json.output@  \"frame_max_us\": 218.25, @@@",
424       "@@@STEP_LOG_LINE@json.output@  \"frame_min_us\": 141.17@@@",
425       "@@@STEP_LOG_LINE@json.output@}@@@",
426       "@@@STEP_LOG_END@json.output@@@",
427       "@@@STEP_LOG_LINE@python.inline@@@@",
428       "@@@STEP_LOG_LINE@python.inline@import json@@@",
429       "@@@STEP_LOG_LINE@python.inline@import sys@@@",
430       "@@@STEP_LOG_LINE@python.inline@@@@",
431       "@@@STEP_LOG_LINE@python.inline@trace_output = sys.argv[1]@@@",
432       "@@@STEP_LOG_LINE@python.inline@trace_json = json.loads(trace_output)@@@",
433       "@@@STEP_LOG_LINE@python.inline@lottie_filename = sys.argv[2]@@@",
434       "@@@STEP_LOG_LINE@python.inline@output_json_file = sys.argv[3]@@@",
435       "@@@STEP_LOG_LINE@python.inline@@@@",
436       "@@@STEP_LOG_LINE@python.inline@perf_results = {}@@@",
437       "@@@STEP_LOG_LINE@python.inline@frame_max = 0@@@",
438       "@@@STEP_LOG_LINE@python.inline@frame_min = 0@@@",
439       "@@@STEP_LOG_LINE@python.inline@frame_cumulative = 0@@@",
440       "@@@STEP_LOG_LINE@python.inline@current_frame_duration = 0@@@",
441       "@@@STEP_LOG_LINE@python.inline@total_frames = 0@@@",
442       "@@@STEP_LOG_LINE@python.inline@frame_start = False@@@",
443       "@@@STEP_LOG_LINE@python.inline@for trace in trace_json:@@@",
444       "@@@STEP_LOG_LINE@python.inline@  if 'skottie::Animation::seek' in trace['name']:@@@",
445       "@@@STEP_LOG_LINE@python.inline@    if frame_start:@@@",
446       "@@@STEP_LOG_LINE@python.inline@      raise Exception('We got consecutive Animation::seek without a ' +@@@",
447       "@@@STEP_LOG_LINE@python.inline@                      'render. Something is wrong.')@@@",
448       "@@@STEP_LOG_LINE@python.inline@    frame_start = True@@@",
449       "@@@STEP_LOG_LINE@python.inline@    current_frame_duration = trace['dur']@@@",
450       "@@@STEP_LOG_LINE@python.inline@  elif 'skottie::Animation::render' in trace['name']:@@@",
451       "@@@STEP_LOG_LINE@python.inline@    if not frame_start:@@@",
452       "@@@STEP_LOG_LINE@python.inline@      raise Exception('We got an Animation::render without a seek first. ' +@@@",
453       "@@@STEP_LOG_LINE@python.inline@                      'Something is wrong.')@@@",
454       "@@@STEP_LOG_LINE@python.inline@@@@",
455       "@@@STEP_LOG_LINE@python.inline@    current_frame_duration += trace['dur']@@@",
456       "@@@STEP_LOG_LINE@python.inline@    frame_start = False@@@",
457       "@@@STEP_LOG_LINE@python.inline@    total_frames += 1@@@",
458       "@@@STEP_LOG_LINE@python.inline@    frame_max = max(frame_max, current_frame_duration)@@@",
459       "@@@STEP_LOG_LINE@python.inline@    frame_min = (min(frame_min, current_frame_duration)@@@",
460       "@@@STEP_LOG_LINE@python.inline@                 if frame_min else current_frame_duration)@@@",
461       "@@@STEP_LOG_LINE@python.inline@    frame_cumulative += current_frame_duration@@@",
462       "@@@STEP_LOG_LINE@python.inline@@@@",
463       "@@@STEP_LOG_LINE@python.inline@expected_dm_frames = 25@@@",
464       "@@@STEP_LOG_LINE@python.inline@if total_frames != expected_dm_frames:@@@",
465       "@@@STEP_LOG_LINE@python.inline@  raise Exception(@@@",
466       "@@@STEP_LOG_LINE@python.inline@      'Got ' + str(total_frames) + ' frames instead of ' +@@@",
467       "@@@STEP_LOG_LINE@python.inline@      str(expected_dm_frames))@@@",
468       "@@@STEP_LOG_LINE@python.inline@perf_results['frame_max_us'] = frame_max@@@",
469       "@@@STEP_LOG_LINE@python.inline@perf_results['frame_min_us'] = frame_min@@@",
470       "@@@STEP_LOG_LINE@python.inline@perf_results['frame_avg_us'] = frame_cumulative/total_frames@@@",
471       "@@@STEP_LOG_LINE@python.inline@@@@",
472       "@@@STEP_LOG_LINE@python.inline@# Write perf_results to the output json.@@@",
473       "@@@STEP_LOG_LINE@python.inline@with open(output_json_file, 'w') as f:@@@",
474       "@@@STEP_LOG_LINE@python.inline@  f.write(json.dumps(perf_results))@@@",
475       "@@@STEP_LOG_END@python.inline@@@"
476     ]
477   },
478   {
479     "cmd": [
480       "vpython",
481       "-u",
482       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
483       "--json-output",
484       "/path/to/tmp/json",
485       "remove",
486       "[START_DIR]/[SWARM_OUT_DIR]/4.json"
487     ],
488     "infra_step": true,
489     "name": "remove [START_DIR]/[SWARM_OUT_DIR]/4.json"
490   },
491   {
492     "cmd": [
493       "python",
494       "-u",
495       "import os\nprint(os.environ.get('SWARMING_BOT_ID', ''))\n"
496     ],
497     "name": "get swarming bot id",
498     "~followup_annotations": [
499       "@@@STEP_LOG_LINE@python.inline@import os@@@",
500       "@@@STEP_LOG_LINE@python.inline@print(os.environ.get('SWARMING_BOT_ID', ''))@@@",
501       "@@@STEP_LOG_END@python.inline@@@"
502     ]
503   },
504   {
505     "cmd": [
506       "python",
507       "-u",
508       "import os\nprint(os.environ.get('SWARMING_TASK_ID', ''))\n"
509     ],
510     "name": "get swarming task id",
511     "~followup_annotations": [
512       "@@@STEP_LOG_LINE@python.inline@import os@@@",
513       "@@@STEP_LOG_LINE@python.inline@print(os.environ.get('SWARMING_TASK_ID', ''))@@@",
514       "@@@STEP_LOG_END@python.inline@@@"
515     ]
516   },
517   {
518     "cmd": [
519       "vpython",
520       "-u",
521       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
522       "--json-output",
523       "/path/to/tmp/json",
524       "ensure-directory",
525       "--mode",
526       "0777",
527       "[START_DIR]/[SWARM_OUT_DIR]"
528     ],
529     "infra_step": true,
530     "name": "makedirs perf_dir"
531   },
532   {
533     "cmd": [
534       "vpython",
535       "-u",
536       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
537       "--json-output",
538       "/path/to/tmp/json",
539       "copy",
540       "{\n    \"gitHash\": \"abc123\",\n    \"key\": {\n        \"arch\": \"x86_64\",\n        \"bench_type\": \"tracing\",\n        \"compiler\": \"Clang\",\n        \"configuration\": \"Release\",\n        \"cpu_or_gpu\": \"CPU\",\n        \"cpu_or_gpu_value\": \"AVX2\",\n        \"extra_config\": \"SkottieTracing\",\n        \"model\": \"GCE\",\n        \"os\": \"Debian10\",\n        \"source_type\": \"skottie\"\n    },\n    \"renderer\": \"skottie\",\n    \"results\": {\n        \"lottie 3!.json\": {\n            \"gles\": {\n                \"frame_avg_us\": 179.71,\n                \"frame_max_us\": 218.25,\n                \"frame_min_us\": 141.17\n            }\n        },\n        \"lottie(test)'!2.json\": {\n            \"gles\": {\n                \"frame_avg_us\": 179.71,\n                \"frame_max_us\": 218.25,\n                \"frame_min_us\": 141.17\n            }\n        },\n        \"lottie1.json\": {\n            \"gles\": {\n                \"frame_avg_us\": 179.71,\n                \"frame_max_us\": 218.25,\n                \"frame_min_us\": 141.17\n            }\n        }\n    },\n    \"swarming_bot_id\": \"\",\n    \"swarming_task_id\": \"\"\n}",
541       "[START_DIR]/[SWARM_OUT_DIR]/perf_abc123_1337000001.json"
542     ],
543     "infra_step": true,
544     "name": "write output JSON",
545     "~followup_annotations": [
546       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@{@@@",
547       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@    \"gitHash\": \"abc123\",@@@",
548       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@    \"key\": {@@@",
549       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@        \"arch\": \"x86_64\",@@@",
550       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@        \"bench_type\": \"tracing\",@@@",
551       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@        \"compiler\": \"Clang\",@@@",
552       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@        \"configuration\": \"Release\",@@@",
553       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@        \"cpu_or_gpu\": \"CPU\",@@@",
554       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@        \"cpu_or_gpu_value\": \"AVX2\",@@@",
555       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@        \"extra_config\": \"SkottieTracing\",@@@",
556       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@        \"model\": \"GCE\",@@@",
557       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@        \"os\": \"Debian10\",@@@",
558       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@        \"source_type\": \"skottie\"@@@",
559       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@    },@@@",
560       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@    \"renderer\": \"skottie\",@@@",
561       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@    \"results\": {@@@",
562       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@        \"lottie 3!.json\": {@@@",
563       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@            \"gles\": {@@@",
564       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@                \"frame_avg_us\": 179.71,@@@",
565       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@                \"frame_max_us\": 218.25,@@@",
566       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@                \"frame_min_us\": 141.17@@@",
567       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@            }@@@",
568       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@        },@@@",
569       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@        \"lottie(test)'!2.json\": {@@@",
570       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@            \"gles\": {@@@",
571       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@                \"frame_avg_us\": 179.71,@@@",
572       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@                \"frame_max_us\": 218.25,@@@",
573       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@                \"frame_min_us\": 141.17@@@",
574       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@            }@@@",
575       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@        },@@@",
576       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@        \"lottie1.json\": {@@@",
577       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@            \"gles\": {@@@",
578       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@                \"frame_avg_us\": 179.71,@@@",
579       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@                \"frame_max_us\": 218.25,@@@",
580       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@                \"frame_min_us\": 141.17@@@",
581       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@            }@@@",
582       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@        }@@@",
583       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@    },@@@",
584       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@    \"swarming_bot_id\": \"\",@@@",
585       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@    \"swarming_task_id\": \"\"@@@",
586       "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@}@@@",
587       "@@@STEP_LOG_END@perf_abc123_1337000001.json@@@"
588     ]
589   },
590   {
591     "name": "$result"
592   }
593 ]