Lines Matching +full:repo +full:- +full:name

7 # SPDX-License-Identifier: GPL-2.0-only
39 log = logging.getLogger('oe-build-perf-report')
41 def list_test_revs(repo, tag_name, verbosity, **kwargs): argument
45 fields, revs = gitarchive.get_test_runs(log, repo, tag_name, **valid_kwargs)
75 new_row[i:-len(extra_fields)] = cols[i:]
83 new_row[-2] = commit_cnt
84 new_row[-1] = test_run_cnt
90 def is_xml_format(repo, commit): argument
92 if repo.rev_parse(commit + ':results.xml'):
99 def read_results(repo, tags, xml=True): argument
100 """Read result files from repo"""
135 data = parse_xml_stream(repo.run_cmd(['show'] + git_objs + ['--']))
140 data = parse_json_stream(repo.run_cmd(['show'] + git_objs + ['--']))
218 pref = '-'
241 m_pref = '-'
245 absdiff = stats['val_cls'](stats['r.mean'] - stats['l.mean'])
251 rows.append(['', m_pref, stats['name'] + ' ' + stats['quantity'],
252 str(stats['l.mean']), '->', str(stats['r.mean']),
264 'change': '{:+d}'.format(bs2.num_tasks - bs1.num_tasks)}
274 self.top_consumer = tasks_diff[-5:]
279 self.top_increase = tasks_diff[-5:]
299 metadata = metadata_diff(data[id_comp].metadata, data[-1].metadata)
303 for test in data[-1].results['tests'].keys():
304 test_r = data[-1].results['tests'][test]
305 new_test = {'name': test_r['name'],
315 new_test['message'] = '...\n' + '\n'.join(lines[-20:])
324 new_meas = {'name': meas_r['name'],
326 'description': meas_r['name'] + ' ' + meas_type,
340 samples[-1]['commit_num'] = commit_num
342 absdiff = samples[-1]['val_cls'](samples[-1]['mean'] - samples[id_comp]['mean'])
349 new_meas['value'] = samples[-1]
350 new_meas['value_type'] = samples[-1]['val_cls']
367 'max': get_data_item(data[-1][0], 'layers.meta.commit_count')}
375 def get_buildstats(repo, notes_ref, notes_ref2, revs, outdir=None): argument
378 if not repo.rev_parse(full_ref):
395 … bs_all = json.loads(repo.run_cmd(['notes', '--ref', notes_ref, 'show', tag + '^0']))
398 … bs_all = json.loads(repo.run_cmd(['notes', '--ref', notes_ref2, 'show', tag + '^0']))
432 def auto_args(repo, args): argument
434 # Get the latest commit in the repo
436 msg = repo.run_cmd(['log', '-1', '--branches', '--remotes', '--format=%b'])
460 parser.add_argument('--debug', '-d', action='store_true',
462 parser.add_argument('--repo', '-r', required=True,
464 parser.add_argument('--list', '-l', action='count',
466 parser.add_argument('--html', action='store_true',
469 group.add_argument('--tag-name', '-t',
470 … default='{hostname}/{branch}/{machine}/{commit_number}-g{commit}/{tag_number}',
471 help="Tag name (pattern) for finding results")
472 group.add_argument('--hostname', '-H')
473 group.add_argument('--branch', '-B', default='master', help="Branch to find commit in")
474 group.add_argument('--branch2', help="Branch to find comparision revisions in")
475 group.add_argument('--machine', default='qemux86')
476 group.add_argument('--history-length', default=25, type=int,
478 group.add_argument('--commit',
480 group.add_argument('--commit-number',
482 "--commit is specified")
483 group.add_argument('--commit2',
485 group.add_argument('--commit-number2',
487 "--commit2 is specified")
488 parser.add_argument('--dump-buildstats', nargs='?', const='.',
500 repo = GitRepo(args.repo)
503 list_test_revs(repo, args.tag_name, args.list, hostname=args.hostname)
508 auto_args(repo, args)
510 revs = gitarchive.get_test_revs(log, repo, args.tag_name, hostname=args.hostname,
513 revs2 = gitarchive.get_test_revs(log, repo, args.tag_name, hostname=args.hostname,
529 log.warning("Ignoring --commit-number as --commit was specified")
534 index1 = len(revs) - 1
538 index1 = len(revs2) - 1
543 log.warning("Ignoring --commit-number2 as --commit2 was specified")
549 index2 = index1 - 1
554 index2 = index2 - 1
557 "--commit2 or --commit-number2 to specify it")
572 # Check report format used in the repo (assume all reports in the same fmt)
573 xml = is_xml_format(repo, revs[index_r].tags[-1])
576 index_0 = max(0, min(index_l, index_r - args.history_length))
586 raw_data = [read_results(repo, revs[i].tags, xml) for i in rev_range]
596 outdir = 'oe-build-perf-buildstats' if args.dump_buildstats else None
602 buildstats = get_buildstats(repo, notes_ref, notes_ref2, [rev_l, rev_r], outdir)
609 # Re-map 'left' list index to the data table where index_0 maps to 0
610 print_html_report(data, index_l - index_0, buildstats)