6 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
15 "name": "makedirs tmp_dir"
21 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
25 "[START_DIR]/skia/infra/bots/assets/lottie-samples/VERSION",
29 "name": "Get lottie-samples VERSION",
30 "~followup_annotations": [
31 "@@@STEP_LOG_LINE@VERSION@42@@@",
32 "@@@STEP_LOG_END@VERSION@@@"
39 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
44 "[START_DIR]/tmp/LOTTIE_VERSION"
47 "name": "write LOTTIE_VERSION",
48 "~followup_annotations": [
49 "@@@STEP_LOG_LINE@LOTTIE_VERSION@42@@@",
50 "@@@STEP_LOG_END@LOTTIE_VERSION@@@"
57 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
61 "[START_DIR]/[SWARM_OUT_DIR]"
64 "name": "rmtree [SWARM_OUT_DIR]"
70 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
76 "[START_DIR]/[SWARM_OUT_DIR]"
79 "name": "makedirs [SWARM_OUT_DIR]"
85 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
89 "[START_DIR]/lottie-samples"
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@@@"
104 "[START_DIR]/build/dm",
106 "[START_DIR]/skia/resources",
108 "[START_DIR]/lottie-samples",
116 "[START_DIR]/[SWARM_OUT_DIR]/2.json",
124 "CHROME_HEADLESS": "1",
125 "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
133 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
137 "[START_DIR]/[SWARM_OUT_DIR]/2.json",
141 "name": "read [START_DIR]/[SWARM_OUT_DIR]/2.json",
142 "~followup_annotations": [
143 "@@@STEP_LOG_END@2.json@@@"
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",
156 "CHROME_HEADLESS": "1",
157 "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
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@@@"
222 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
226 "[START_DIR]/[SWARM_OUT_DIR]/2.json"
229 "name": "remove [START_DIR]/[SWARM_OUT_DIR]/2.json"
234 "[START_DIR]/build/dm",
236 "[START_DIR]/skia/resources",
238 "[START_DIR]/lottie-samples",
246 "[START_DIR]/[SWARM_OUT_DIR]/3.json",
248 "^lottie(test)'!2.json$",
254 "CHROME_HEADLESS": "1",
255 "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
263 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
267 "[START_DIR]/[SWARM_OUT_DIR]/3.json",
271 "name": "read [START_DIR]/[SWARM_OUT_DIR]/3.json",
272 "~followup_annotations": [
273 "@@@STEP_LOG_END@3.json@@@"
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",
286 "CHROME_HEADLESS": "1",
287 "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
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@@@"
352 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
356 "[START_DIR]/[SWARM_OUT_DIR]/3.json"
359 "name": "remove [START_DIR]/[SWARM_OUT_DIR]/3.json"
364 "[START_DIR]/build/dm",
366 "[START_DIR]/skia/resources",
368 "[START_DIR]/lottie-samples",
376 "[START_DIR]/[SWARM_OUT_DIR]/4.json",
384 "CHROME_HEADLESS": "1",
385 "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
393 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
397 "[START_DIR]/[SWARM_OUT_DIR]/4.json",
401 "name": "read [START_DIR]/[SWARM_OUT_DIR]/4.json",
402 "~followup_annotations": [
403 "@@@STEP_LOG_END@4.json@@@"
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",
416 "CHROME_HEADLESS": "1",
417 "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
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@@@"
482 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
486 "[START_DIR]/[SWARM_OUT_DIR]/4.json"
489 "name": "remove [START_DIR]/[SWARM_OUT_DIR]/4.json"
495 "import os\nprint(os.environ.get('SWARMING_BOT_ID', ''))\n"
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@@@"
508 "import os\nprint(os.environ.get('SWARMING_TASK_ID', ''))\n"
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@@@"
521 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
527 "[START_DIR]/[SWARM_OUT_DIR]"
530 "name": "makedirs perf_dir"
536 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
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"
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@@@"