Add CPU Chromecast Perf Job

Bug: skia:
NOTRY=true
Change-Id: Ieb4c05b5f430c125ad8fd1a360d82385279dcf29
Reviewed-on: https://skia-review.googlesource.com/20049
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
diff --git a/infra/bots/jobs.json b/infra/bots/jobs.json
index 617b56a..cff7bd4 100644
--- a/infra/bots/jobs.json
+++ b/infra/bots/jobs.json
@@ -129,6 +129,8 @@
   "Perf-ChromeOS-Clang-Chromebook_CB5_311-GPU-TegraK1-arm-Release",
   "Perf-ChromeOS-Clang-Chromebook_513C24_K01-GPU-MaliT860-arm-Debug",
   "Perf-ChromeOS-Clang-Chromebook_513C24_K01-GPU-MaliT860-arm-Release",
+  "Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug",
+  "Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release",
   "Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Debug",
   "Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Release",
   "Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug",
diff --git a/infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Debug.json b/infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug.json
similarity index 99%
rename from infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Debug.json
rename to infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug.json
index 91ef9e2..036f318 100644
--- a/infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Debug.json
+++ b/infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug.json
@@ -298,7 +298,9 @@
       "root@192.168.1.2",
       "/cache/skia/nanobench",
       "--config",
+      "8888",
       "gles",
+      "--nogpu",
       "-i",
       "/cache/skia/resources",
       "--images",
diff --git a/infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Release.json b/infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Release.json
index 303bcf0..d4240f1 100644
--- a/infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Release.json
+++ b/infra/bots/recipes/perf.expected/Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Release.json
@@ -334,7 +334,9 @@
       "root@192.168.1.2",
       "/cache/skia/nanobench",
       "--config",
+      "8888",
       "gles",
+      "--nocpu",
       "-i",
       "/cache/skia/resources",
       "--images",
diff --git a/infra/bots/recipes/perf.py b/infra/bots/recipes/perf.py
index 37fe468..d9f4c7f 100644
--- a/infra/bots/recipes/perf.py
+++ b/infra/bots/recipes/perf.py
@@ -239,7 +239,14 @@
     args = [
       target,
       '--config',
+      '8888',
       'gles',
+    ]
+    if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
+      args.extend(['--nogpu'])
+    elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
+      args.extend(['--nocpu'])
+    args.extend([
       '-i', api.flavor.device_dirs.resource_dir,
       '--images', api.flavor.device_path_join(
           api.flavor.device_dirs.resource_dir, 'color_wheel.jpg'),
@@ -250,7 +257,7 @@
       '~blur_image_filter',
       '~blur_0.01',
       '~GM_animated-image-blurs',
-    ]
+    ])
 
   if api.vars.upload_perf_results:
     now = api.time.utcnow()
@@ -335,7 +342,7 @@
   'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-Android_Vulkan',
   'Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-Android',
   'Perf-ChromeOS-Clang-Chromebook_C100p-GPU-MaliT764-arm-Release',
-  'Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Debug',
+  'Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug',
   'Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Release',
   'Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release',
   'Perf-Mac-Clang-MacMini6.2-GPU-IntelHD4000-x86_64-Debug-CommandBuffer',
diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json
index ccc919c..67c53cc 100644
--- a/infra/bots/tasks.json
+++ b/infra/bots/tasks.json
@@ -783,6 +783,18 @@
         "Upload-Perf-ChromeOS-Clang-Chromebook_CB5_311-GPU-TegraK1-arm-Release"
       ]
     },
+    "Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug": {
+      "priority": 0.8,
+      "tasks": [
+        "Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug"
+      ]
+    },
+    "Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release": {
+      "priority": 0.8,
+      "tasks": [
+        "Upload-Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release"
+      ]
+    },
     "Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Debug": {
       "priority": 0.8,
       "tasks": [
@@ -6192,6 +6204,70 @@
       "max_attempts": 1,
       "priority": 0.8
     },
+    "Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug": {
+      "dependencies": [
+        "Build-Ubuntu-GCC-arm-Debug-Chromecast",
+        "Housekeeper-PerCommit-BundleRecipes",
+        "Housekeeper-PerCommit-IsolateSKP"
+      ],
+      "dimensions": [
+        "device_os:1.24_82923",
+        "device_type:chorizo",
+        "os:Android",
+        "pool:Skia"
+      ],
+      "execution_timeout_ns": 14400000000000,
+      "expiration_ns": 72000000000000,
+      "extra_args": [
+        "--workdir",
+        "../../..",
+        "perf",
+        "repository=<(REPO)",
+        "buildername=Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug",
+        "swarm_out_dir=${ISOLATED_OUTDIR}",
+        "revision=<(REVISION)",
+        "patch_repo=<(PATCH_REPO)",
+        "patch_storage=<(PATCH_STORAGE)",
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
+      ],
+      "io_timeout_ns": 2400000000000,
+      "isolate": "perf_skia_bundled_unix.isolate",
+      "max_attempts": 1,
+      "priority": 0.8
+    },
+    "Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release": {
+      "dependencies": [
+        "Build-Ubuntu-GCC-arm-Release-Chromecast",
+        "Housekeeper-PerCommit-BundleRecipes",
+        "Housekeeper-PerCommit-IsolateSKP"
+      ],
+      "dimensions": [
+        "device_os:1.24_82923",
+        "device_type:chorizo",
+        "os:Android",
+        "pool:Skia"
+      ],
+      "execution_timeout_ns": 14400000000000,
+      "expiration_ns": 72000000000000,
+      "extra_args": [
+        "--workdir",
+        "../../..",
+        "perf",
+        "repository=<(REPO)",
+        "buildername=Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release",
+        "swarm_out_dir=${ISOLATED_OUTDIR}",
+        "revision=<(REVISION)",
+        "patch_repo=<(PATCH_REPO)",
+        "patch_storage=<(PATCH_STORAGE)",
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)"
+      ],
+      "io_timeout_ns": 2400000000000,
+      "isolate": "perf_skia_bundled_unix.isolate",
+      "max_attempts": 1,
+      "priority": 0.8
+    },
     "Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Debug": {
       "dependencies": [
         "Build-Ubuntu-GCC-arm-Debug-Chromecast",
@@ -17912,6 +17988,33 @@
       "isolate": "upload_nano_results.isolate",
       "priority": 0.8
     },
+    "Upload-Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release": {
+      "dependencies": [
+        "Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release"
+      ],
+      "dimensions": [
+        "cpu:x86-64-avx2",
+        "gpu:none",
+        "os:Ubuntu-14.04",
+        "pool:Skia"
+      ],
+      "extra_args": [
+        "--workdir",
+        "../../..",
+        "upload_nano_results",
+        "repository=<(REPO)",
+        "buildername=Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Release",
+        "swarm_out_dir=${ISOLATED_OUTDIR}",
+        "revision=<(REVISION)",
+        "patch_repo=<(PATCH_REPO)",
+        "patch_storage=<(PATCH_STORAGE)",
+        "patch_issue=<(ISSUE)",
+        "patch_set=<(PATCHSET)",
+        "gs_bucket=skia-perf"
+      ],
+      "isolate": "upload_nano_results.isolate",
+      "priority": 0.8
+    },
     "Upload-Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Release": {
       "dependencies": [
         "Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Release"