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

Side by Side Diff: scripts/slave/recipe_modules/auto_bisect/example.py

Issue 1610203003: Iteratively increase sample size for good/bad classification. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Rebasing Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 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 import json 5 import json
6 6
7 DEPS = [ 7 DEPS = [
8 'auto_bisect', 8 'auto_bisect',
9 'chromium_tests', 9 'chromium_tests',
10 'recipe_engine/json', 10 'recipe_engine/json',
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 'refrange': True, 182 'refrange': True,
183 'hash': 'a6298e4afedbf2cd461755ea6f45b0ad64222222', 183 'hash': 'a6298e4afedbf2cd461755ea6f45b0ad64222222',
184 'commit_pos': '314015', 184 'commit_pos': '314015',
185 }, 185 },
186 { 186 {
187 'refrange': True, 187 'refrange': True,
188 'hash': '00316c9ddfb9d7b4e1ed2fff9fe6d964d2111111', 188 'hash': '00316c9ddfb9d7b4e1ed2fff9fe6d964d2111111',
189 'commit_pos': '314017', 189 'commit_pos': '314017',
190 'test_results': { 190 'test_results': {
191 'results': { 191 'results': {
192 'values': [14, 15, 16], 192 'values': [12, 13, 14, 15, 16],
193 }, 193 },
194 'retcodes': [0], 194 'retcodes': [0],
195 } 195 }
196 }, 196 },
197 ] 197 ]
198 198
199 199
200 def _get_ref_range_only_missing_metric_test_data(): 200 def _get_ref_range_only_missing_metric_test_data():
201 return [ 201 return [
202 { 202 {
(...skipping 21 matching lines...) Expand all
224 ] 224 ]
225 225
226 226
227 def _get_basic_test_data(): 227 def _get_basic_test_data():
228 return [ 228 return [
229 { 229 {
230 'refrange': True, 230 'refrange': True,
231 'hash': 'a6298e4afedbf2cd461755ea6f45b0ad64222222', 231 'hash': 'a6298e4afedbf2cd461755ea6f45b0ad64222222',
232 'commit_pos': '314015', 232 'commit_pos': '314015',
233 'test_results': { 233 'test_results': {
234 'results': { 234 'results':{
235 'values': [19, 20, 21], 235 'values': [19, 20, 21, 22, 23],
236 }, 236 },
237 'retcodes': [0], 237 'retcodes': [0],
238 }, 238 },
239 "DEPS": ("vars={'v8_revision': '001'};" 239 "DEPS": ("vars={'v8_revision': '001'};"
240 "deps = {'src/v8': 'v8.git@' + Var('v8_revision')," 240 "deps = {'src/v8': 'v8.git@' + Var('v8_revision'),"
241 "'src/third_party/WebKit': 'webkit.git@010'}"), 241 "'src/third_party/WebKit': 'webkit.git@010'}"),
242 'git_diff': { 242 'git_diff': {
243 '002': 'Dummy .diff contents 001 - 002', 243 '002': 'Dummy .diff contents 001 - 002',
244 '003': 'Dummy .diff contents 001 - 003', 244 '003': 'Dummy .diff contents 001 - 003',
245 }, 245 },
246 'cl_info': { 246 'cl_info': {
247 'author': 'DummyAuthor', 247 'author': 'DummyAuthor',
248 'email': 'dummy@nowhere.com', 248 'email': 'dummy@nowhere.com',
249 'subject': 'Some random CL', 249 'subject': 'Some random CL',
250 'date': '01/01/2015', 250 'date': '01/01/2015',
251 'body': ('A long description for a CL.\n' 251 'body': ('A long description for a CL.\n'
252 'Containing multiple lines'), 252 'Containing multiple lines'),
253 }, 253 },
254 }, 254 },
255 { 255 {
256 'hash': 'dcdcdc0ff1122212323134879ddceeb1240b0988', 256 'hash': 'dcdcdc0ff1122212323134879ddceeb1240b0988',
257 'commit_pos': '314016', 257 'commit_pos': '314016',
258 'test_results': { 258 'test_results': {
259 'results': { 259 'results': {
260 'values': [14, 15, 16], 260 'values': [12, 13, 14, 15, 16],
261 }, 261 },
262 'retcodes': [0], 262 'retcodes': [0],
263 }, 263 },
264 'DEPS_change': 'True', 264 'DEPS_change': 'True',
265 "DEPS": ("vars={'v8_revision': '004'};" 265 "DEPS": ("vars={'v8_revision': '004'};"
266 "deps = {'src/v8': 'v8.git@' + Var('v8_revision')," 266 "deps = {'src/v8': 'v8.git@' + Var('v8_revision'),"
267 "'src/third_party/WebKit': 'webkit.git@010'}"), 267 "'src/third_party/WebKit': 'webkit.git@010'}"),
268 'DEPS_interval': {'v8': '002 003 004'.split()}, 268 'DEPS_interval': {'v8': '002 003 004'.split()},
269 }, 269 },
270 { 270 {
271 'refrange': True, 271 'refrange': True,
272 'hash': '00316c9ddfb9d7b4e1ed2fff9fe6d964d2111111', 272 'hash': '00316c9ddfb9d7b4e1ed2fff9fe6d964d2111111',
273 'commit_pos': '314017', 273 'commit_pos': '314017',
274 'test_results': { 274 'test_results': {
275 'results': { 275 'results': {
276 'values': [14, 15, 16], 276 'values': [12, 13, 14, 15, 16],
277 }, 277 },
278 'retcodes': [0], 278 'retcodes': [0],
279 } 279 }
280 }, 280 },
281 ] 281 ]
282 282
283 283
284 def _get_reversed_basic_test_data(): 284 def _get_reversed_basic_test_data():
285 return [ 285 return [
286 { 286 {
287 'refrange': True, 287 'refrange': True,
288 'hash': '00316c9ddfb9d7b4e1ed2fff9fe6d964d2111111', 288 'hash': '00316c9ddfb9d7b4e1ed2fff9fe6d964d2111111',
289 'commit_pos': '314015', 289 'commit_pos': '314015',
290 'test_results': { 290 'test_results': {
291 'results': { 291 'results': {
292 'values': [19, 20, 21], 292 'values': [19, 20, 21, 22, 23],
293 }, 293 },
294 'retcodes': [0], 294 'retcodes': [0],
295 }, 295 },
296 'cl_info': { 296 'cl_info': {
297 'author': 'DummyAuthor', 297 'author': 'DummyAuthor',
298 'email': 'dummy@nowhere.com', 298 'email': 'dummy@nowhere.com',
299 'subject': 'Some random CL', 299 'subject': 'Some random CL',
300 'date': '01/01/2015', 300 'date': '01/01/2015',
301 'body': ('A long description for a CL.\n' 301 'body': ('A long description for a CL.\n'
302 'Containing multiple lines'), 302 'Containing multiple lines'),
303 }, 303 },
304 }, 304 },
305 { 305 {
306 'hash': 'a6298e4afedbf2cd461755ea6f45b0ad64222222', 306 'hash': 'a6298e4afedbf2cd461755ea6f45b0ad64222222',
307 'commit_pos': '314016', 307 'commit_pos': '314016',
308 'test_results': { 308 'test_results': {
309 'results': { 309 'results': {
310 'values': [19, 20, 21], 310 'values': [19, 20, 21, 22, 23],
311 }, 311 },
312 'retcodes': [0], 312 'retcodes': [0],
313 }, 313 },
314 "DEPS": ("vars={'v8_revision': '001'};" 314 "DEPS": ("vars={'v8_revision': '001'};"
315 "deps = {'src/v8': 'v8.git@' + Var('v8_revision')," 315 "deps = {'src/v8': 'v8.git@' + Var('v8_revision'),"
316 "'src/third_party/WebKit': 'webkit.git@010'}"), 316 "'src/third_party/WebKit': 'webkit.git@010'}"),
317 'git_diff': { 317 'git_diff': {
318 '002': 'Dummy .diff contents 001 - 002', 318 '002': 'Dummy .diff contents 001 - 002',
319 '003': 'Dummy .diff contents 001 - 003', 319 '003': 'Dummy .diff contents 001 - 003',
320 }, 320 },
321 }, 321 },
322 { 322 {
323 'refrange': True, 323 'refrange': True,
324 'hash': 'dcdcdc0ff1122212323134879ddceeb1240b0988', 324 'hash': 'dcdcdc0ff1122212323134879ddceeb1240b0988',
325 'commit_pos': '314017', 325 'commit_pos': '314017',
326 'test_results': { 326 'test_results': {
327 'results': { 327 'results': {
328 'values': [14, 15, 16], 328 'values': [12, 13, 14, 15, 16],
329 }, 329 },
330 'retcodes': [0], 330 'retcodes': [0],
331 }, 331 },
332 'DEPS_change': 'True', 332 'DEPS_change': 'True',
333 "DEPS": ("vars={'v8_revision': '004'};" 333 "DEPS": ("vars={'v8_revision': '004'};"
334 "deps = {'src/v8': 'v8.git@' + Var('v8_revision')," 334 "deps = {'src/v8': 'v8.git@' + Var('v8_revision'),"
335 "'src/third_party/WebKit': 'webkit.git@010'}"), 335 "'src/third_party/WebKit': 'webkit.git@010'}"),
336 'DEPS_interval': {'v8': '002 003 004'.split()}, 336 'DEPS_interval': {'v8': '002 003 004'.split()},
337 }, 337 },
338 ] 338 ]
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 yield api.step_data(step_name, stdout=api.raw_io.output(file_hash)) 449 yield api.step_data(step_name, stdout=api.raw_io.output(file_hash))
450 step_name = 'Expanding revision range for revision %s on depot %s' 450 step_name = 'Expanding revision range for revision %s on depot %s'
451 step_name %= (interval[-1], depot_name) 451 step_name %= (interval[-1], depot_name)
452 stdout = api.json.output([(r, 0) for r in interval[:-1]]) 452 stdout = api.json.output([(r, 0) for r in interval[:-1]])
453 yield api.step_data(step_name, stdout=stdout) 453 yield api.step_data(step_name, stdout=stdout)
454 454
455 if 'cl_info' in revision_data: 455 if 'cl_info' in revision_data:
456 step_name = 'Reading culprit cl information.' 456 step_name = 'Reading culprit cl information.'
457 stdout = api.json.output(revision_data['cl_info']) 457 stdout = api.json.output(revision_data['cl_info'])
458 yield api.step_data(step_name, stdout=stdout) 458 yield api.step_data(step_name, stdout=stdout)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698