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 "LD_LIBRARY_PATH": "[START_DIR]/mesa_intel_driver_linux",
126 "LIBGL_DRIVERS_PATH": "[START_DIR]/mesa_intel_driver_linux",
127 "PATH": "<PATH>:RECIPE_REPO[depot_tools]",
128 "VK_ICD_FILENAMES": "[START_DIR]/mesa_intel_driver_linux/intel_icd.x86_64.json"
136 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
140 "[START_DIR]/[SWARM_OUT_DIR]/2.json",
144 "name": "read [START_DIR]/[SWARM_OUT_DIR]/2.json",
145 "~followup_annotations": [
146 "@@@STEP_LOG_END@2.json@@@"
153 "\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",
154 "\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",
159 "CHROME_HEADLESS": "1",
160 "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
162 "name": "parse lottie 3!.json trace",
163 "~followup_annotations": [
164 "@@@STEP_LOG_LINE@json.output@{@@@",
165 "@@@STEP_LOG_LINE@json.output@ \"frame_avg_us\": 179.71, @@@",
166 "@@@STEP_LOG_LINE@json.output@ \"frame_max_us\": 218.25, @@@",
167 "@@@STEP_LOG_LINE@json.output@ \"frame_min_us\": 141.17@@@",
168 "@@@STEP_LOG_LINE@json.output@}@@@",
169 "@@@STEP_LOG_END@json.output@@@",
170 "@@@STEP_LOG_LINE@python.inline@@@@",
171 "@@@STEP_LOG_LINE@python.inline@import json@@@",
172 "@@@STEP_LOG_LINE@python.inline@import sys@@@",
173 "@@@STEP_LOG_LINE@python.inline@@@@",
174 "@@@STEP_LOG_LINE@python.inline@trace_output = sys.argv[1]@@@",
175 "@@@STEP_LOG_LINE@python.inline@trace_json = json.loads(trace_output)@@@",
176 "@@@STEP_LOG_LINE@python.inline@lottie_filename = sys.argv[2]@@@",
177 "@@@STEP_LOG_LINE@python.inline@output_json_file = sys.argv[3]@@@",
178 "@@@STEP_LOG_LINE@python.inline@@@@",
179 "@@@STEP_LOG_LINE@python.inline@perf_results = {}@@@",
180 "@@@STEP_LOG_LINE@python.inline@frame_max = 0@@@",
181 "@@@STEP_LOG_LINE@python.inline@frame_min = 0@@@",
182 "@@@STEP_LOG_LINE@python.inline@frame_cumulative = 0@@@",
183 "@@@STEP_LOG_LINE@python.inline@current_frame_duration = 0@@@",
184 "@@@STEP_LOG_LINE@python.inline@total_frames = 0@@@",
185 "@@@STEP_LOG_LINE@python.inline@frame_start = False@@@",
186 "@@@STEP_LOG_LINE@python.inline@for trace in trace_json:@@@",
187 "@@@STEP_LOG_LINE@python.inline@ if 'skottie::Animation::seek' in trace['name']:@@@",
188 "@@@STEP_LOG_LINE@python.inline@ if frame_start:@@@",
189 "@@@STEP_LOG_LINE@python.inline@ raise Exception('We got consecutive Animation::seek without a ' +@@@",
190 "@@@STEP_LOG_LINE@python.inline@ 'render. Something is wrong.')@@@",
191 "@@@STEP_LOG_LINE@python.inline@ frame_start = True@@@",
192 "@@@STEP_LOG_LINE@python.inline@ current_frame_duration = trace['dur']@@@",
193 "@@@STEP_LOG_LINE@python.inline@ elif 'skottie::Animation::render' in trace['name']:@@@",
194 "@@@STEP_LOG_LINE@python.inline@ if not frame_start:@@@",
195 "@@@STEP_LOG_LINE@python.inline@ raise Exception('We got an Animation::render without a seek first. ' +@@@",
196 "@@@STEP_LOG_LINE@python.inline@ 'Something is wrong.')@@@",
197 "@@@STEP_LOG_LINE@python.inline@@@@",
198 "@@@STEP_LOG_LINE@python.inline@ current_frame_duration += trace['dur']@@@",
199 "@@@STEP_LOG_LINE@python.inline@ frame_start = False@@@",
200 "@@@STEP_LOG_LINE@python.inline@ total_frames += 1@@@",
201 "@@@STEP_LOG_LINE@python.inline@ frame_max = max(frame_max, current_frame_duration)@@@",
202 "@@@STEP_LOG_LINE@python.inline@ frame_min = (min(frame_min, current_frame_duration)@@@",
203 "@@@STEP_LOG_LINE@python.inline@ if frame_min else current_frame_duration)@@@",
204 "@@@STEP_LOG_LINE@python.inline@ frame_cumulative += current_frame_duration@@@",
205 "@@@STEP_LOG_LINE@python.inline@@@@",
206 "@@@STEP_LOG_LINE@python.inline@expected_dm_frames = 25@@@",
207 "@@@STEP_LOG_LINE@python.inline@if total_frames != expected_dm_frames:@@@",
208 "@@@STEP_LOG_LINE@python.inline@ raise Exception(@@@",
209 "@@@STEP_LOG_LINE@python.inline@ 'Got ' + str(total_frames) + ' frames instead of ' +@@@",
210 "@@@STEP_LOG_LINE@python.inline@ str(expected_dm_frames))@@@",
211 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_max_us'] = frame_max@@@",
212 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_min_us'] = frame_min@@@",
213 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_avg_us'] = frame_cumulative/total_frames@@@",
214 "@@@STEP_LOG_LINE@python.inline@@@@",
215 "@@@STEP_LOG_LINE@python.inline@# Write perf_results to the output json.@@@",
216 "@@@STEP_LOG_LINE@python.inline@with open(output_json_file, 'w') as f:@@@",
217 "@@@STEP_LOG_LINE@python.inline@ f.write(json.dumps(perf_results))@@@",
218 "@@@STEP_LOG_END@python.inline@@@"
225 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
229 "[START_DIR]/[SWARM_OUT_DIR]/2.json"
232 "name": "remove [START_DIR]/[SWARM_OUT_DIR]/2.json"
237 "[START_DIR]/build/dm",
239 "[START_DIR]/skia/resources",
241 "[START_DIR]/lottie-samples",
249 "[START_DIR]/[SWARM_OUT_DIR]/3.json",
251 "^lottie(test)'!2.json$",
257 "CHROME_HEADLESS": "1",
258 "LD_LIBRARY_PATH": "[START_DIR]/mesa_intel_driver_linux",
259 "LIBGL_DRIVERS_PATH": "[START_DIR]/mesa_intel_driver_linux",
260 "PATH": "<PATH>:RECIPE_REPO[depot_tools]",
261 "VK_ICD_FILENAMES": "[START_DIR]/mesa_intel_driver_linux/intel_icd.x86_64.json"
269 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
273 "[START_DIR]/[SWARM_OUT_DIR]/3.json",
277 "name": "read [START_DIR]/[SWARM_OUT_DIR]/3.json",
278 "~followup_annotations": [
279 "@@@STEP_LOG_END@3.json@@@"
286 "\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",
287 "\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",
288 "lottie(test)'!2.json",
292 "CHROME_HEADLESS": "1",
293 "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
295 "name": "parse lottie(test)'!2.json trace",
296 "~followup_annotations": [
297 "@@@STEP_LOG_LINE@json.output@{@@@",
298 "@@@STEP_LOG_LINE@json.output@ \"frame_avg_us\": 179.71, @@@",
299 "@@@STEP_LOG_LINE@json.output@ \"frame_max_us\": 218.25, @@@",
300 "@@@STEP_LOG_LINE@json.output@ \"frame_min_us\": 141.17@@@",
301 "@@@STEP_LOG_LINE@json.output@}@@@",
302 "@@@STEP_LOG_END@json.output@@@",
303 "@@@STEP_LOG_LINE@python.inline@@@@",
304 "@@@STEP_LOG_LINE@python.inline@import json@@@",
305 "@@@STEP_LOG_LINE@python.inline@import sys@@@",
306 "@@@STEP_LOG_LINE@python.inline@@@@",
307 "@@@STEP_LOG_LINE@python.inline@trace_output = sys.argv[1]@@@",
308 "@@@STEP_LOG_LINE@python.inline@trace_json = json.loads(trace_output)@@@",
309 "@@@STEP_LOG_LINE@python.inline@lottie_filename = sys.argv[2]@@@",
310 "@@@STEP_LOG_LINE@python.inline@output_json_file = sys.argv[3]@@@",
311 "@@@STEP_LOG_LINE@python.inline@@@@",
312 "@@@STEP_LOG_LINE@python.inline@perf_results = {}@@@",
313 "@@@STEP_LOG_LINE@python.inline@frame_max = 0@@@",
314 "@@@STEP_LOG_LINE@python.inline@frame_min = 0@@@",
315 "@@@STEP_LOG_LINE@python.inline@frame_cumulative = 0@@@",
316 "@@@STEP_LOG_LINE@python.inline@current_frame_duration = 0@@@",
317 "@@@STEP_LOG_LINE@python.inline@total_frames = 0@@@",
318 "@@@STEP_LOG_LINE@python.inline@frame_start = False@@@",
319 "@@@STEP_LOG_LINE@python.inline@for trace in trace_json:@@@",
320 "@@@STEP_LOG_LINE@python.inline@ if 'skottie::Animation::seek' in trace['name']:@@@",
321 "@@@STEP_LOG_LINE@python.inline@ if frame_start:@@@",
322 "@@@STEP_LOG_LINE@python.inline@ raise Exception('We got consecutive Animation::seek without a ' +@@@",
323 "@@@STEP_LOG_LINE@python.inline@ 'render. Something is wrong.')@@@",
324 "@@@STEP_LOG_LINE@python.inline@ frame_start = True@@@",
325 "@@@STEP_LOG_LINE@python.inline@ current_frame_duration = trace['dur']@@@",
326 "@@@STEP_LOG_LINE@python.inline@ elif 'skottie::Animation::render' in trace['name']:@@@",
327 "@@@STEP_LOG_LINE@python.inline@ if not frame_start:@@@",
328 "@@@STEP_LOG_LINE@python.inline@ raise Exception('We got an Animation::render without a seek first. ' +@@@",
329 "@@@STEP_LOG_LINE@python.inline@ 'Something is wrong.')@@@",
330 "@@@STEP_LOG_LINE@python.inline@@@@",
331 "@@@STEP_LOG_LINE@python.inline@ current_frame_duration += trace['dur']@@@",
332 "@@@STEP_LOG_LINE@python.inline@ frame_start = False@@@",
333 "@@@STEP_LOG_LINE@python.inline@ total_frames += 1@@@",
334 "@@@STEP_LOG_LINE@python.inline@ frame_max = max(frame_max, current_frame_duration)@@@",
335 "@@@STEP_LOG_LINE@python.inline@ frame_min = (min(frame_min, current_frame_duration)@@@",
336 "@@@STEP_LOG_LINE@python.inline@ if frame_min else current_frame_duration)@@@",
337 "@@@STEP_LOG_LINE@python.inline@ frame_cumulative += current_frame_duration@@@",
338 "@@@STEP_LOG_LINE@python.inline@@@@",
339 "@@@STEP_LOG_LINE@python.inline@expected_dm_frames = 25@@@",
340 "@@@STEP_LOG_LINE@python.inline@if total_frames != expected_dm_frames:@@@",
341 "@@@STEP_LOG_LINE@python.inline@ raise Exception(@@@",
342 "@@@STEP_LOG_LINE@python.inline@ 'Got ' + str(total_frames) + ' frames instead of ' +@@@",
343 "@@@STEP_LOG_LINE@python.inline@ str(expected_dm_frames))@@@",
344 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_max_us'] = frame_max@@@",
345 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_min_us'] = frame_min@@@",
346 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_avg_us'] = frame_cumulative/total_frames@@@",
347 "@@@STEP_LOG_LINE@python.inline@@@@",
348 "@@@STEP_LOG_LINE@python.inline@# Write perf_results to the output json.@@@",
349 "@@@STEP_LOG_LINE@python.inline@with open(output_json_file, 'w') as f:@@@",
350 "@@@STEP_LOG_LINE@python.inline@ f.write(json.dumps(perf_results))@@@",
351 "@@@STEP_LOG_END@python.inline@@@"
358 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
362 "[START_DIR]/[SWARM_OUT_DIR]/3.json"
365 "name": "remove [START_DIR]/[SWARM_OUT_DIR]/3.json"
370 "[START_DIR]/build/dm",
372 "[START_DIR]/skia/resources",
374 "[START_DIR]/lottie-samples",
382 "[START_DIR]/[SWARM_OUT_DIR]/4.json",
390 "CHROME_HEADLESS": "1",
391 "LD_LIBRARY_PATH": "[START_DIR]/mesa_intel_driver_linux",
392 "LIBGL_DRIVERS_PATH": "[START_DIR]/mesa_intel_driver_linux",
393 "PATH": "<PATH>:RECIPE_REPO[depot_tools]",
394 "VK_ICD_FILENAMES": "[START_DIR]/mesa_intel_driver_linux/intel_icd.x86_64.json"
402 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
406 "[START_DIR]/[SWARM_OUT_DIR]/4.json",
410 "name": "read [START_DIR]/[SWARM_OUT_DIR]/4.json",
411 "~followup_annotations": [
412 "@@@STEP_LOG_END@4.json@@@"
419 "\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",
420 "\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",
425 "CHROME_HEADLESS": "1",
426 "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
428 "name": "parse lottie1.json trace",
429 "~followup_annotations": [
430 "@@@STEP_LOG_LINE@json.output@{@@@",
431 "@@@STEP_LOG_LINE@json.output@ \"frame_avg_us\": 179.71, @@@",
432 "@@@STEP_LOG_LINE@json.output@ \"frame_max_us\": 218.25, @@@",
433 "@@@STEP_LOG_LINE@json.output@ \"frame_min_us\": 141.17@@@",
434 "@@@STEP_LOG_LINE@json.output@}@@@",
435 "@@@STEP_LOG_END@json.output@@@",
436 "@@@STEP_LOG_LINE@python.inline@@@@",
437 "@@@STEP_LOG_LINE@python.inline@import json@@@",
438 "@@@STEP_LOG_LINE@python.inline@import sys@@@",
439 "@@@STEP_LOG_LINE@python.inline@@@@",
440 "@@@STEP_LOG_LINE@python.inline@trace_output = sys.argv[1]@@@",
441 "@@@STEP_LOG_LINE@python.inline@trace_json = json.loads(trace_output)@@@",
442 "@@@STEP_LOG_LINE@python.inline@lottie_filename = sys.argv[2]@@@",
443 "@@@STEP_LOG_LINE@python.inline@output_json_file = sys.argv[3]@@@",
444 "@@@STEP_LOG_LINE@python.inline@@@@",
445 "@@@STEP_LOG_LINE@python.inline@perf_results = {}@@@",
446 "@@@STEP_LOG_LINE@python.inline@frame_max = 0@@@",
447 "@@@STEP_LOG_LINE@python.inline@frame_min = 0@@@",
448 "@@@STEP_LOG_LINE@python.inline@frame_cumulative = 0@@@",
449 "@@@STEP_LOG_LINE@python.inline@current_frame_duration = 0@@@",
450 "@@@STEP_LOG_LINE@python.inline@total_frames = 0@@@",
451 "@@@STEP_LOG_LINE@python.inline@frame_start = False@@@",
452 "@@@STEP_LOG_LINE@python.inline@for trace in trace_json:@@@",
453 "@@@STEP_LOG_LINE@python.inline@ if 'skottie::Animation::seek' in trace['name']:@@@",
454 "@@@STEP_LOG_LINE@python.inline@ if frame_start:@@@",
455 "@@@STEP_LOG_LINE@python.inline@ raise Exception('We got consecutive Animation::seek without a ' +@@@",
456 "@@@STEP_LOG_LINE@python.inline@ 'render. Something is wrong.')@@@",
457 "@@@STEP_LOG_LINE@python.inline@ frame_start = True@@@",
458 "@@@STEP_LOG_LINE@python.inline@ current_frame_duration = trace['dur']@@@",
459 "@@@STEP_LOG_LINE@python.inline@ elif 'skottie::Animation::render' in trace['name']:@@@",
460 "@@@STEP_LOG_LINE@python.inline@ if not frame_start:@@@",
461 "@@@STEP_LOG_LINE@python.inline@ raise Exception('We got an Animation::render without a seek first. ' +@@@",
462 "@@@STEP_LOG_LINE@python.inline@ 'Something is wrong.')@@@",
463 "@@@STEP_LOG_LINE@python.inline@@@@",
464 "@@@STEP_LOG_LINE@python.inline@ current_frame_duration += trace['dur']@@@",
465 "@@@STEP_LOG_LINE@python.inline@ frame_start = False@@@",
466 "@@@STEP_LOG_LINE@python.inline@ total_frames += 1@@@",
467 "@@@STEP_LOG_LINE@python.inline@ frame_max = max(frame_max, current_frame_duration)@@@",
468 "@@@STEP_LOG_LINE@python.inline@ frame_min = (min(frame_min, current_frame_duration)@@@",
469 "@@@STEP_LOG_LINE@python.inline@ if frame_min else current_frame_duration)@@@",
470 "@@@STEP_LOG_LINE@python.inline@ frame_cumulative += current_frame_duration@@@",
471 "@@@STEP_LOG_LINE@python.inline@@@@",
472 "@@@STEP_LOG_LINE@python.inline@expected_dm_frames = 25@@@",
473 "@@@STEP_LOG_LINE@python.inline@if total_frames != expected_dm_frames:@@@",
474 "@@@STEP_LOG_LINE@python.inline@ raise Exception(@@@",
475 "@@@STEP_LOG_LINE@python.inline@ 'Got ' + str(total_frames) + ' frames instead of ' +@@@",
476 "@@@STEP_LOG_LINE@python.inline@ str(expected_dm_frames))@@@",
477 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_max_us'] = frame_max@@@",
478 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_min_us'] = frame_min@@@",
479 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_avg_us'] = frame_cumulative/total_frames@@@",
480 "@@@STEP_LOG_LINE@python.inline@@@@",
481 "@@@STEP_LOG_LINE@python.inline@# Write perf_results to the output json.@@@",
482 "@@@STEP_LOG_LINE@python.inline@with open(output_json_file, 'w') as f:@@@",
483 "@@@STEP_LOG_LINE@python.inline@ f.write(json.dumps(perf_results))@@@",
484 "@@@STEP_LOG_END@python.inline@@@"
491 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
495 "[START_DIR]/[SWARM_OUT_DIR]/4.json"
498 "name": "remove [START_DIR]/[SWARM_OUT_DIR]/4.json"
504 "import os\nprint(os.environ.get('SWARMING_BOT_ID', ''))\n"
506 "name": "get swarming bot id",
507 "~followup_annotations": [
508 "@@@STEP_LOG_LINE@python.inline@import os@@@",
509 "@@@STEP_LOG_LINE@python.inline@print(os.environ.get('SWARMING_BOT_ID', ''))@@@",
510 "@@@STEP_LOG_END@python.inline@@@"
517 "import os\nprint(os.environ.get('SWARMING_TASK_ID', ''))\n"
519 "name": "get swarming task id",
520 "~followup_annotations": [
521 "@@@STEP_LOG_LINE@python.inline@import os@@@",
522 "@@@STEP_LOG_LINE@python.inline@print(os.environ.get('SWARMING_TASK_ID', ''))@@@",
523 "@@@STEP_LOG_END@python.inline@@@"
530 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
536 "[START_DIR]/[SWARM_OUT_DIR]"
539 "name": "makedirs perf_dir"
545 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
549 "{\n \"gitHash\": \"abc123\",\n \"key\": {\n \"arch\": \"x86_64\",\n \"bench_type\": \"tracing\",\n \"compiler\": \"Clang\",\n \"configuration\": \"Release\",\n \"cpu_or_gpu\": \"GPU\",\n \"cpu_or_gpu_value\": \"IntelIris640\",\n \"extra_config\": \"SkottieTracing\",\n \"model\": \"NUC7i5BNK\",\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}",
550 "[START_DIR]/[SWARM_OUT_DIR]/perf_abc123_1337000001.json"
553 "name": "write output JSON",
554 "~followup_annotations": [
555 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@{@@@",
556 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"gitHash\": \"abc123\",@@@",
557 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"key\": {@@@",
558 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"arch\": \"x86_64\",@@@",
559 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"bench_type\": \"tracing\",@@@",
560 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"compiler\": \"Clang\",@@@",
561 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"configuration\": \"Release\",@@@",
562 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"cpu_or_gpu\": \"GPU\",@@@",
563 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"cpu_or_gpu_value\": \"IntelIris640\",@@@",
564 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"extra_config\": \"SkottieTracing\",@@@",
565 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"model\": \"NUC7i5BNK\",@@@",
566 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"os\": \"Debian10\",@@@",
567 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"source_type\": \"skottie\"@@@",
568 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ },@@@",
569 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"renderer\": \"skottie\",@@@",
570 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"results\": {@@@",
571 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"lottie 3!.json\": {@@@",
572 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"gles\": {@@@",
573 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"frame_avg_us\": 179.71,@@@",
574 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"frame_max_us\": 218.25,@@@",
575 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"frame_min_us\": 141.17@@@",
576 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ }@@@",
577 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ },@@@",
578 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"lottie(test)'!2.json\": {@@@",
579 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"gles\": {@@@",
580 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"frame_avg_us\": 179.71,@@@",
581 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"frame_max_us\": 218.25,@@@",
582 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"frame_min_us\": 141.17@@@",
583 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ }@@@",
584 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ },@@@",
585 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"lottie1.json\": {@@@",
586 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"gles\": {@@@",
587 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"frame_avg_us\": 179.71,@@@",
588 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"frame_max_us\": 218.25,@@@",
589 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"frame_min_us\": 141.17@@@",
590 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ }@@@",
591 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ }@@@",
592 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ },@@@",
593 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"swarming_bot_id\": \"\",@@@",
594 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@ \"swarming_task_id\": \"\"@@@",
595 "@@@STEP_LOG_LINE@perf_abc123_1337000001.json@}@@@",
596 "@@@STEP_LOG_END@perf_abc123_1337000001.json@@@"