Skip to content

Commit

Permalink
[skottie-wasm-perf] Add retries when calling puppeteer
Browse files Browse the repository at this point in the history
NoTry: true
Bug: skia:9207
Change-Id: I8ff9d2211a268a2564b5752e7a72429380f007ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223936
Reviewed-by: Ravi Mistry <[email protected]>
Commit-Queue: Ravi Mistry <[email protected]>
  • Loading branch information
rmistry authored and Skia Commit-Bot committed Jun 26, 2019
1 parent d6b53d5 commit 9dbbf88
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@
"[CLEANUP]/g3_try_tmp_1/lottie1.json"
],
"cwd": "[START_DIR]/cache/work/skia/tools/lottie-web-perf",
"env": {
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_REPO[depot_tools]"
},
"infra_step": true,
"name": "Run perf cmd line app"
},
Expand Down Expand Up @@ -163,6 +167,10 @@
"[CLEANUP]/g3_try_tmp_1/lottie2.json"
],
"cwd": "[START_DIR]/cache/work/skia/tools/lottie-web-perf",
"env": {
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_REPO[depot_tools]"
},
"infra_step": true,
"name": "Run perf cmd line app (2)"
},
Expand Down Expand Up @@ -190,6 +198,10 @@
"[CLEANUP]/g3_try_tmp_1/lottie3.json"
],
"cwd": "[START_DIR]/cache/work/skia/tools/lottie-web-perf",
"env": {
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_REPO[depot_tools]"
},
"infra_step": true,
"name": "Run perf cmd line app (3)"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@
"[CLEANUP]/g3_try_tmp_1/lottie1.json"
],
"cwd": "[START_DIR]/cache/work/skia/tools/lottie-web-perf",
"env": {
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_REPO[depot_tools]"
},
"infra_step": true,
"name": "Run perf cmd line app"
},
Expand Down Expand Up @@ -165,6 +169,10 @@
"[CLEANUP]/g3_try_tmp_1/lottie2.json"
],
"cwd": "[START_DIR]/cache/work/skia/tools/lottie-web-perf",
"env": {
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_REPO[depot_tools]"
},
"infra_step": true,
"name": "Run perf cmd line app (2)"
},
Expand Down Expand Up @@ -192,6 +200,10 @@
"[CLEANUP]/g3_try_tmp_1/lottie3.json"
],
"cwd": "[START_DIR]/cache/work/skia/tools/lottie-web-perf",
"env": {
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_REPO[depot_tools]"
},
"infra_step": true,
"name": "Run perf cmd line app (3)"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@
"[CLEANUP]/g3_try_tmp_1/lottie1.json"
],
"cwd": "[START_DIR]/cache/work/skia/tools/skottie-wasm-perf",
"env": {
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_REPO[depot_tools]"
},
"infra_step": true,
"name": "Run perf cmd line app"
},
Expand Down Expand Up @@ -171,6 +175,10 @@
"[CLEANUP]/g3_try_tmp_1/lottie2.json"
],
"cwd": "[START_DIR]/cache/work/skia/tools/skottie-wasm-perf",
"env": {
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_REPO[depot_tools]"
},
"infra_step": true,
"name": "Run perf cmd line app (2)"
},
Expand Down Expand Up @@ -202,6 +210,10 @@
"[CLEANUP]/g3_try_tmp_1/lottie3.json"
],
"cwd": "[START_DIR]/cache/work/skia/tools/skottie-wasm-perf",
"env": {
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_REPO[depot_tools]"
},
"infra_step": true,
"name": "Run perf cmd line app (3)"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@
"[CLEANUP]/g3_try_tmp_1/lottie1.json"
],
"cwd": "[START_DIR]/cache/work/skia/tools/skottie-wasm-perf",
"env": {
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_REPO[depot_tools]"
},
"infra_step": true,
"name": "Run perf cmd line app"
},
Expand Down Expand Up @@ -173,6 +177,10 @@
"[CLEANUP]/g3_try_tmp_1/lottie2.json"
],
"cwd": "[START_DIR]/cache/work/skia/tools/skottie-wasm-perf",
"env": {
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_REPO[depot_tools]"
},
"infra_step": true,
"name": "Run perf cmd line app (2)"
},
Expand Down Expand Up @@ -204,6 +212,10 @@
"[CLEANUP]/g3_try_tmp_1/lottie3.json"
],
"cwd": "[START_DIR]/cache/work/skia/tools/skottie-wasm-perf",
"env": {
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_REPO[depot_tools]"
},
"infra_step": true,
"name": "Run perf cmd line app (3)"
},
Expand Down
11 changes: 7 additions & 4 deletions infra/bots/recipes/perf_skottiewasm_lottieweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,14 @@ def RunSteps(api):
continue
output_file = output_dir.join(lottie_filename)
with api.context(cwd=perf_app_dir):
# This is occasionally flaky due to skbug.com/9207, adding retries.
attempts = 3
# Add output and input arguments to the cmd.
api.step('Run perf cmd line app', cmd=perf_app_cmd + [
'--input', lottie_file,
'--output', output_file,
], infra_step=True)
api.run.with_retry(api.step, 'Run perf cmd line app', attempts,
cmd=perf_app_cmd + [
'--input', lottie_file,
'--output', output_file,
], infra_step=True)
output_json = api.file.read_json(
'Read perf json', output_file,
test_data={'frame_avg_us': 185.79982221126556,
Expand Down

0 comments on commit 9dbbf88

Please sign in to comment.