aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/gen_tasks.go
diff options
context:
space:
mode:
authorGravatar Ben Wagner <benjaminwagner@google.com>2018-05-14 12:38:09 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-14 17:14:19 +0000
commit297e86b43e2671c861c3228c474c11fc9a332ca5 (patch)
tree2ba574767a2b8d6891718d34ba0474f476504872 /infra/bots/gen_tasks.go
parent8f2b7fa61765efcaf0a071aabe1db6c59122ab24 (diff)
[infra] Switch back to 16-core GCE VMs for Perf and Test.
This partially reverts https://skia-review.googlesource.com/c/skia/+/124340 Bug: skia:7415, skia:7416 Change-Id: I2a838ff3c543ded54e962e905294811fbc97ef88 Reviewed-on: https://skia-review.googlesource.com/127965 Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Diffstat (limited to 'infra/bots/gen_tasks.go')
-rw-r--r--infra/bots/gen_tasks.go24
1 files changed, 11 insertions, 13 deletions
diff --git a/infra/bots/gen_tasks.go b/infra/bots/gen_tasks.go
index 64c7209894..ee916f8c92 100644
--- a/infra/bots/gen_tasks.go
+++ b/infra/bots/gen_tasks.go
@@ -49,7 +49,13 @@ const (
DEFAULT_PROJECT = "skia"
+ // Small is a 2-core machine.
+ // TODO(dogben): Would n1-standard-1 or n1-standard-2 be sufficient?
MACHINE_TYPE_SMALL = "n1-highmem-2"
+ // Medium is a 16-core machine
+ MACHINE_TYPE_MEDIUM = "n1-standard-16"
+ // Large is a 64-core machine. (We use "highcpu" because we don't need more than 57GB memory for
+ // any of our tasks.)
MACHINE_TYPE_LARGE = "n1-highcpu-64"
// Swarming output dirs.
@@ -479,21 +485,12 @@ func defaultSwarmDimensions(parts map[string]string) []string {
d["os"] = DEFAULT_OS_LINUX_GCE
}
if parts["model"] == "GCE" && d["cpu"] == "x86-64-Haswell_GCE" {
- // nanobench runs single-threaded, so use a small machine.
- // dm is multi-threaded for CPU, so use a large machine.
- machineType, ok := map[string]string{
- "Calmbench": MACHINE_TYPE_SMALL,
- "Perf": MACHINE_TYPE_SMALL,
- "Test": MACHINE_TYPE_LARGE,
- }[parts["role"]]
- if !ok {
- glog.Fatalf("Entry %q not found in GCE machine type mapping.", parts["role"])
- }
// Coverage gets slower with more cores.
if strings.Contains(parts["extra_config"], "Coverage") {
- machineType = MACHINE_TYPE_SMALL
+ d["machine_type"] = MACHINE_TYPE_SMALL
+ } else {
+ d["machine_type"] = MACHINE_TYPE_MEDIUM
}
- d["machine_type"] = machineType
}
} else {
if strings.Contains(parts["os"], "Win") {
@@ -1118,7 +1115,8 @@ func presubmit(b *specs.TasksCfgBuilder, name string) string {
"reason": "CQ",
"repo_name": "skia",
}
- // Use MACHINE_TYPE_LARGE because it seems to save ~1m and we want presubmit to be fast.
+ // Use MACHINE_TYPE_LARGE because it seems to save time versus MEDIUM and we want presubmit to be
+ // fast.
task := kitchenTask(name, "run_presubmit", "empty.isolate", SERVICE_ACCOUNT_COMPILE, linuxGceDimensions(MACHINE_TYPE_LARGE), extraProps, OUTPUT_NONE)
replaceArg := func(key, value string) {