Skip to content

[WIP][Compare Perf] Add support for markdown and html #1682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions benchmark/scripts/Benchmark_Driver
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,13 @@ def format_name(log_path):
return '/'.join(log_path.split('/')[-2:])


def compare_logs(compare_script, new_log, old_log):
def compare_logs(compare_script, new_log, old_log, log_dir, opt):
"""Return diff of log files at paths `new_log` and `old_log`"""
print('Comparing %s %s ...' % (format_name(old_log), format_name(new_log)))
subprocess.call([compare_script, old_log, new_log])
subprocess.call([compare_script, '--old-file', old_log,
'--new-file', new_log, '--format', 'markdown',
'--output', os.path.join(log_dir, 'latest_compare_{0}.md'
.format(opt))])


def compare(args):
Expand Down Expand Up @@ -288,10 +291,12 @@ def compare(args):
len(recent_logs['master_Onone']) > 1:
compare_logs(compare_script,
recent_logs['master_O'][0],
recent_logs['master_O'][1])
recent_logs['master_O'][1],
log_dir, 'O')
compare_logs(compare_script,
recent_logs['master_Onone'][0],
recent_logs['master_Onone'][1])
recent_logs['master_Onone'][1],
log_dir, 'Onone')
else:
print('master/master comparison skipped: no previous master logs')
else:
Expand All @@ -307,10 +312,12 @@ def compare(args):
else:
compare_logs(compare_script,
recent_logs[current_branch + '_O'][0],
recent_logs[current_branch + '_O'][1])
recent_logs[current_branch + '_O'][1],
log_dir, 'O')
compare_logs(compare_script,
recent_logs[current_branch + '_Onone'][0],
recent_logs[current_branch + '_Onone'][1])
recent_logs[current_branch + '_Onone'][1],
log_dir, 'Onone')

if len(recent_logs['master_O']) == 0 or \
len(recent_logs['master_Onone']) == 0:
Expand All @@ -319,10 +326,12 @@ def compare(args):
else:
compare_logs(compare_script,
recent_logs[current_branch + '_O'][0],
recent_logs['master_O'][0])
recent_logs['master_O'][0],
log_dir, 'O')
compare_logs(compare_script,
recent_logs[current_branch + '_Onone'][0],
recent_logs['master_Onone'][0])
recent_logs['master_Onone'][0],
log_dir, 'Onone')

# TODO: Fail on large regressions

Expand Down
Loading