Try calmbench on bots

Bug: skia:
Change-Id: I869776e3d9d47b4a1a11089f729a0b17581eb9f7
Reviewed-on: https://skia-review.googlesource.com/57400
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
This commit is contained in:
Yuqian Li 2017-10-16 12:24:43 -04:00 committed by Skia Commit-Bot
parent fa15877f48
commit c81aaaad0b
13 changed files with 448 additions and 15 deletions

View File

@ -21,6 +21,7 @@
**[Recipes](#Recipes)**
* [builder_name_schema:examples/full](#recipes-builder_name_schema_examples_full)
* [bundle_recipes](#recipes-bundle_recipes)
* [calmbench](#recipes-calmbench)
* [check_generated_files](#recipes-check_generated_files)
* [compile](#recipes-compile)
* [core:examples/full](#recipes-core_examples_full)
@ -57,9 +58,9 @@
#### **class [BuilderNameSchemaApi](/infra/bots/recipe_modules/builder_name_schema/api.py#14)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
&mdash; **def [DictForBuilderName](/infra/bots/recipe_modules/builder_name_schema/api.py#33)(self, \*args, \*\*kwargs):**
&mdash; **def [DictForBuilderName](/infra/bots/recipe_modules/builder_name_schema/api.py#34)(self, \*args, \*\*kwargs):**
&mdash; **def [MakeBuilderName](/infra/bots/recipe_modules/builder_name_schema/api.py#30)(self, \*args, \*\*kwargs):**
&mdash; **def [MakeBuilderName](/infra/bots/recipe_modules/builder_name_schema/api.py#31)(self, \*args, \*\*kwargs):**
### *recipe_modules* / [core](/infra/bots/recipe_modules/core)
[DEPS](/infra/bots/recipe_modules/core/__init__.py#5): [depot\_tools/bot\_update][depot_tools/recipe_modules/bot_update], [depot\_tools/gclient][depot_tools/recipe_modules/gclient], [depot\_tools/tryserver][depot_tools/recipe_modules/tryserver], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/step][recipe_engine/recipe_modules/step], [flavor](#recipe_modules-flavor), [run](#recipe_modules-run), [vars](#recipe_modules-vars)
@ -655,7 +656,7 @@ Does nothing if script's version is already known.
#### **class [SkiaVarsApi](/infra/bots/recipe_modules/vars/api.py#16)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
&emsp; **@property**<br>&mdash; **def [is\_linux](/infra/bots/recipe_modules/vars/api.py#158)(self):**
&emsp; **@property**<br>&mdash; **def [is\_linux](/infra/bots/recipe_modules/vars/api.py#161)(self):**
&mdash; **def [make\_path](/infra/bots/recipe_modules/vars/api.py#18)(self, \*path):**
@ -665,13 +666,13 @@ Return a Path object for the given path.
Prepare the variables.
&emsp; **@property**<br>&mdash; **def [swarming\_bot\_id](/infra/bots/recipe_modules/vars/api.py#200)(self):**
&emsp; **@property**<br>&mdash; **def [swarming\_bot\_id](/infra/bots/recipe_modules/vars/api.py#203)(self):**
&emsp; **@property**<br>&mdash; **def [swarming\_task\_id](/infra/bots/recipe_modules/vars/api.py#211)(self):**
&emsp; **@property**<br>&mdash; **def [swarming\_task\_id](/infra/bots/recipe_modules/vars/api.py#214)(self):**
&emsp; **@property**<br>&mdash; **def [upload\_dm\_results](/infra/bots/recipe_modules/vars/api.py#162)(self):**
&emsp; **@property**<br>&mdash; **def [upload\_dm\_results](/infra/bots/recipe_modules/vars/api.py#165)(self):**
&emsp; **@property**<br>&mdash; **def [upload\_perf\_results](/infra/bots/recipe_modules/vars/api.py#180)(self):**
&emsp; **@property**<br>&mdash; **def [upload\_perf\_results](/infra/bots/recipe_modules/vars/api.py#183)(self):**
## Recipes
### *recipes* / [builder\_name\_schema:examples/full](/infra/bots/recipe_modules/builder_name_schema/examples/full.py)
@ -684,6 +685,11 @@ Prepare the variables.
[DEPS](/infra/bots/recipes/bundle_recipes.py#9): [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step], [git](#recipe_modules-git)
&mdash; **def [RunSteps](/infra/bots/recipes/bundle_recipes.py#18)(api):**
### *recipes* / [calmbench](/infra/bots/recipes/calmbench.py)
[DEPS](/infra/bots/recipes/calmbench.py#8): [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step], [recipe\_engine/time][recipe_engine/recipe_modules/time], [core](#recipe_modules-core), [flavor](#recipe_modules-flavor), [run](#recipe_modules-run), [vars](#recipe_modules-vars)
&mdash; **def [RunSteps](/infra/bots/recipes/calmbench.py#23)(api):**
### *recipes* / [check\_generated\_files](/infra/bots/recipes/check_generated_files.py)
[DEPS](/infra/bots/recipes/check_generated_files.py#8): [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step], [core](#recipe_modules-core), [flavor](#recipe_modules-flavor), [run](#recipe_modules-run), [vars](#recipe_modules-vars)

View File

@ -677,6 +677,34 @@ func infra(b *specs.TasksCfgBuilder, name string) string {
return name
}
// calmbench generates a calmbench task. Returns the name of the last task in the
// generated chain of tasks, which the Job should add as a dependency.
func calmbench(b *specs.TasksCfgBuilder, name string, parts map[string]string) string {
s := &specs.TaskSpec{
CipdPackages: []*specs.CipdPackage{b.MustGetCipdPackageFromAsset("clang_linux")},
Dimensions: linuxGceDimensions(),
ExtraArgs: []string{
"--workdir", "../../..", "calmbench",
fmt.Sprintf("repository=%s", specs.PLACEHOLDER_REPO),
fmt.Sprintf("buildername=%s", name),
fmt.Sprintf("swarm_out_dir=%s", specs.PLACEHOLDER_ISOLATED_OUTDIR),
fmt.Sprintf("revision=%s", specs.PLACEHOLDER_REVISION),
fmt.Sprintf("patch_repo=%s", specs.PLACEHOLDER_PATCH_REPO),
fmt.Sprintf("patch_storage=%s", specs.PLACEHOLDER_PATCH_STORAGE),
fmt.Sprintf("patch_issue=%s", specs.PLACEHOLDER_ISSUE),
fmt.Sprintf("patch_set=%s", specs.PLACEHOLDER_PATCHSET),
},
Isolate: relpath("infra_skia.isolate"),
Priority: 0.8,
}
s.Dependencies = append(s.Dependencies, ISOLATE_SKP_NAME, ISOLATE_SVG_NAME)
b.MustAddTask(name, s)
return name
}
// doUpload indicates whether the given Job should upload its results.
func doUpload(name string) bool {
for _, s := range CONFIG.NoUpload {
@ -940,6 +968,11 @@ func process(b *specs.TasksCfgBuilder, name string) {
deps = append(deps, compile(b, name, parts))
}
// Calmbench bots.
if parts["role"] == "Calmbench" {
deps = append(deps, calmbench(b, name, parts));
}
// Most remaining bots need a compile task.
compileTaskName := deriveCompileTaskName(name, parts)
compileTaskParts, err := jobNameSchema.ParseJobName(compileTaskName)
@ -947,7 +980,7 @@ func process(b *specs.TasksCfgBuilder, name string) {
glog.Fatal(err)
}
// These bots do not need a compile task.
if parts["role"] != "Build" &&
if parts["role"] != "Build" && parts["role"] != "Calmbench" &&
name != "Housekeeper-PerCommit-BundleRecipes" &&
name != "Housekeeper-PerCommit-InfraTests" &&
name != "Housekeeper-PerCommit-CheckGeneratedFiles" &&

View File

@ -459,5 +459,6 @@
"Test-iOS-Clang-iPhone6-GPU-GX6450-arm64-Debug-All",
"Test-iOS-Clang-iPhone6-GPU-GX6450-arm64-Release-All",
"Test-iOS-Clang-iPhone7-GPU-GT7600-arm64-Debug-All",
"Test-iOS-Clang-iPhone7-GPU-GT7600-arm64-Release-All"
"Test-iOS-Clang-iPhone7-GPU-GT7600-arm64-Release-All",
"Calmbench-Debian9"
]

View File

@ -25,6 +25,7 @@ class BuilderNameSchemaApi(recipe_api.RecipeApi):
self.BUILDER_ROLE_INFRA = builder_name_schema.BUILDER_ROLE_INFRA
self.BUILDER_ROLE_PERF = builder_name_schema.BUILDER_ROLE_PERF
self.BUILDER_ROLE_TEST = builder_name_schema.BUILDER_ROLE_TEST
self.BUILDER_ROLE_CALMBENCH = builder_name_schema.BUILDER_ROLE_CALMBENCH
self.BUILDER_ROLES = builder_name_schema.BUILDER_ROLES
def MakeBuilderName(self, *args, **kwargs):

View File

@ -48,6 +48,9 @@
"cpu_or_gpu_value",
"arch",
"configuration"
],
"Calmbench": [
"os"
]
},
"builder_name_sep": "-"

View File

@ -27,13 +27,15 @@ BUILDER_ROLE_INFRA = 'Infra'
BUILDER_ROLE_PERF = 'Perf'
BUILDER_ROLE_TEST = 'Test'
BUILDER_ROLE_UPLOAD = 'Upload'
BUILDER_ROLE_CALMBENCH = "Calmbench"
BUILDER_ROLES = (BUILDER_ROLE_CANARY,
BUILDER_ROLE_BUILD,
BUILDER_ROLE_HOUSEKEEPER,
BUILDER_ROLE_INFRA,
BUILDER_ROLE_PERF,
BUILDER_ROLE_TEST,
BUILDER_ROLE_UPLOAD)
BUILDER_ROLE_UPLOAD,
BUILDER_ROLE_CALMBENCH)
def _LoadSchema():

View File

@ -41,6 +41,8 @@ class SkiaVarsApi(recipe_api.RecipeApi):
# Compile bots keep a persistent checkout.
if self.is_compile_bot:
self.persistent_checkout = True
if 'Calmbench' in self.builder_name:
self.persistent_checkout = True
if 'Housekeeper' in self.builder_name:
self.persistent_checkout = True
if '-CT_' in self.builder_name:
@ -110,7 +112,8 @@ class SkiaVarsApi(recipe_api.RecipeApi):
self.builder_cfg = self.m.builder_name_schema.DictForBuilderName(
self.builder_name)
self.role = self.builder_cfg['role']
if self.role == self.m.builder_name_schema.BUILDER_ROLE_HOUSEKEEPER:
if self.role in [self.m.builder_name_schema.BUILDER_ROLE_HOUSEKEEPER,
self.m.builder_name_schema.BUILDER_ROLE_CALMBENCH]:
self.configuration = CONFIG_RELEASE
else:
self.configuration = self.builder_cfg.get('configuration', CONFIG_DEBUG)

View File

@ -0,0 +1,35 @@
[
{
"cmd": [
"python",
"-u",
"import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n"
],
"name": "get swarming bot id",
"stdout": "/path/to/tmp/",
"~followup_annotations": [
"@@@STEP_LOG_LINE@python.inline@import os@@@",
"@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@",
"@@@STEP_LOG_END@python.inline@@@"
]
},
{
"cmd": [
"python",
"-u",
"import os\nprint os.environ.get('SWARMING_TASK_ID', '')\n"
],
"name": "get swarming task id",
"stdout": "/path/to/tmp/",
"~followup_annotations": [
"@@@STEP_LOG_LINE@python.inline@import os@@@",
"@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_TASK_ID', '')@@@",
"@@@STEP_LOG_END@python.inline@@@"
]
},
{
"name": "$result",
"recipe_result": null,
"status_code": 0
}
]

View File

@ -31,6 +31,7 @@ TEST_BUILDERS = [
'Perf-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-ASAN',
'Perf-Ubuntu14-GCC-GCE-CPU-AVX2-x86_64-Release-All-CT_BENCH_1k_SKPs',
'Upload-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-Coverage',
'Calmbench-Debian9'
]

View File

@ -0,0 +1,229 @@
[
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"ensure-directory",
"--mode",
"0777",
"[CUSTOM_/_B_WORK]"
],
"infra_step": true,
"name": "makedirs checkout_path"
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"remove",
"[CUSTOM_/_B_WORK]/.gclient_entries"
],
"infra_step": true,
"name": "remove [CUSTOM_/_B_WORK]/.gclient_entries"
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
"--spec-path",
"cache_dir = '[CUSTOM_/_B_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]",
"--patch_root",
"skia",
"--revision_mapping_file",
"{\"got_revision\": \"skia\"}",
"--git-cache-dir",
"[CUSTOM_/_B_CACHE]",
"--cleanup-dir",
"[CLEANUP]/bot_update",
"--output_json",
"/path/to/tmp/json",
"--revision",
"skia@abc123"
],
"cwd": "[CUSTOM_/_B_WORK]",
"env_prefixes": {
"PATH": [
"RECIPE_PACKAGE_REPO[depot_tools]"
]
},
"infra_step": true,
"name": "bot_update",
"~followup_annotations": [
"@@@STEP_TEXT@Some step text@@@",
"@@@STEP_LOG_LINE@json.output@{@@@",
"@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@",
"@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\"@@@",
"@@@STEP_LOG_LINE@json.output@ }, @@@",
"@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@",
"@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
"@@@STEP_LOG_LINE@json.output@ }@@@",
"@@@STEP_LOG_LINE@json.output@ }, @@@",
"@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@",
"@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@",
"@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@",
"@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@",
"@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@",
"@@@STEP_LOG_LINE@json.output@ }, @@@",
"@@@STEP_LOG_LINE@json.output@ \"root\": \"skia\", @@@",
"@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@",
"@@@STEP_LOG_LINE@json.output@}@@@",
"@@@STEP_LOG_END@json.output@@@",
"@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
"@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@"
]
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"ensure-directory",
"--mode",
"0777",
"[START_DIR]/tmp"
],
"infra_step": true,
"name": "makedirs tmp_dir"
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"copy",
"[CUSTOM_/_B_WORK]/skia/infra/bots/assets/skp/VERSION",
"/path/to/tmp/"
],
"infra_step": true,
"name": "Get downloaded SKP VERSION"
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"copy",
"42",
"[START_DIR]/tmp/SKP_VERSION"
],
"infra_step": true,
"name": "write SKP_VERSION"
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"copy",
"[CUSTOM_/_B_WORK]/skia/infra/bots/assets/svg/VERSION",
"/path/to/tmp/"
],
"infra_step": true,
"name": "Get downloaded SVG VERSION"
},
{
"cmd": [
"python",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"copy",
"42",
"[START_DIR]/tmp/SVG_VERSION"
],
"infra_step": true,
"name": "write SVG_VERSION"
},
{
"cmd": [
"python",
"-u",
"[CUSTOM_/_B_WORK]/skia/bin/fetch-gn"
],
"cwd": "[CUSTOM_/_B_WORK]/skia",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"infra_step": true,
"name": "fetch-gn"
},
{
"cmd": [
"[CUSTOM_/_B_WORK]/skia/bin/gn",
"gen",
"[START_DIR]/out/Release",
"--args=is_debug=false"
],
"cwd": "[CUSTOM_/_B_WORK]/skia",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"name": "gn gen"
},
{
"cmd": [
"ninja",
"-C",
"[START_DIR]/out/Release"
],
"cwd": "[CUSTOM_/_B_WORK]/skia",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"name": "ninja"
},
{
"cmd": [
"python",
"tools/calmbench/calmbench.py",
"modified",
"--ninjadir",
"[START_DIR]/out/Release",
"--extraarg",
"--svgs [START_DIR]/svg --skps [START_DIR]/skp",
"--writedir",
"[CUSTOM_[SWARM_OUT_DIR]]"
],
"cwd": "[CUSTOM_/_B_WORK]/skia",
"env": {
"BUILDTYPE": "Release",
"CHROME_HEADLESS": "1",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]",
"SKIA_OUT": "[START_DIR]/out"
},
"name": "Run calmbench"
},
{
"name": "$result",
"recipe_result": null,
"status_code": 0
}
]

View File

@ -0,0 +1,57 @@
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Recipe module for Skia Swarming calmbench.
DEPS = [
'core',
'flavor',
'recipe_engine/context',
'recipe_engine/file',
'recipe_engine/path',
'recipe_engine/properties',
'recipe_engine/python',
'recipe_engine/raw_io',
'recipe_engine/step',
'recipe_engine/time',
'run',
'vars',
]
def RunSteps(api):
api.core.setup()
api.flavor.install(skps=True, svgs=True)
api.flavor.compile("most")
with api.context(cwd=api.vars.skia_dir):
extra_arg = '--svgs %s --skps %s' % (api.flavor.device_dirs.svg_dir,
api.flavor.device_dirs.skp_dir)
command = [
'python', 'tools/calmbench/calmbench.py', 'modified',
'--ninjadir', api.vars.skia_out.join("Release"),
'--extraarg', extra_arg,
'--writedir', api.vars.swarming_out_dir
]
api.run(api.step, 'Run calmbench', cmd=command)
api.run.check_failure()
def GenTests(api):
builder = "Calmbench-Debian9"
test = (
api.test(builder) +
api.properties(buildername=builder,
repository='https://skia.googlesource.com/skia.git',
revision='abc123',
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]') +
api.path.exists(
api.path['start_dir'].join('skia'),
api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
'svg', 'VERSION'),
api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
'skp', 'VERSION'),
)
)
yield test

View File

@ -539,6 +539,12 @@
"Build-Win-MSVC-x86_64-Release-Vulkan"
]
},
"Calmbench-Debian9": {
"priority": 0.8,
"tasks": [
"Calmbench-Debian9"
]
},
"Housekeeper-Nightly-RecreateSKPs_Canary": {
"priority": 0.8,
"tasks": [
@ -5393,6 +5399,40 @@
"isolate": "compile_skia.isolate",
"priority": 0.8
},
"Calmbench-Debian9": {
"cipd_packages": [
{
"name": "skia/bots/clang_linux",
"path": "clang_linux",
"version": "version:10"
}
],
"dependencies": [
"Housekeeper-PerCommit-IsolateSKP",
"Housekeeper-PerCommit-IsolateSVG"
],
"dimensions": [
"cpu:x86-64-Haswell_GCE",
"gpu:none",
"os:Debian-9.1",
"pool:Skia"
],
"extra_args": [
"--workdir",
"../../..",
"calmbench",
"repository=<(REPO)",
"buildername=Calmbench-Debian9",
"swarm_out_dir=${ISOLATED_OUTDIR}",
"revision=<(REVISION)",
"patch_repo=<(PATCH_REPO)",
"patch_storage=<(PATCH_STORAGE)",
"patch_issue=<(ISSUE)",
"patch_set=<(PATCHSET)"
],
"isolate": "infra_skia.isolate",
"priority": 0.8
},
"Housekeeper-Nightly-RecreateSKPs_Canary": {
"cipd_packages": [
{

View File

@ -74,6 +74,9 @@ def parse_args():
'(i.e., reuse previous baseline measurements)')
noinit_help = (
'whether to skip initial nanobench runs (default: %(default)s)')
branch_help = (
"the test branch to benchmark; if it's 'modified', we'll benchmark the "
"current modified code against 'git stash'.")
definitions = [
# argname, type, default value, help
@ -91,7 +94,7 @@ def parse_args():
for d in definitions:
parser.add_argument(d[0], type=d[1], default=d[2], help=d[3])
parser.add_argument('branch', type=str, help="the test branch to benchmark")
parser.add_argument('branch', type=str, help=branch_help)
parser.add_argument('--no-compile', dest='no_compile', action="store_true",
help=no_compile_help)
parser.add_argument('--skip-base', dest='skipbase', action="store_true",
@ -116,7 +119,6 @@ def nano_path(args, branch):
def compile_branch(args, branch):
print "Compiling branch %s" % args.branch
os.chdir(args.skiadir)
commands = [
['git', 'checkout', branch],
['ninja', '-C', args.ninjadir, 'nanobench'],
@ -126,9 +128,29 @@ def compile_branch(args, branch):
subprocess.check_call(command, cwd=args.skiadir)
def compile_modified(args):
print "Compiling modified code"
subprocess.check_call(
['ninja', '-C', args.ninjadir, 'nanobench'], cwd=args.skiadir)
subprocess.check_call(
['cp', args.ninjadir + '/nanobench', nano_path(args, args.branch)],
cwd=args.skiadir)
print "Compiling stashed code"
subprocess.check_call(['git', 'stash'], cwd=args.skiadir)
subprocess.check_call(
['ninja', '-C', args.ninjadir, 'nanobench'], cwd=args.skiadir)
subprocess.check_call(
['cp', args.ninjadir + '/nanobench', nano_path(args, args.baseline)],
cwd=args.skiadir)
subprocess.check_call(['git', 'stash', 'pop'], cwd=args.skiadir)
def compile_nanobench(args):
compile_branch(args, args.branch)
compile_branch(args, args.baseline)
if args.branch == 'modified':
compile_modified(args)
else:
compile_branch(args, args.branch)
compile_branch(args, args.baseline)
def main():