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 "python", 20 "-u", 21 "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" 22 ], 23 "name": "get swarming bot id", 24 "~followup_annotations": [ 25 "@@@STEP_LOG_LINE@python.inline@import os@@@", 26 "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", 27 "@@@STEP_LOG_END@python.inline@@@" 28 ] 29 }, 30 { 31 "cmd": [ 32 "/opt/infra-android/tools/adb", 33 "shell", 34 "mkdir", 35 "-p", 36 "/sdcard/revenge_of_the_skiabot/resources" 37 ], 38 "cwd": "[START_DIR]/skia", 39 "env": { 40 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 41 "CHROME_HEADLESS": "1", 42 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 43 }, 44 "infra_step": true, 45 "name": "mkdir /sdcard/revenge_of_the_skiabot/resources" 46 }, 47 { 48 "cmd": [], 49 "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources" 50 }, 51 { 52 "cmd": [ 53 "vpython", 54 "-u", 55 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 56 "--json-output", 57 "/path/to/tmp/json", 58 "listdir", 59 "[START_DIR]/skia/resources", 60 "--recursive" 61 ], 62 "infra_step": true, 63 "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources.list [START_DIR]/skia/resources", 64 "~followup_annotations": [ 65 "@@@STEP_NEST_LEVEL@1@@@", 66 "@@@STEP_LOG_LINE@listdir@[START_DIR]/skia/resources/.file3@@@", 67 "@@@STEP_LOG_LINE@listdir@[START_DIR]/skia/resources/.ignore/file4@@@", 68 "@@@STEP_LOG_LINE@listdir@[START_DIR]/skia/resources/file1@@@", 69 "@@@STEP_LOG_LINE@listdir@[START_DIR]/skia/resources/subdir/file2@@@", 70 "@@@STEP_LOG_END@listdir@@@" 71 ] 72 }, 73 { 74 "cmd": [ 75 "/opt/infra-android/tools/adb", 76 "push", 77 "[START_DIR]/skia/resources/.file3", 78 "/sdcard/revenge_of_the_skiabot/resources/.file3" 79 ], 80 "cwd": "[START_DIR]/skia", 81 "env": { 82 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 83 "CHROME_HEADLESS": "1", 84 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 85 }, 86 "infra_step": true, 87 "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources.push [START_DIR]/skia/resources/.file3", 88 "~followup_annotations": [ 89 "@@@STEP_NEST_LEVEL@1@@@" 90 ] 91 }, 92 { 93 "cmd": [ 94 "/opt/infra-android/tools/adb", 95 "push", 96 "[START_DIR]/skia/resources/file1", 97 "/sdcard/revenge_of_the_skiabot/resources/file1" 98 ], 99 "cwd": "[START_DIR]/skia", 100 "env": { 101 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 102 "CHROME_HEADLESS": "1", 103 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 104 }, 105 "infra_step": true, 106 "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources.push [START_DIR]/skia/resources/file1", 107 "~followup_annotations": [ 108 "@@@STEP_NEST_LEVEL@1@@@" 109 ] 110 }, 111 { 112 "cmd": [ 113 "/opt/infra-android/tools/adb", 114 "push", 115 "[START_DIR]/skia/resources/subdir/file2", 116 "/sdcard/revenge_of_the_skiabot/resources/subdir/file2" 117 ], 118 "cwd": "[START_DIR]/skia", 119 "env": { 120 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 121 "CHROME_HEADLESS": "1", 122 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 123 }, 124 "infra_step": true, 125 "name": "push [START_DIR]/skia/resources/* /sdcard/revenge_of_the_skiabot/resources.push [START_DIR]/skia/resources/subdir/file2", 126 "~followup_annotations": [ 127 "@@@STEP_NEST_LEVEL@1@@@" 128 ] 129 }, 130 { 131 "cmd": [ 132 "vpython", 133 "-u", 134 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 135 "--json-output", 136 "/path/to/tmp/json", 137 "copy", 138 "[START_DIR]/skia/infra/bots/assets/lottie-samples/VERSION", 139 "/path/to/tmp/" 140 ], 141 "infra_step": true, 142 "name": "Get lottie-samples VERSION", 143 "~followup_annotations": [ 144 "@@@STEP_LOG_LINE@VERSION@42@@@", 145 "@@@STEP_LOG_END@VERSION@@@" 146 ] 147 }, 148 { 149 "cmd": [ 150 "vpython", 151 "-u", 152 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 153 "--json-output", 154 "/path/to/tmp/json", 155 "copy", 156 "42", 157 "[START_DIR]/tmp/LOTTIE_VERSION" 158 ], 159 "infra_step": true, 160 "name": "write LOTTIE_VERSION", 161 "~followup_annotations": [ 162 "@@@STEP_LOG_LINE@LOTTIE_VERSION@42@@@", 163 "@@@STEP_LOG_END@LOTTIE_VERSION@@@" 164 ] 165 }, 166 { 167 "cmd": [ 168 "/opt/infra-android/tools/adb", 169 "shell", 170 "cat", 171 "/sdcard/revenge_of_the_skiabot/LOTTIE_VERSION" 172 ], 173 "cwd": "[START_DIR]/skia", 174 "env": { 175 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 176 "CHROME_HEADLESS": "1", 177 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 178 }, 179 "infra_step": true, 180 "name": "read /sdcard/revenge_of_the_skiabot/LOTTIE_VERSION" 181 }, 182 { 183 "cmd": [ 184 "/opt/infra-android/tools/adb", 185 "shell", 186 "rm", 187 "-f", 188 "/sdcard/revenge_of_the_skiabot/LOTTIE_VERSION" 189 ], 190 "cwd": "[START_DIR]/skia", 191 "env": { 192 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 193 "CHROME_HEADLESS": "1", 194 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 195 }, 196 "infra_step": true, 197 "name": "rm /sdcard/revenge_of_the_skiabot/LOTTIE_VERSION" 198 }, 199 { 200 "cmd": [ 201 "/opt/infra-android/tools/adb", 202 "shell", 203 "rm", 204 "-rf", 205 "/sdcard/revenge_of_the_skiabot/lotties" 206 ], 207 "cwd": "[START_DIR]/skia", 208 "env": { 209 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 210 "CHROME_HEADLESS": "1", 211 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 212 }, 213 "infra_step": true, 214 "name": "rm /sdcard/revenge_of_the_skiabot/lotties" 215 }, 216 { 217 "cmd": [ 218 "/opt/infra-android/tools/adb", 219 "shell", 220 "mkdir", 221 "-p", 222 "/sdcard/revenge_of_the_skiabot/lotties" 223 ], 224 "cwd": "[START_DIR]/skia", 225 "env": { 226 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 227 "CHROME_HEADLESS": "1", 228 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 229 }, 230 "infra_step": true, 231 "name": "mkdir /sdcard/revenge_of_the_skiabot/lotties" 232 }, 233 { 234 "cmd": [], 235 "name": "push [START_DIR]/lottie-samples/* /sdcard/revenge_of_the_skiabot/lotties" 236 }, 237 { 238 "cmd": [ 239 "vpython", 240 "-u", 241 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 242 "--json-output", 243 "/path/to/tmp/json", 244 "listdir", 245 "[START_DIR]/lottie-samples", 246 "--recursive" 247 ], 248 "infra_step": true, 249 "name": "push [START_DIR]/lottie-samples/* /sdcard/revenge_of_the_skiabot/lotties.list [START_DIR]/lottie-samples", 250 "~followup_annotations": [ 251 "@@@STEP_NEST_LEVEL@1@@@", 252 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/.file3@@@", 253 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/.ignore/file4@@@", 254 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/file1@@@", 255 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/subdir/file2@@@", 256 "@@@STEP_LOG_END@listdir@@@" 257 ] 258 }, 259 { 260 "cmd": [ 261 "/opt/infra-android/tools/adb", 262 "push", 263 "[START_DIR]/lottie-samples/.file3", 264 "/sdcard/revenge_of_the_skiabot/lotties/.file3" 265 ], 266 "cwd": "[START_DIR]/skia", 267 "env": { 268 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 269 "CHROME_HEADLESS": "1", 270 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 271 }, 272 "infra_step": true, 273 "name": "push [START_DIR]/lottie-samples/* /sdcard/revenge_of_the_skiabot/lotties.push [START_DIR]/lottie-samples/.file3", 274 "~followup_annotations": [ 275 "@@@STEP_NEST_LEVEL@1@@@" 276 ] 277 }, 278 { 279 "cmd": [ 280 "/opt/infra-android/tools/adb", 281 "push", 282 "[START_DIR]/lottie-samples/file1", 283 "/sdcard/revenge_of_the_skiabot/lotties/file1" 284 ], 285 "cwd": "[START_DIR]/skia", 286 "env": { 287 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 288 "CHROME_HEADLESS": "1", 289 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 290 }, 291 "infra_step": true, 292 "name": "push [START_DIR]/lottie-samples/* /sdcard/revenge_of_the_skiabot/lotties.push [START_DIR]/lottie-samples/file1", 293 "~followup_annotations": [ 294 "@@@STEP_NEST_LEVEL@1@@@" 295 ] 296 }, 297 { 298 "cmd": [ 299 "/opt/infra-android/tools/adb", 300 "push", 301 "[START_DIR]/lottie-samples/subdir/file2", 302 "/sdcard/revenge_of_the_skiabot/lotties/subdir/file2" 303 ], 304 "cwd": "[START_DIR]/skia", 305 "env": { 306 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 307 "CHROME_HEADLESS": "1", 308 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 309 }, 310 "infra_step": true, 311 "name": "push [START_DIR]/lottie-samples/* /sdcard/revenge_of_the_skiabot/lotties.push [START_DIR]/lottie-samples/subdir/file2", 312 "~followup_annotations": [ 313 "@@@STEP_NEST_LEVEL@1@@@" 314 ] 315 }, 316 { 317 "cmd": [ 318 "/opt/infra-android/tools/adb", 319 "push", 320 "[START_DIR]/tmp/LOTTIE_VERSION", 321 "/sdcard/revenge_of_the_skiabot/LOTTIE_VERSION" 322 ], 323 "cwd": "[START_DIR]/skia", 324 "env": { 325 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 326 "CHROME_HEADLESS": "1", 327 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 328 }, 329 "infra_step": true, 330 "name": "push [START_DIR]/tmp/LOTTIE_VERSION /sdcard/revenge_of_the_skiabot/LOTTIE_VERSION" 331 }, 332 { 333 "cmd": [ 334 "/opt/infra-android/tools/adb", 335 "shell", 336 "rm", 337 "-rf", 338 "/sdcard/revenge_of_the_skiabot/dm_out" 339 ], 340 "cwd": "[START_DIR]/skia", 341 "env": { 342 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 343 "CHROME_HEADLESS": "1", 344 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 345 }, 346 "infra_step": true, 347 "name": "rm /sdcard/revenge_of_the_skiabot/dm_out" 348 }, 349 { 350 "cmd": [ 351 "/opt/infra-android/tools/adb", 352 "shell", 353 "mkdir", 354 "-p", 355 "/sdcard/revenge_of_the_skiabot/dm_out" 356 ], 357 "cwd": "[START_DIR]/skia", 358 "env": { 359 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 360 "CHROME_HEADLESS": "1", 361 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 362 }, 363 "infra_step": true, 364 "name": "mkdir /sdcard/revenge_of_the_skiabot/dm_out" 365 }, 366 { 367 "cmd": [ 368 "vpython", 369 "-u", 370 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 371 "--json-output", 372 "/path/to/tmp/json", 373 "listdir", 374 "[START_DIR]/lottie-samples" 375 ], 376 "infra_step": true, 377 "name": "list lottie files", 378 "~followup_annotations": [ 379 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/LICENSE@@@", 380 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/lottie 3!.json@@@", 381 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/lottie(test)'!2.json@@@", 382 "@@@STEP_LOG_LINE@listdir@[START_DIR]/lottie-samples/lottie1.json@@@", 383 "@@@STEP_LOG_END@listdir@@@" 384 ] 385 }, 386 { 387 "cmd": [ 388 "python", 389 "-u", 390 "\nimport os\nimport subprocess\nimport sys\nimport time\nADB = sys.argv[1]\ncpu = int(sys.argv[2])\ngov = sys.argv[3]\n\nlog = subprocess.check_output([ADB, 'root'])\n# check for message like 'adbd cannot run as root in production builds'\nprint log\nif 'cannot' in log:\n raise Exception('adb root failed')\n\nsubprocess.check_output([ADB, 'shell', 'echo \"%s\" > '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])\nactual_gov = subprocess.check_output([ADB, 'shell', 'cat '\n '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()\nif actual_gov != gov:\n raise Exception('(actual, expected) (%s, %s)'\n % (actual_gov, gov))\n", 391 "/opt/infra-android/tools/adb", 392 "0", 393 "hotplug" 394 ], 395 "env": { 396 "CHROME_HEADLESS": "1", 397 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 398 }, 399 "infra_step": true, 400 "name": "Set CPU 0's governor to hotplug", 401 "timeout": 30, 402 "~followup_annotations": [ 403 "@@@STEP_LOG_LINE@python.inline@@@@", 404 "@@@STEP_LOG_LINE@python.inline@import os@@@", 405 "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", 406 "@@@STEP_LOG_LINE@python.inline@import sys@@@", 407 "@@@STEP_LOG_LINE@python.inline@import time@@@", 408 "@@@STEP_LOG_LINE@python.inline@ADB = sys.argv[1]@@@", 409 "@@@STEP_LOG_LINE@python.inline@cpu = int(sys.argv[2])@@@", 410 "@@@STEP_LOG_LINE@python.inline@gov = sys.argv[3]@@@", 411 "@@@STEP_LOG_LINE@python.inline@@@@", 412 "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output([ADB, 'root'])@@@", 413 "@@@STEP_LOG_LINE@python.inline@# check for message like 'adbd cannot run as root in production builds'@@@", 414 "@@@STEP_LOG_LINE@python.inline@print log@@@", 415 "@@@STEP_LOG_LINE@python.inline@if 'cannot' in log:@@@", 416 "@@@STEP_LOG_LINE@python.inline@ raise Exception('adb root failed')@@@", 417 "@@@STEP_LOG_LINE@python.inline@@@@", 418 "@@@STEP_LOG_LINE@python.inline@subprocess.check_output([ADB, 'shell', 'echo \"%s\" > '@@@", 419 "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % (gov, cpu)])@@@", 420 "@@@STEP_LOG_LINE@python.inline@actual_gov = subprocess.check_output([ADB, 'shell', 'cat '@@@", 421 "@@@STEP_LOG_LINE@python.inline@ '/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor' % cpu]).strip()@@@", 422 "@@@STEP_LOG_LINE@python.inline@if actual_gov != gov:@@@", 423 "@@@STEP_LOG_LINE@python.inline@ raise Exception('(actual, expected) (%s, %s)'@@@", 424 "@@@STEP_LOG_LINE@python.inline@ % (actual_gov, gov))@@@", 425 "@@@STEP_LOG_END@python.inline@@@" 426 ] 427 }, 428 { 429 "cmd": [ 430 "/opt/infra-android/tools/adb", 431 "push", 432 "[START_DIR]/build/dm", 433 "/data/local/tmp/" 434 ], 435 "cwd": "[START_DIR]/skia", 436 "env": { 437 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 438 "CHROME_HEADLESS": "1", 439 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 440 }, 441 "infra_step": true, 442 "name": "push dm" 443 }, 444 { 445 "cmd": [ 446 "vpython", 447 "-u", 448 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 449 "--json-output", 450 "/path/to/tmp/json", 451 "copy", 452 "set -x; /data/local/tmp/dm --resourcePath /sdcard/revenge_of_the_skiabot/resources --lotties /sdcard/revenge_of_the_skiabot/lotties --src lottie --nonativeFonts --verbose --traceMatch skottie --trace /sdcard/revenge_of_the_skiabot/dm_out/2.json --match \"^lottie 3!.json$\" --config gles --nocpu; echo $? >/data/local/tmp/rc", 453 "[START_DIR]/tmp/dm.sh" 454 ], 455 "env": { 456 "CHROME_HEADLESS": "1", 457 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 458 }, 459 "infra_step": true, 460 "name": "write dm.sh", 461 "~followup_annotations": [ 462 "@@@STEP_LOG_LINE@dm.sh@set -x; /data/local/tmp/dm --resourcePath /sdcard/revenge_of_the_skiabot/resources --lotties /sdcard/revenge_of_the_skiabot/lotties --src lottie --nonativeFonts --verbose --traceMatch skottie --trace /sdcard/revenge_of_the_skiabot/dm_out/2.json --match \"^lottie 3!.json$\" --config gles --nocpu; echo $? >/data/local/tmp/rc@@@", 463 "@@@STEP_LOG_END@dm.sh@@@" 464 ] 465 }, 466 { 467 "cmd": [ 468 "/opt/infra-android/tools/adb", 469 "push", 470 "[START_DIR]/tmp/dm.sh", 471 "/data/local/tmp/" 472 ], 473 "cwd": "[START_DIR]/skia", 474 "env": { 475 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 476 "CHROME_HEADLESS": "1", 477 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 478 }, 479 "infra_step": true, 480 "name": "push dm.sh" 481 }, 482 { 483 "cmd": [ 484 "/opt/infra-android/tools/adb", 485 "logcat", 486 "-c" 487 ], 488 "cwd": "[START_DIR]/skia", 489 "env": { 490 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 491 "CHROME_HEADLESS": "1", 492 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 493 }, 494 "infra_step": true, 495 "name": "clear log" 496 }, 497 { 498 "cmd": [ 499 "python", 500 "-u", 501 "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", 502 "/data/local/tmp/", 503 "dm.sh" 504 ], 505 "env": { 506 "CHROME_HEADLESS": "1", 507 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 508 }, 509 "name": "dm", 510 "~followup_annotations": [ 511 "@@@STEP_LOG_LINE@python.inline@@@@", 512 "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", 513 "@@@STEP_LOG_LINE@python.inline@import sys@@@", 514 "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", 515 "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", 516 "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", 517 "@@@STEP_LOG_LINE@python.inline@try:@@@", 518 "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", 519 "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", 520 "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", 521 "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", 522 "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", 523 "@@@STEP_LOG_END@python.inline@@@" 524 ] 525 }, 526 { 527 "cmd": [ 528 "/opt/infra-android/tools/adb", 529 "shell", 530 "cat", 531 "/sdcard/revenge_of_the_skiabot/dm_out/2.json" 532 ], 533 "cwd": "[START_DIR]/skia", 534 "env": { 535 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 536 "CHROME_HEADLESS": "1", 537 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 538 }, 539 "infra_step": true, 540 "name": "read /sdcard/revenge_of_the_skiabot/dm_out/2.json" 541 }, 542 { 543 "cmd": [ 544 "python", 545 "-u", 546 "\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", 547 "\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", 548 "lottie 3!.json", 549 "/path/to/tmp/json" 550 ], 551 "env": { 552 "CHROME_HEADLESS": "1", 553 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 554 }, 555 "name": "parse lottie 3!.json trace", 556 "~followup_annotations": [ 557 "@@@STEP_LOG_LINE@json.output@{@@@", 558 "@@@STEP_LOG_LINE@json.output@ \"frame_avg_us\": 179.71, @@@", 559 "@@@STEP_LOG_LINE@json.output@ \"frame_max_us\": 218.25, @@@", 560 "@@@STEP_LOG_LINE@json.output@ \"frame_min_us\": 141.17@@@", 561 "@@@STEP_LOG_LINE@json.output@}@@@", 562 "@@@STEP_LOG_END@json.output@@@", 563 "@@@STEP_LOG_LINE@python.inline@@@@", 564 "@@@STEP_LOG_LINE@python.inline@import json@@@", 565 "@@@STEP_LOG_LINE@python.inline@import sys@@@", 566 "@@@STEP_LOG_LINE@python.inline@@@@", 567 "@@@STEP_LOG_LINE@python.inline@trace_output = sys.argv[1]@@@", 568 "@@@STEP_LOG_LINE@python.inline@trace_json = json.loads(trace_output)@@@", 569 "@@@STEP_LOG_LINE@python.inline@lottie_filename = sys.argv[2]@@@", 570 "@@@STEP_LOG_LINE@python.inline@output_json_file = sys.argv[3]@@@", 571 "@@@STEP_LOG_LINE@python.inline@@@@", 572 "@@@STEP_LOG_LINE@python.inline@perf_results = {}@@@", 573 "@@@STEP_LOG_LINE@python.inline@frame_max = 0@@@", 574 "@@@STEP_LOG_LINE@python.inline@frame_min = 0@@@", 575 "@@@STEP_LOG_LINE@python.inline@frame_cumulative = 0@@@", 576 "@@@STEP_LOG_LINE@python.inline@current_frame_duration = 0@@@", 577 "@@@STEP_LOG_LINE@python.inline@total_frames = 0@@@", 578 "@@@STEP_LOG_LINE@python.inline@frame_start = False@@@", 579 "@@@STEP_LOG_LINE@python.inline@for trace in trace_json:@@@", 580 "@@@STEP_LOG_LINE@python.inline@ if 'skottie::Animation::seek' in trace['name']:@@@", 581 "@@@STEP_LOG_LINE@python.inline@ if frame_start:@@@", 582 "@@@STEP_LOG_LINE@python.inline@ raise Exception('We got consecutive Animation::seek without a ' +@@@", 583 "@@@STEP_LOG_LINE@python.inline@ 'render. Something is wrong.')@@@", 584 "@@@STEP_LOG_LINE@python.inline@ frame_start = True@@@", 585 "@@@STEP_LOG_LINE@python.inline@ current_frame_duration = trace['dur']@@@", 586 "@@@STEP_LOG_LINE@python.inline@ elif 'skottie::Animation::render' in trace['name']:@@@", 587 "@@@STEP_LOG_LINE@python.inline@ if not frame_start:@@@", 588 "@@@STEP_LOG_LINE@python.inline@ raise Exception('We got an Animation::render without a seek first. ' +@@@", 589 "@@@STEP_LOG_LINE@python.inline@ 'Something is wrong.')@@@", 590 "@@@STEP_LOG_LINE@python.inline@@@@", 591 "@@@STEP_LOG_LINE@python.inline@ current_frame_duration += trace['dur']@@@", 592 "@@@STEP_LOG_LINE@python.inline@ frame_start = False@@@", 593 "@@@STEP_LOG_LINE@python.inline@ total_frames += 1@@@", 594 "@@@STEP_LOG_LINE@python.inline@ frame_max = max(frame_max, current_frame_duration)@@@", 595 "@@@STEP_LOG_LINE@python.inline@ frame_min = (min(frame_min, current_frame_duration)@@@", 596 "@@@STEP_LOG_LINE@python.inline@ if frame_min else current_frame_duration)@@@", 597 "@@@STEP_LOG_LINE@python.inline@ frame_cumulative += current_frame_duration@@@", 598 "@@@STEP_LOG_LINE@python.inline@@@@", 599 "@@@STEP_LOG_LINE@python.inline@expected_dm_frames = 25@@@", 600 "@@@STEP_LOG_LINE@python.inline@if total_frames != expected_dm_frames:@@@", 601 "@@@STEP_LOG_LINE@python.inline@ raise Exception(@@@", 602 "@@@STEP_LOG_LINE@python.inline@ 'Got ' + str(total_frames) + ' frames instead of ' +@@@", 603 "@@@STEP_LOG_LINE@python.inline@ str(expected_dm_frames))@@@", 604 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_max_us'] = frame_max@@@", 605 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_min_us'] = frame_min@@@", 606 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_avg_us'] = frame_cumulative/total_frames@@@", 607 "@@@STEP_LOG_LINE@python.inline@@@@", 608 "@@@STEP_LOG_LINE@python.inline@# Write perf_results to the output json.@@@", 609 "@@@STEP_LOG_LINE@python.inline@with open(output_json_file, 'w') as f:@@@", 610 "@@@STEP_LOG_LINE@python.inline@ f.write(json.dumps(perf_results))@@@", 611 "@@@STEP_LOG_END@python.inline@@@" 612 ] 613 }, 614 { 615 "cmd": [ 616 "/opt/infra-android/tools/adb", 617 "shell", 618 "rm", 619 "-f", 620 "/sdcard/revenge_of_the_skiabot/dm_out/2.json" 621 ], 622 "cwd": "[START_DIR]/skia", 623 "env": { 624 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 625 "CHROME_HEADLESS": "1", 626 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 627 }, 628 "infra_step": true, 629 "name": "rm /sdcard/revenge_of_the_skiabot/dm_out/2.json" 630 }, 631 { 632 "cmd": [ 633 "vpython", 634 "-u", 635 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 636 "--json-output", 637 "/path/to/tmp/json", 638 "copy", 639 "set -x; /data/local/tmp/dm --resourcePath /sdcard/revenge_of_the_skiabot/resources --lotties /sdcard/revenge_of_the_skiabot/lotties --src lottie --nonativeFonts --verbose --traceMatch skottie --trace /sdcard/revenge_of_the_skiabot/dm_out/3.json --match \\^lottie\\(test\\)\\'\\!2\\.json\\$ --config gles --nocpu; echo $? >/data/local/tmp/rc", 640 "[START_DIR]/tmp/dm.sh" 641 ], 642 "env": { 643 "CHROME_HEADLESS": "1", 644 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 645 }, 646 "infra_step": true, 647 "name": "write dm.sh (2)", 648 "~followup_annotations": [ 649 "@@@STEP_LOG_LINE@dm.sh@set -x; /data/local/tmp/dm --resourcePath /sdcard/revenge_of_the_skiabot/resources --lotties /sdcard/revenge_of_the_skiabot/lotties --src lottie --nonativeFonts --verbose --traceMatch skottie --trace /sdcard/revenge_of_the_skiabot/dm_out/3.json --match \\^lottie\\(test\\)\\'\\!2\\.json\\$ --config gles --nocpu; echo $? >/data/local/tmp/rc@@@", 650 "@@@STEP_LOG_END@dm.sh@@@" 651 ] 652 }, 653 { 654 "cmd": [ 655 "/opt/infra-android/tools/adb", 656 "push", 657 "[START_DIR]/tmp/dm.sh", 658 "/data/local/tmp/" 659 ], 660 "cwd": "[START_DIR]/skia", 661 "env": { 662 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 663 "CHROME_HEADLESS": "1", 664 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 665 }, 666 "infra_step": true, 667 "name": "push dm.sh (2)" 668 }, 669 { 670 "cmd": [ 671 "/opt/infra-android/tools/adb", 672 "logcat", 673 "-c" 674 ], 675 "cwd": "[START_DIR]/skia", 676 "env": { 677 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 678 "CHROME_HEADLESS": "1", 679 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 680 }, 681 "infra_step": true, 682 "name": "clear log (2)" 683 }, 684 { 685 "cmd": [ 686 "python", 687 "-u", 688 "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", 689 "/data/local/tmp/", 690 "dm.sh" 691 ], 692 "env": { 693 "CHROME_HEADLESS": "1", 694 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 695 }, 696 "name": "dm (2)", 697 "~followup_annotations": [ 698 "@@@STEP_LOG_LINE@python.inline@@@@", 699 "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", 700 "@@@STEP_LOG_LINE@python.inline@import sys@@@", 701 "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", 702 "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", 703 "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", 704 "@@@STEP_LOG_LINE@python.inline@try:@@@", 705 "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", 706 "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", 707 "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", 708 "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", 709 "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", 710 "@@@STEP_LOG_END@python.inline@@@" 711 ] 712 }, 713 { 714 "cmd": [ 715 "/opt/infra-android/tools/adb", 716 "shell", 717 "cat", 718 "/sdcard/revenge_of_the_skiabot/dm_out/3.json" 719 ], 720 "cwd": "[START_DIR]/skia", 721 "env": { 722 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 723 "CHROME_HEADLESS": "1", 724 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 725 }, 726 "infra_step": true, 727 "name": "read /sdcard/revenge_of_the_skiabot/dm_out/3.json" 728 }, 729 { 730 "cmd": [ 731 "python", 732 "-u", 733 "\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", 734 "\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", 735 "lottie(test)'!2.json", 736 "/path/to/tmp/json" 737 ], 738 "env": { 739 "CHROME_HEADLESS": "1", 740 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 741 }, 742 "name": "parse lottie(test)'!2.json trace", 743 "~followup_annotations": [ 744 "@@@STEP_LOG_LINE@json.output@{@@@", 745 "@@@STEP_LOG_LINE@json.output@ \"frame_avg_us\": 179.71, @@@", 746 "@@@STEP_LOG_LINE@json.output@ \"frame_max_us\": 218.25, @@@", 747 "@@@STEP_LOG_LINE@json.output@ \"frame_min_us\": 141.17@@@", 748 "@@@STEP_LOG_LINE@json.output@}@@@", 749 "@@@STEP_LOG_END@json.output@@@", 750 "@@@STEP_LOG_LINE@python.inline@@@@", 751 "@@@STEP_LOG_LINE@python.inline@import json@@@", 752 "@@@STEP_LOG_LINE@python.inline@import sys@@@", 753 "@@@STEP_LOG_LINE@python.inline@@@@", 754 "@@@STEP_LOG_LINE@python.inline@trace_output = sys.argv[1]@@@", 755 "@@@STEP_LOG_LINE@python.inline@trace_json = json.loads(trace_output)@@@", 756 "@@@STEP_LOG_LINE@python.inline@lottie_filename = sys.argv[2]@@@", 757 "@@@STEP_LOG_LINE@python.inline@output_json_file = sys.argv[3]@@@", 758 "@@@STEP_LOG_LINE@python.inline@@@@", 759 "@@@STEP_LOG_LINE@python.inline@perf_results = {}@@@", 760 "@@@STEP_LOG_LINE@python.inline@frame_max = 0@@@", 761 "@@@STEP_LOG_LINE@python.inline@frame_min = 0@@@", 762 "@@@STEP_LOG_LINE@python.inline@frame_cumulative = 0@@@", 763 "@@@STEP_LOG_LINE@python.inline@current_frame_duration = 0@@@", 764 "@@@STEP_LOG_LINE@python.inline@total_frames = 0@@@", 765 "@@@STEP_LOG_LINE@python.inline@frame_start = False@@@", 766 "@@@STEP_LOG_LINE@python.inline@for trace in trace_json:@@@", 767 "@@@STEP_LOG_LINE@python.inline@ if 'skottie::Animation::seek' in trace['name']:@@@", 768 "@@@STEP_LOG_LINE@python.inline@ if frame_start:@@@", 769 "@@@STEP_LOG_LINE@python.inline@ raise Exception('We got consecutive Animation::seek without a ' +@@@", 770 "@@@STEP_LOG_LINE@python.inline@ 'render. Something is wrong.')@@@", 771 "@@@STEP_LOG_LINE@python.inline@ frame_start = True@@@", 772 "@@@STEP_LOG_LINE@python.inline@ current_frame_duration = trace['dur']@@@", 773 "@@@STEP_LOG_LINE@python.inline@ elif 'skottie::Animation::render' in trace['name']:@@@", 774 "@@@STEP_LOG_LINE@python.inline@ if not frame_start:@@@", 775 "@@@STEP_LOG_LINE@python.inline@ raise Exception('We got an Animation::render without a seek first. ' +@@@", 776 "@@@STEP_LOG_LINE@python.inline@ 'Something is wrong.')@@@", 777 "@@@STEP_LOG_LINE@python.inline@@@@", 778 "@@@STEP_LOG_LINE@python.inline@ current_frame_duration += trace['dur']@@@", 779 "@@@STEP_LOG_LINE@python.inline@ frame_start = False@@@", 780 "@@@STEP_LOG_LINE@python.inline@ total_frames += 1@@@", 781 "@@@STEP_LOG_LINE@python.inline@ frame_max = max(frame_max, current_frame_duration)@@@", 782 "@@@STEP_LOG_LINE@python.inline@ frame_min = (min(frame_min, current_frame_duration)@@@", 783 "@@@STEP_LOG_LINE@python.inline@ if frame_min else current_frame_duration)@@@", 784 "@@@STEP_LOG_LINE@python.inline@ frame_cumulative += current_frame_duration@@@", 785 "@@@STEP_LOG_LINE@python.inline@@@@", 786 "@@@STEP_LOG_LINE@python.inline@expected_dm_frames = 25@@@", 787 "@@@STEP_LOG_LINE@python.inline@if total_frames != expected_dm_frames:@@@", 788 "@@@STEP_LOG_LINE@python.inline@ raise Exception(@@@", 789 "@@@STEP_LOG_LINE@python.inline@ 'Got ' + str(total_frames) + ' frames instead of ' +@@@", 790 "@@@STEP_LOG_LINE@python.inline@ str(expected_dm_frames))@@@", 791 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_max_us'] = frame_max@@@", 792 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_min_us'] = frame_min@@@", 793 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_avg_us'] = frame_cumulative/total_frames@@@", 794 "@@@STEP_LOG_LINE@python.inline@@@@", 795 "@@@STEP_LOG_LINE@python.inline@# Write perf_results to the output json.@@@", 796 "@@@STEP_LOG_LINE@python.inline@with open(output_json_file, 'w') as f:@@@", 797 "@@@STEP_LOG_LINE@python.inline@ f.write(json.dumps(perf_results))@@@", 798 "@@@STEP_LOG_END@python.inline@@@" 799 ] 800 }, 801 { 802 "cmd": [ 803 "/opt/infra-android/tools/adb", 804 "shell", 805 "rm", 806 "-f", 807 "/sdcard/revenge_of_the_skiabot/dm_out/3.json" 808 ], 809 "cwd": "[START_DIR]/skia", 810 "env": { 811 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 812 "CHROME_HEADLESS": "1", 813 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 814 }, 815 "infra_step": true, 816 "name": "rm /sdcard/revenge_of_the_skiabot/dm_out/3.json" 817 }, 818 { 819 "cmd": [ 820 "vpython", 821 "-u", 822 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 823 "--json-output", 824 "/path/to/tmp/json", 825 "copy", 826 "set -x; /data/local/tmp/dm --resourcePath /sdcard/revenge_of_the_skiabot/resources --lotties /sdcard/revenge_of_the_skiabot/lotties --src lottie --nonativeFonts --verbose --traceMatch skottie --trace /sdcard/revenge_of_the_skiabot/dm_out/4.json --match \\^lottie1\\.json\\$ --config gles --nocpu; echo $? >/data/local/tmp/rc", 827 "[START_DIR]/tmp/dm.sh" 828 ], 829 "env": { 830 "CHROME_HEADLESS": "1", 831 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 832 }, 833 "infra_step": true, 834 "name": "write dm.sh (3)", 835 "~followup_annotations": [ 836 "@@@STEP_LOG_LINE@dm.sh@set -x; /data/local/tmp/dm --resourcePath /sdcard/revenge_of_the_skiabot/resources --lotties /sdcard/revenge_of_the_skiabot/lotties --src lottie --nonativeFonts --verbose --traceMatch skottie --trace /sdcard/revenge_of_the_skiabot/dm_out/4.json --match \\^lottie1\\.json\\$ --config gles --nocpu; echo $? >/data/local/tmp/rc@@@", 837 "@@@STEP_LOG_END@dm.sh@@@" 838 ] 839 }, 840 { 841 "cmd": [ 842 "/opt/infra-android/tools/adb", 843 "push", 844 "[START_DIR]/tmp/dm.sh", 845 "/data/local/tmp/" 846 ], 847 "cwd": "[START_DIR]/skia", 848 "env": { 849 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 850 "CHROME_HEADLESS": "1", 851 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 852 }, 853 "infra_step": true, 854 "name": "push dm.sh (3)" 855 }, 856 { 857 "cmd": [ 858 "/opt/infra-android/tools/adb", 859 "logcat", 860 "-c" 861 ], 862 "cwd": "[START_DIR]/skia", 863 "env": { 864 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 865 "CHROME_HEADLESS": "1", 866 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 867 }, 868 "infra_step": true, 869 "name": "clear log (3)" 870 }, 871 { 872 "cmd": [ 873 "python", 874 "-u", 875 "\nimport subprocess\nimport sys\nbin_dir = sys.argv[1]\nsh = sys.argv[2]\nsubprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])\ntry:\n sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',\n bin_dir + 'rc'])))\nexcept ValueError:\n print \"Couldn't read the return code. Probably killed for OOM.\"\n sys.exit(1)\n", 876 "/data/local/tmp/", 877 "dm.sh" 878 ], 879 "env": { 880 "CHROME_HEADLESS": "1", 881 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 882 }, 883 "name": "dm (3)", 884 "~followup_annotations": [ 885 "@@@STEP_LOG_LINE@python.inline@@@@", 886 "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", 887 "@@@STEP_LOG_LINE@python.inline@import sys@@@", 888 "@@@STEP_LOG_LINE@python.inline@bin_dir = sys.argv[1]@@@", 889 "@@@STEP_LOG_LINE@python.inline@sh = sys.argv[2]@@@", 890 "@@@STEP_LOG_LINE@python.inline@subprocess.check_call(['/opt/infra-android/tools/adb', 'shell', 'sh', bin_dir + sh])@@@", 891 "@@@STEP_LOG_LINE@python.inline@try:@@@", 892 "@@@STEP_LOG_LINE@python.inline@ sys.exit(int(subprocess.check_output(['/opt/infra-android/tools/adb', 'shell', 'cat',@@@", 893 "@@@STEP_LOG_LINE@python.inline@ bin_dir + 'rc'])))@@@", 894 "@@@STEP_LOG_LINE@python.inline@except ValueError:@@@", 895 "@@@STEP_LOG_LINE@python.inline@ print \"Couldn't read the return code. Probably killed for OOM.\"@@@", 896 "@@@STEP_LOG_LINE@python.inline@ sys.exit(1)@@@", 897 "@@@STEP_LOG_END@python.inline@@@" 898 ] 899 }, 900 { 901 "cmd": [ 902 "/opt/infra-android/tools/adb", 903 "shell", 904 "cat", 905 "/sdcard/revenge_of_the_skiabot/dm_out/4.json" 906 ], 907 "cwd": "[START_DIR]/skia", 908 "env": { 909 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 910 "CHROME_HEADLESS": "1", 911 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 912 }, 913 "infra_step": true, 914 "name": "read /sdcard/revenge_of_the_skiabot/dm_out/4.json" 915 }, 916 { 917 "cmd": [ 918 "python", 919 "-u", 920 "\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", 921 "\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", 922 "lottie1.json", 923 "/path/to/tmp/json" 924 ], 925 "env": { 926 "CHROME_HEADLESS": "1", 927 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 928 }, 929 "name": "parse lottie1.json trace", 930 "~followup_annotations": [ 931 "@@@STEP_LOG_LINE@json.output@{@@@", 932 "@@@STEP_LOG_LINE@json.output@ \"frame_avg_us\": 179.71, @@@", 933 "@@@STEP_LOG_LINE@json.output@ \"frame_max_us\": 218.25, @@@", 934 "@@@STEP_LOG_LINE@json.output@ \"frame_min_us\": 141.17@@@", 935 "@@@STEP_LOG_LINE@json.output@}@@@", 936 "@@@STEP_LOG_END@json.output@@@", 937 "@@@STEP_LOG_LINE@python.inline@@@@", 938 "@@@STEP_LOG_LINE@python.inline@import json@@@", 939 "@@@STEP_LOG_LINE@python.inline@import sys@@@", 940 "@@@STEP_LOG_LINE@python.inline@@@@", 941 "@@@STEP_LOG_LINE@python.inline@trace_output = sys.argv[1]@@@", 942 "@@@STEP_LOG_LINE@python.inline@trace_json = json.loads(trace_output)@@@", 943 "@@@STEP_LOG_LINE@python.inline@lottie_filename = sys.argv[2]@@@", 944 "@@@STEP_LOG_LINE@python.inline@output_json_file = sys.argv[3]@@@", 945 "@@@STEP_LOG_LINE@python.inline@@@@", 946 "@@@STEP_LOG_LINE@python.inline@perf_results = {}@@@", 947 "@@@STEP_LOG_LINE@python.inline@frame_max = 0@@@", 948 "@@@STEP_LOG_LINE@python.inline@frame_min = 0@@@", 949 "@@@STEP_LOG_LINE@python.inline@frame_cumulative = 0@@@", 950 "@@@STEP_LOG_LINE@python.inline@current_frame_duration = 0@@@", 951 "@@@STEP_LOG_LINE@python.inline@total_frames = 0@@@", 952 "@@@STEP_LOG_LINE@python.inline@frame_start = False@@@", 953 "@@@STEP_LOG_LINE@python.inline@for trace in trace_json:@@@", 954 "@@@STEP_LOG_LINE@python.inline@ if 'skottie::Animation::seek' in trace['name']:@@@", 955 "@@@STEP_LOG_LINE@python.inline@ if frame_start:@@@", 956 "@@@STEP_LOG_LINE@python.inline@ raise Exception('We got consecutive Animation::seek without a ' +@@@", 957 "@@@STEP_LOG_LINE@python.inline@ 'render. Something is wrong.')@@@", 958 "@@@STEP_LOG_LINE@python.inline@ frame_start = True@@@", 959 "@@@STEP_LOG_LINE@python.inline@ current_frame_duration = trace['dur']@@@", 960 "@@@STEP_LOG_LINE@python.inline@ elif 'skottie::Animation::render' in trace['name']:@@@", 961 "@@@STEP_LOG_LINE@python.inline@ if not frame_start:@@@", 962 "@@@STEP_LOG_LINE@python.inline@ raise Exception('We got an Animation::render without a seek first. ' +@@@", 963 "@@@STEP_LOG_LINE@python.inline@ 'Something is wrong.')@@@", 964 "@@@STEP_LOG_LINE@python.inline@@@@", 965 "@@@STEP_LOG_LINE@python.inline@ current_frame_duration += trace['dur']@@@", 966 "@@@STEP_LOG_LINE@python.inline@ frame_start = False@@@", 967 "@@@STEP_LOG_LINE@python.inline@ total_frames += 1@@@", 968 "@@@STEP_LOG_LINE@python.inline@ frame_max = max(frame_max, current_frame_duration)@@@", 969 "@@@STEP_LOG_LINE@python.inline@ frame_min = (min(frame_min, current_frame_duration)@@@", 970 "@@@STEP_LOG_LINE@python.inline@ if frame_min else current_frame_duration)@@@", 971 "@@@STEP_LOG_LINE@python.inline@ frame_cumulative += current_frame_duration@@@", 972 "@@@STEP_LOG_LINE@python.inline@@@@", 973 "@@@STEP_LOG_LINE@python.inline@expected_dm_frames = 25@@@", 974 "@@@STEP_LOG_LINE@python.inline@if total_frames != expected_dm_frames:@@@", 975 "@@@STEP_LOG_LINE@python.inline@ raise Exception(@@@", 976 "@@@STEP_LOG_LINE@python.inline@ 'Got ' + str(total_frames) + ' frames instead of ' +@@@", 977 "@@@STEP_LOG_LINE@python.inline@ str(expected_dm_frames))@@@", 978 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_max_us'] = frame_max@@@", 979 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_min_us'] = frame_min@@@", 980 "@@@STEP_LOG_LINE@python.inline@perf_results['frame_avg_us'] = frame_cumulative/total_frames@@@", 981 "@@@STEP_LOG_LINE@python.inline@@@@", 982 "@@@STEP_LOG_LINE@python.inline@# Write perf_results to the output json.@@@", 983 "@@@STEP_LOG_LINE@python.inline@with open(output_json_file, 'w') as f:@@@", 984 "@@@STEP_LOG_LINE@python.inline@ f.write(json.dumps(perf_results))@@@", 985 "@@@STEP_LOG_END@python.inline@@@" 986 ] 987 }, 988 { 989 "cmd": [ 990 "/opt/infra-android/tools/adb", 991 "shell", 992 "rm", 993 "-f", 994 "/sdcard/revenge_of_the_skiabot/dm_out/4.json" 995 ], 996 "cwd": "[START_DIR]/skia", 997 "env": { 998 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 999 "CHROME_HEADLESS": "1", 1000 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 1001 }, 1002 "infra_step": true, 1003 "name": "rm /sdcard/revenge_of_the_skiabot/dm_out/4.json" 1004 }, 1005 { 1006 "cmd": [ 1007 "python", 1008 "-u", 1009 "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n" 1010 ], 1011 "name": "get swarming bot id (2)", 1012 "~followup_annotations": [ 1013 "@@@STEP_LOG_LINE@python.inline@import os@@@", 1014 "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@", 1015 "@@@STEP_LOG_END@python.inline@@@" 1016 ] 1017 }, 1018 { 1019 "cmd": [ 1020 "python", 1021 "-u", 1022 "import os\nprint os.environ.get('SWARMING_TASK_ID', '')\n" 1023 ], 1024 "name": "get swarming task id", 1025 "~followup_annotations": [ 1026 "@@@STEP_LOG_LINE@python.inline@import os@@@", 1027 "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_TASK_ID', '')@@@", 1028 "@@@STEP_LOG_END@python.inline@@@" 1029 ] 1030 }, 1031 { 1032 "cmd": [ 1033 "vpython", 1034 "-u", 1035 "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", 1036 "--json-output", 1037 "/path/to/tmp/json", 1038 "ensure-directory", 1039 "--mode", 1040 "0777", 1041 "[START_DIR]/[SWARM_OUT_DIR]" 1042 ], 1043 "infra_step": true, 1044 "name": "makedirs perf_dir" 1045 }, 1046 { 1047 "cmd": [ 1048 "python", 1049 "-u", 1050 "import json\nwith open('[START_DIR]/[SWARM_OUT_DIR]/perf_abc123_1337000001.json', 'w') as outfile:\n json.dump(obj={'gitHash': 'abc123', 'results': {\"lottie(test)'!2.json\": {'gles': {'frame_avg_us': 179.71, 'frame_max_us': 218.25, 'frame_min_us': 141.17}}, 'lottie1.json': {'gles': {'frame_avg_us': 179.71, 'frame_max_us': 218.25, 'frame_min_us': 141.17}}, 'lottie 3!.json': {'gles': {'frame_avg_us': 179.71, 'frame_max_us': 218.25, 'frame_min_us': 141.17}}}, 'swarming_task_id': '', 'renderer': 'skottie', 'key': {'extra_config': 'Android_SkottieTracing', 'bench_type': 'tracing', 'cpu_or_gpu_value': 'Mali400MP2', 'arch': 'arm', 'source_type': 'skottie', 'cpu_or_gpu': 'GPU', 'model': 'AndroidOne', 'configuration': 'Release', 'os': 'Android', 'compiler': 'Clang'}, 'swarming_bot_id': ''}, fp=outfile, indent=4)\n" 1051 ], 1052 "env": { 1053 "CHROME_HEADLESS": "1", 1054 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 1055 }, 1056 "name": "write output JSON", 1057 "~followup_annotations": [ 1058 "@@@STEP_LOG_LINE@python.inline@import json@@@", 1059 "@@@STEP_LOG_LINE@python.inline@with open('[START_DIR]/[SWARM_OUT_DIR]/perf_abc123_1337000001.json', 'w') as outfile:@@@", 1060 "@@@STEP_LOG_LINE@python.inline@ json.dump(obj={'gitHash': 'abc123', 'results': {\"lottie(test)'!2.json\": {'gles': {'frame_avg_us': 179.71, 'frame_max_us': 218.25, 'frame_min_us': 141.17}}, 'lottie1.json': {'gles': {'frame_avg_us': 179.71, 'frame_max_us': 218.25, 'frame_min_us': 141.17}}, 'lottie 3!.json': {'gles': {'frame_avg_us': 179.71, 'frame_max_us': 218.25, 'frame_min_us': 141.17}}}, 'swarming_task_id': '', 'renderer': 'skottie', 'key': {'extra_config': 'Android_SkottieTracing', 'bench_type': 'tracing', 'cpu_or_gpu_value': 'Mali400MP2', 'arch': 'arm', 'source_type': 'skottie', 'cpu_or_gpu': 'GPU', 'model': 'AndroidOne', 'configuration': 'Release', 'os': 'Android', 'compiler': 'Clang'}, 'swarming_bot_id': ''}, fp=outfile, indent=4)@@@", 1061 "@@@STEP_LOG_END@python.inline@@@" 1062 ] 1063 }, 1064 { 1065 "cmd": [ 1066 "python", 1067 "-u", 1068 "\nimport os\nimport subprocess\nimport sys\nout = sys.argv[1]\nlog = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])\nfor line in log.split('\\n'):\n tokens = line.split()\n if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':\n addr, path = tokens[-2:]\n local = os.path.join(out, os.path.basename(path))\n if os.path.exists(local):\n try:\n sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])\n line = line.replace(addr, addr + ' ' + sym.strip())\n except subprocess.CalledProcessError:\n pass\n print line\n", 1069 "[START_DIR]/build" 1070 ], 1071 "env": { 1072 "CHROME_HEADLESS": "1", 1073 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 1074 }, 1075 "infra_step": true, 1076 "name": "dump log", 1077 "timeout": 300, 1078 "~followup_annotations": [ 1079 "@@@STEP_LOG_LINE@python.inline@@@@", 1080 "@@@STEP_LOG_LINE@python.inline@import os@@@", 1081 "@@@STEP_LOG_LINE@python.inline@import subprocess@@@", 1082 "@@@STEP_LOG_LINE@python.inline@import sys@@@", 1083 "@@@STEP_LOG_LINE@python.inline@out = sys.argv[1]@@@", 1084 "@@@STEP_LOG_LINE@python.inline@log = subprocess.check_output(['/opt/infra-android/tools/adb', 'logcat', '-d'])@@@", 1085 "@@@STEP_LOG_LINE@python.inline@for line in log.split('\\n'):@@@", 1086 "@@@STEP_LOG_LINE@python.inline@ tokens = line.split()@@@", 1087 "@@@STEP_LOG_LINE@python.inline@ if len(tokens) == 11 and tokens[-7] == 'F' and tokens[-3] == 'pc':@@@", 1088 "@@@STEP_LOG_LINE@python.inline@ addr, path = tokens[-2:]@@@", 1089 "@@@STEP_LOG_LINE@python.inline@ local = os.path.join(out, os.path.basename(path))@@@", 1090 "@@@STEP_LOG_LINE@python.inline@ if os.path.exists(local):@@@", 1091 "@@@STEP_LOG_LINE@python.inline@ try:@@@", 1092 "@@@STEP_LOG_LINE@python.inline@ sym = subprocess.check_output(['addr2line', '-Cfpe', local, addr])@@@", 1093 "@@@STEP_LOG_LINE@python.inline@ line = line.replace(addr, addr + ' ' + sym.strip())@@@", 1094 "@@@STEP_LOG_LINE@python.inline@ except subprocess.CalledProcessError:@@@", 1095 "@@@STEP_LOG_LINE@python.inline@ pass@@@", 1096 "@@@STEP_LOG_LINE@python.inline@ print line@@@", 1097 "@@@STEP_LOG_END@python.inline@@@" 1098 ] 1099 }, 1100 { 1101 "cmd": [ 1102 "/opt/infra-android/tools/adb", 1103 "kill-server" 1104 ], 1105 "cwd": "[START_DIR]/skia", 1106 "env": { 1107 "ADB_VENDOR_KEYS": "/home/chrome-bot/.android/chrome_infrastructure_adbkey", 1108 "CHROME_HEADLESS": "1", 1109 "PATH": "<PATH>:RECIPE_REPO[depot_tools]" 1110 }, 1111 "infra_step": true, 1112 "name": "kill adb server" 1113 }, 1114 { 1115 "name": "$result" 1116 } 1117]