Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: scripts/slave/recipes/bisection/desktop_bisect.py

Issue 2061893003: Build delegation for perf tryjobs (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Refine request build procedures Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 DEPS = [ 5 DEPS = [
6 'auto_bisect', 6 'auto_bisect',
7 'bisect_tester', 7 'bisect_tester',
8 'chromium', 8 'chromium',
9 'chromium_tests', 9 'chromium_tests',
10 'depot_tools/gclient', 10 'depot_tools/gclient',
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 results_without_patch = """*RESULT dummy: dummy= [5.83,6.013,5.573]ms 61 results_without_patch = """*RESULT dummy: dummy= [5.83,6.013,5.573]ms
62 Avg dummy: 5.907711ms 62 Avg dummy: 5.907711ms
63 Sd dummy: 0.255921ms 63 Sd dummy: 0.255921ms
64 RESULT telemetry_page_measurement_results: num_failed= 0 count 64 RESULT telemetry_page_measurement_results: num_failed= 0 count
65 RESULT telemetry_page_measurement_results: num_errored= 0 count 65 RESULT telemetry_page_measurement_results: num_errored= 0 count
66 66
67 View online at http://storage.googleapis.com/chromium-telemetry/html-results/\ 67 View online at http://storage.googleapis.com/chromium-telemetry/html-results/\
68 results-without_patch 68 results-without_patch
69 """ 69 """
70 70
71 buildbucket_put_response = {
72 "results":[{
73 "build":{
74 "status": "SCHEDULED",
75 "created_ts": "1459200369835900",
76 "bucket": "user.username",
77 "result_details_json": "null",
78 "status_changed_ts": "1459200369835930",
79 "created_by": "user:username@example.com",
80 "updated_ts": "1459200369835940",
81 "utcnow_ts": "1459200369962370",
82 "parameters_json": "{\"This_has_been\": \"removed\"}",
83 "id": "9016911228971028736"
84 },
85 "kind": "buildbucket#resourcesItem",
86 "etag": "\"8uCIh8TRuYs4vPN3iWmly9SJMqw\""
87 }]
88 }
89
90 buildbucket_get_response = {
91 "bucket": "master.tryserver.chromium.perf",
92 "id": "9009962699124567824",
93 "result": "SUCCESS",
94 "status": "COMPLETED",
95 "status_changed_utc": "Mon Jun 13 19:32:37 2016",
96 "updated_utc": "Mon Jun 13 19:32:37 2016",
97 "url": "http://build.chromium.org/p/tryserver.chromium.perf/builders/linux_p erf_bisect/builds/6537",
98 "utcnow_utc": "Tue Jun 21 21:33:56 2016"
99 }
100
71 yield (api.test('basic_perf_tryjob') + api.properties.tryserver( 101 yield (api.test('basic_perf_tryjob') + api.properties.tryserver(
72 mastername='tryserver.chromium.perf', 102 mastername='tryserver.chromium.perf',
73 buildername='linux_perf_bisect') + api.override_step_data( 103 buildername='linux_perf_bisect',
104 patch_storage='rietveld',
105 patchset='20001',
106 issue='12345',
107 rietveld="https://codereview.chromium.org") + api.override_step_data(
74 'git diff to analyze patch', 108 'git diff to analyze patch',
75 api.raw_io.stream_output('tools/run-perf-test.cfg')) + 109 api.raw_io.stream_output('tools/run-perf-test.cfg')) +
76 api.override_step_data('load config', api.json.output(config_json)) + 110 api.override_step_data('load config', api.json.output(config_json)) +
77 api.step_data('Performance Test (Without Patch) 1 of 1', 111 api.step_data('gsutil check.file.exist', retcode=1) +
78 stdout=api.raw_io.output(str(results_without_patch))) + 112 api.step_data('buildbucket.put',
79 api.step_data('Performance Test (With Patch) 1 of 1', 113 stdout=api.json.output(buildbucket_put_response)) +
80 stdout=api.raw_io.output(str(results_with_patch))) + 114 api.step_data('buildbucket.put (2)',
81 api.step_data('Post bisect results', 115 stdout=api.json.output(buildbucket_put_response)) +
82 stdout=api.json.output({'status_code': 200}))) 116 api.step_data('buildbucket.get',
117 stdout=api.json.output(buildbucket_get_response)) +
118 api.step_data('buildbucket.get (2)',
119 stdout=api.json.output(buildbucket_get_response)))
83 120
84 config_json.update({'metric': 'dummy/dummy'}) 121 config_json.update({'metric': 'dummy/dummy'})
85 122
86 yield (api.test('basic_perf_tryjob_with_metric') + api.properties.tryserver( 123 yield (api.test('basic_perf_tryjob_with_metric') + api.properties.tryserver(
87 mastername='tryserver.chromium.perf', 124 mastername='tryserver.chromium.perf',
88 buildername='linux_perf_bisect') + api.override_step_data( 125 buildername='linux_perf_bisect',
126 patch_storage='rietveld',
127 patchset='20001',
128 issue='12345',
129 rietveld="https://codereview.chromium.org") + api.override_step_data(
89 'git diff to analyze patch', 130 'git diff to analyze patch',
90 api.raw_io.stream_output('tools/run-perf-test.cfg')) + 131 api.raw_io.stream_output('tools/run-perf-test.cfg')) +
91 api.override_step_data('load config', api.json.output(config_json)) + 132 api.override_step_data('load config', api.json.output(config_json)) +
92 api.step_data('Performance Test (Without Patch) 1 of 1', 133 api.step_data('gsutil check.file.exist', retcode=1) +
93 stdout=api.raw_io.output(results_without_patch)) + 134 api.step_data('buildbucket.put',
94 api.step_data('Performance Test (With Patch) 1 of 1', 135 stdout=api.json.output(buildbucket_put_response)) +
95 stdout=api.raw_io.output(results_with_patch)) + 136 api.step_data('buildbucket.put (2)',
96 api.step_data('Post bisect results', 137 stdout=api.json.output(buildbucket_put_response)) +
97 stdout=api.json.output({'status_code': 200}))) 138 api.step_data('buildbucket.get',
139 stdout=api.json.output(buildbucket_get_response)) +
140 api.step_data('buildbucket.get (2)',
141 stdout=api.json.output(buildbucket_get_response)))
98 142
99 143
100 yield (api.test('perf_tryjob_failed_test') + api.properties.tryserver( 144 yield (api.test('perf_tryjob_failed_test') + api.properties.tryserver(
101 mastername='tryserver.chromium.perf', 145 mastername='tryserver.chromium.perf',
102 buildername='linux_perf_bisect') + api.override_step_data( 146 buildername='linux_perf_bisect',
147 patch_storage='rietveld',
148 patchset='20001',
149 issue='12345',
150 rietveld="https://codereview.chromium.org") + api.override_step_data(
103 'git diff to analyze patch', 151 'git diff to analyze patch',
104 api.raw_io.stream_output('tools/run-perf-test.cfg')) + 152 api.raw_io.stream_output('tools/run-perf-test.cfg')) +
105 api.override_step_data('load config', api.json.output(config_json)) + 153 api.override_step_data('load config', api.json.output(config_json)) +
106 api.step_data('Performance Test (With Patch) 1 of 1', 154 api.step_data('gsutil check.file.exist', retcode=1) +
107 retcode=1)) 155 api.step_data('buildbucket.put',
156 stdout=api.json.output(buildbucket_put_response)) +
157 api.step_data('buildbucket.put (2)',
158 stdout=api.json.output(buildbucket_put_response)) +
159 api.step_data('buildbucket.get',
160 stdout=api.json.output(buildbucket_get_response)) +
161 api.step_data('buildbucket.get (2)',
162 stdout=api.json.output(buildbucket_get_response)))
108 163
109 config_json.update({'good_revision': '306475', 'bad_revision': '306476'}) 164 config_json.update({'good_revision': '306475', 'bad_revision': '306476'})
110 165
111 yield ( 166 yield (
112 api.test('basic_perf_tryjob_with_revisions') + api.properties.tryserver( 167 api.test('basic_perf_tryjob_with_revisions') + api.properties.tryserver(
113 mastername='tryserver.chromium.perf', 168 mastername='tryserver.chromium.perf',
114 buildername='linux_perf_bisect') + api.override_step_data( 169 buildername='linux_perf_bisect',
170 patch_storage='rietveld',
171 patchset='20001',
172 issue='12345',
173 rietveld="https://codereview.chromium.org") + api.override_step_data(
115 'git diff to analyze patch', 174 'git diff to analyze patch',
116 api.raw_io.stream_output('tools/run-perf-test.cfg')) + 175 api.raw_io.stream_output('tools/run-perf-test.cfg')) +
117 api.override_step_data('load config', api.json.output(config_json)) + 176 api.override_step_data('load config', api.json.output(config_json)) +
118 api.step_data( 177 api.step_data(
119 'resolving commit_pos ' + config_json['good_revision'], 178 'resolving commit_pos ' + config_json['good_revision'],
120 stdout=api.raw_io.output('hash:d49c331def2a3bbf3ddd0096eb51551155')) + 179 stdout=api.raw_io.output('hash:d49c331def2a3bbf3ddd0096eb51551155')) +
121 api.step_data( 180 api.step_data(
122 'resolving commit_pos ' + config_json['bad_revision'], 181 'resolving commit_pos ' + config_json['bad_revision'],
123 stdout=api.raw_io.output('hash:bad49c331def2a3bbf3ddd0096eb51551155')) 182 stdout=api.raw_io.output('hash:bad49c331def2a3bbf3ddd0096eb51551155'))
124 + api.step_data( 183 + api.step_data('gsutil check.file.exist', retcode=1)
RobertoCN 2016/06/24 18:46:37 Consider changing the label of the step to a forma
Ziqi Xiong 2016/06/27 18:47:54 I changed it to 'gsutil exists'. Does that sound b
125 'Performance Test (d49c331def2a3bbf3ddd0096eb51551155) 1 of 1', 184 + api.step_data('buildbucket.put',
126 stdout=api.raw_io.output(results_without_patch)) + api.step_data( 185 stdout=api.json.output(buildbucket_put_response))
127 'Performance Test (bad49c331def2a3bbf3ddd0096eb51551155) 1 of 1', 186 + api.step_data('buildbucket.get',
128 stdout=api.raw_io.output(results_with_patch)) + 187 stdout=api.json.output(buildbucket_get_response)))
129 api.step_data('Post bisect results',
130 stdout=api.json.output({'status_code': 200})))
131 188
132 config_json = { 189 config_json = {
133 'max_time_minutes': '25', 190 'max_time_minutes': '25',
134 'repeat_count': '1', 191 'repeat_count': '1',
135 'truncate_percent': '25', 192 'truncate_percent': '25',
136 'target_arch': 'ia32', 193 'target_arch': 'ia32',
137 } 194 }
138 195
139 yield (api.test('perf_tryjob_config_error') + api.properties.tryserver( 196 yield (api.test('perf_tryjob_config_error') + api.properties.tryserver(
140 mastername='tryserver.chromium.perf', 197 mastername='tryserver.chromium.perf',
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 buildername='linux_perf_bisect') + 267 buildername='linux_perf_bisect') +
211 api.step_data('saving url to temp file', 268 api.step_data('saving url to temp file',
212 stdout=api.raw_io.output('/tmp/dummy1')) + api.step_data( 269 stdout=api.raw_io.output('/tmp/dummy1')) + api.step_data(
213 'saving json to temp file', 270 'saving json to temp file',
214 stdout=api.raw_io.output('/tmp/dummy2')) + 271 stdout=api.raw_io.output('/tmp/dummy2')) +
215 api.properties(bisect_config=bisect_ret_code_config) + api.properties( 272 api.properties(bisect_config=bisect_ret_code_config) + api.properties(
216 job_name='f7a7b4135624439cbd27fdd5133d74ec') + 273 job_name='f7a7b4135624439cbd27fdd5133d74ec') +
217 api.bisect_tester(tempfile='/tmp/dummy') + api.properties( 274 api.bisect_tester(tempfile='/tmp/dummy') + api.properties(
218 parent_got_revision='1111111') + api.properties( 275 parent_got_revision='1111111') + api.properties(
219 parent_build_archive_url='gs://test-domain/test-archive.zip')) 276 parent_build_archive_url='gs://test-domain/test-archive.zip'))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698