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

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

Issue 2061893003: Build delegation for perf tryjobs (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Add performance step data back 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 from recipe_engine.types import freeze 5 from recipe_engine.types import freeze
6 6
7 DEPS = [ 7 DEPS = [
8 'auto_bisect', 8 'auto_bisect',
9 'bisect_tester', 9 'bisect_tester',
10 'depot_tools/bot_update', 10 'depot_tools/bot_update',
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 'webview': True, 76 'webview': True,
77 }, 77 },
78 }, 78 },
79 }, 79 },
80 }) 80 })
81 81
82 from recipe_engine.recipe_api import Property 82 from recipe_engine.recipe_api import Property
83 83
84 PROPERTIES = {'mastername': Property(), 'buildername': Property(),} 84 PROPERTIES = {'mastername': Property(), 'buildername': Property(),}
85 85
86
87 def RunSteps(api, mastername, buildername): 86 def RunSteps(api, mastername, buildername):
88 master_dict = BUILDERS.get(mastername, {}) 87 master_dict = BUILDERS.get(mastername, {})
89 bot_config = master_dict.get('builders', {}).get(buildername) 88 bot_config = master_dict.get('builders', {}).get(buildername)
90 # The following lines configures android bisect bot to to checkout codes, 89 # The following lines configures android bisect bot to to checkout codes,
91 # executes runhooks, provisions devices and runs legacy bisect script. 90 # executes runhooks, provisions devices and runs legacy bisect script.
92 recipe_config = bot_config.get('recipe_config', 'perf') 91 recipe_config = bot_config.get('recipe_config', 'perf')
93 kwargs = { 92 kwargs = {
94 'REPO_NAME': 'src', 93 'REPO_NAME': 'src',
95 'REPO_URL': REPO_URL, 94 'REPO_URL': REPO_URL,
96 'INTERNAL': False, 95 'INTERNAL': False,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 134
136 results_without_patch = """*RESULT dummy: dummy= [5.83,6.013,5.573]ms 135 results_without_patch = """*RESULT dummy: dummy= [5.83,6.013,5.573]ms
137 Avg dummy: 5.907711ms 136 Avg dummy: 5.907711ms
138 Sd dummy: 0.255921ms 137 Sd dummy: 0.255921ms
139 RESULT telemetry_page_measurement_results: num_failed= 0 count 138 RESULT telemetry_page_measurement_results: num_failed= 0 count
140 RESULT telemetry_page_measurement_results: num_errored= 0 count 139 RESULT telemetry_page_measurement_results: num_errored= 0 count
141 140
142 View online at http://storage.googleapis.com/chromium-telemetry/html-results/\ 141 View online at http://storage.googleapis.com/chromium-telemetry/html-results/\
143 results-without_patch 142 results-without_patch
144 """ 143 """
144 buildbucket_put_response = {
145 "results":[{
146 "build":{
147 "status": "SCHEDULED",
148 "created_ts": "1459200369835900",
149 "bucket": "user.username",
150 "result_details_json": "null",
151 "status_changed_ts": "1459200369835930",
152 "created_by": "user:username@example.com",
153 "updated_ts": "1459200369835940",
154 "utcnow_ts": "1459200369962370",
155 "parameters_json": "{\"This_has_been\": \"removed\"}",
156 "id": "9016911228971028736"
157 },
158 "kind": "buildbucket#resourcesItem",
159 "etag": "\"8uCIh8TRuYs4vPN3iWmly9SJMqw\""
160 }]
161 }
162
163 buildbucket_get_response = {
164 "bucket": "master.tryserver.chromium.perf",
165 "id": "9009962699124567824",
166 "result": "SUCCESS",
167 "status": "COMPLETED",
168 "status_changed_utc": "Mon Jun 13 19:32:37 2016",
169 "updated_utc": "Mon Jun 13 19:32:37 2016",
170 "url": "http://build.chromium.org/p/tryserver.chromium.perf/builders/linux_p erf_bisect/builds/6537",
171 "utcnow_utc": "Tue Jun 21 21:33:56 2016"
172 }
173
145 174
146 for _, master_dict in BUILDERS.items(): 175 for _, master_dict in BUILDERS.items():
147 for buildername in master_dict.get('builders', {}): 176 for buildername in master_dict.get('builders', {}):
148 config_json = config_json_main.copy() 177 config_json = config_json_main.copy()
149 yield (api.test('basic_' + buildername) + api.properties.tryserver( 178 yield (api.test('basic_' + buildername) + api.properties.tryserver(
150 mastername='tryserver.chromium.perf', 179 mastername='tryserver.chromium.perf',
151 buildername=buildername) + api.override_step_data( 180 buildername=buildername,
181 patch_storage='rietveld',
182 patchset='20001',
183 issue='12345',
184 rietveld="https://codereview.chromium.org") + api.override_step_data(
152 'git diff to analyze patch', 185 'git diff to analyze patch',
153 api.raw_io.stream_output('tools/auto_bisect/bisect.cfg'))) 186 api.raw_io.stream_output('tools/auto_bisect/bisect.cfg')))
154 187
155 yield ( 188 yield (
156 api.test('basic_perf_tryjob_' + buildername) + 189 api.test('basic_perf_tryjob_' + buildername) +
157 api.properties.tryserver( 190 api.properties.tryserver(
158 mastername='tryserver.chromium.perf', 191 mastername='tryserver.chromium.perf',
159 buildername=buildername) + api.override_step_data( 192 buildername=buildername,
193 patch_storage='rietveld',
194 patchset='20001',
195 issue='12345',
196 rietveld="https://codereview.chromium.org") + api.override_step_data(
160 'git diff to analyze patch', 197 'git diff to analyze patch',
161 api.raw_io.stream_output('tools/run-perf-test.cfg')) + 198 api.raw_io.stream_output('tools/run-perf-test.cfg')) +
162 api.override_step_data('load config', api.json.output(config_json)) + 199 api.override_step_data('load config', api.json.output(config_json)) +
200 api.step_data('gsutil exists', retcode=1) +
201 api.step_data('buildbucket.put',
202 stdout=api.json.output(buildbucket_put_response)) +
203 api.step_data('buildbucket.put (2)',
204 stdout=api.json.output(buildbucket_put_response)) +
205 api.step_data('buildbucket.get',
206 stdout=api.json.output(buildbucket_get_response)) +
207 api.step_data('buildbucket.get (2)',
208 stdout=api.json.output(buildbucket_get_response)) +
163 api.step_data('Performance Test (Without Patch) 1 of 1', 209 api.step_data('Performance Test (Without Patch) 1 of 1',
164 stdout=api.raw_io.output(str(results_without_patch))) + 210 stdout=api.raw_io.output(str(results_without_patch))) +
165 api.step_data('Performance Test (With Patch) 1 of 1', 211 api.step_data('Performance Test (With Patch) 1 of 1',
166 stdout=api.raw_io.output(str(results_with_patch)))) 212 stdout=api.raw_io.output(str(results_with_patch))))
167 config_json.update({'metric': 'dummy/dummy'}) 213 config_json.update({'metric': 'dummy/dummy'})
168 214
169 yield (api.test('basic_perf_tryjob_with_metric_' + buildername) + 215 yield (api.test('basic_perf_tryjob_with_metric_' + buildername) +
170 api.properties.tryserver( 216 api.properties.tryserver(
171 mastername='tryserver.chromium.perf', 217 mastername='tryserver.chromium.perf',
172 buildername=buildername) + api.override_step_data( 218 buildername=buildername,
219 patch_storage='rietveld',
220 patchset='20001',
221 issue='12345',
222 rietveld="https://codereview.chromium.org") + api.override_step_data(
173 'git diff to analyze patch', 223 'git diff to analyze patch',
174 api.raw_io.stream_output('tools/run-perf-test.cfg')) + 224 api.raw_io.stream_output('tools/run-perf-test.cfg')) +
175 api.override_step_data('load config', api.json.output(config_json)) 225 api.override_step_data('load config', api.json.output(config_json))
226 + api.step_data('gsutil exists', retcode=1)
227 + api.step_data('buildbucket.put',
228 stdout=api.json.output(buildbucket_put_response))
229 + api.step_data('buildbucket.put (2)',
230 stdout=api.json.output(buildbucket_put_response))
231 + api.step_data('buildbucket.get',
232 stdout=api.json.output(buildbucket_get_response))
233 + api.step_data('buildbucket.get (2)',
234 stdout=api.json.output(buildbucket_get_response))
176 + api.step_data('Performance Test (Without Patch) 1 of 1', 235 + api.step_data('Performance Test (Without Patch) 1 of 1',
177 stdout=api.raw_io.output(results_without_patch)) + 236 stdout=api.raw_io.output(results_without_patch)) +
178 api.step_data('Performance Test (With Patch) 1 of 1', 237 api.step_data('Performance Test (With Patch) 1 of 1',
179 stdout=api.raw_io.output(results_with_patch))) 238 stdout=api.raw_io.output(results_with_patch)))
180 239
181 yield (api.test('perf_tryjob_failed_test_' + buildername) + 240 yield (api.test('perf_tryjob_failed_test_' + buildername) +
182 api.properties.tryserver( 241 api.properties.tryserver(
183 mastername='tryserver.chromium.perf', 242 mastername='tryserver.chromium.perf',
RobertoCN 2016/06/27 19:36:21 Nit: Alignment
Ziqi Xiong 2016/06/27 20:40:35 Done.
184 buildername=buildername) + api.override_step_data( 243 buildername=buildername,
244 patch_storage='rietveld',
245 patchset='20001',
246 issue='12345',
247 rietveld="https://codereview.chromium.org") + api.override_step_data(
185 'git diff to analyze patch', 248 'git diff to analyze patch',
186 api.raw_io.stream_output('tools/run-perf-test.cfg')) + 249 api.raw_io.stream_output('tools/run-perf-test.cfg')) +
RobertoCN 2016/06/27 19:36:21 Nit: let's make this consistent. Either plus at th
Ziqi Xiong 2016/06/27 20:40:35 Done.
250
187 api.override_step_data('load config', api.json.output(config_json)) 251 api.override_step_data('load config', api.json.output(config_json))
188 + api.step_data('Performance Test (With Patch) 1 of 1', 252 + api.step_data('gsutil exists', retcode=1)
189 retcode=1)) 253 + api.step_data('buildbucket.put',
190 254 stdout=api.json.output(buildbucket_put_response))
255 + api.step_data('buildbucket.get',
256 stdout=api.json.output(buildbucket_get_response))
257 + api.step_data('Performance Test (With Patch) 1 of 1', retcode=1))
191 config_json.update({'good_revision': '306475', 258 config_json.update({'good_revision': '306475',
192 'bad_revision': '306476'}) 259 'bad_revision': '306476'})
193 260
194 yield ( 261 yield (
195 api.test('basic_perf_tryjob_with_revisions_' + buildername) + 262 api.test('basic_perf_tryjob_with_revisions_' + buildername) +
196 api.properties.tryserver( 263 api.properties.tryserver(
197 mastername='tryserver.chromium.perf', 264 mastername='tryserver.chromium.perf',
198 buildername=buildername) + api.override_step_data( 265 buildername=buildername,
RobertoCN 2016/06/27 19:36:21 alignment
Ziqi Xiong 2016/06/27 20:40:35 Done.
266 patch_storage='rietveld',
267 patchset='20001',
268 issue='12345',
269 rietveld="https://codereview.chromium.org") + api.override_step_data(
199 'git diff to analyze patch', 270 'git diff to analyze patch',
200 api.raw_io.stream_output('tools/run-perf-test.cfg')) + 271 api.raw_io.stream_output('tools/run-perf-test.cfg')) +
201 api.override_step_data('load config', api.json.output(config_json)) + 272 api.override_step_data('load config', api.json.output(config_json)) +
202 api.step_data('resolving commit_pos ' + config_json['good_revision'], 273 api.step_data('resolving commit_pos ' + config_json['good_revision'],
203 stdout=api.raw_io.output( 274 stdout=api.raw_io.output(
204 'hash:d49c331def2a3bbf3ddd0096eb51551155')) + 275 'hash:d49c331def2a3bbf3ddd0096eb51551155')) +
205 api.step_data('resolving commit_pos ' + config_json['bad_revision'], 276 api.step_data('resolving commit_pos ' + config_json['bad_revision'],
206 stdout=api.raw_io.output( 277 stdout=api.raw_io.output(
207 'hash:bad49c331def2a3bbf3ddd0096eb51551155')) + 278 'hash:bad49c331def2a3bbf3ddd0096eb51551155')) +
279 api.step_data('gsutil exists', retcode=1) +
280 api.step_data('buildbucket.put',
281 stdout=api.json.output(buildbucket_put_response)) +
282 api.step_data('buildbucket.get',
283 stdout=api.json.output(buildbucket_get_response)) +
208 api.step_data( 284 api.step_data(
209 'Performance Test (d49c331def2a3bbf3ddd0096eb51551155) 1 of 1', 285 'Performance Test (d49c331def2a3bbf3ddd0096eb51551155) 1 of 1',
210 stdout=api.raw_io.output(results_without_patch)) + 286 stdout=api.raw_io.output(results_without_patch)) +
211 api.step_data( 287 api.step_data(
212 'Performance Test (bad49c331def2a3bbf3ddd0096eb51551155) 1 of 1', 288 'Performance Test (bad49c331def2a3bbf3ddd0096eb51551155) 1 of 1',
213 stdout=api.raw_io.output(results_with_patch))) 289 stdout=api.raw_io.output(results_with_patch)))
214 290
215 config_json = { 291 config_json = {
216 'max_time_minutes': '25', 292 'max_time_minutes': '25',
217 'repeat_count': '1', 293 'repeat_count': '1',
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 buildername=buildername) + api.step_data( 349 buildername=buildername) + api.step_data(
274 'saving url to temp file', 350 'saving url to temp file',
275 stdout=api.raw_io.output('/tmp/dummy1')) + api.step_data( 351 stdout=api.raw_io.output('/tmp/dummy1')) + api.step_data(
276 'saving json to temp file', 352 'saving json to temp file',
277 stdout=api.raw_io.output('/tmp/dummy2')) + api.properties( 353 stdout=api.raw_io.output('/tmp/dummy2')) + api.properties(
278 bisect_config=bisect_config) + api.properties( 354 bisect_config=bisect_config) + api.properties(
279 job_name='f7a7b4135624439cbd27fdd5133d74ec') + 355 job_name='f7a7b4135624439cbd27fdd5133d74ec') +
280 api.bisect_tester(tempfile='/tmp/dummy') + 356 api.bisect_tester(tempfile='/tmp/dummy') +
281 api.properties(parent_got_revision='1111111') + api.properties( 357 api.properties(parent_got_revision='1111111') + api.properties(
282 parent_build_archive_url='gs://test-domain/test-archive.zip')) 358 parent_build_archive_url='gs://test-domain/test-archive.zip'))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698