opt-viewer: output index first

One can start looking at the index while the pages are still generating

llvm-svn: 326123
This commit is contained in:
Adam Nemet 2018-02-26 21:15:47 +00:00
parent 585dc5db13
commit 6fd19ca763
1 changed files with 9 additions and 7 deletions

View File

@ -242,14 +242,8 @@ def generate_report(all_remarks,
else:
raise
_render_file_bound = functools.partial(_render_file, source_dir, output_dir, context, no_highlight)
if should_print_progress:
print('Rendering HTML files...')
optpmap.pmap(_render_file_bound,
file_remarks.items(),
num_jobs,
should_print_progress)
print('Rendering index page...')
if should_display_hotness:
sorted_remarks = sorted(optrecord.itervalues(all_remarks), key=lambda r: (r.Hotness, r.File, r.Line, r.Column, r.PassWithDiffPrefix, r.yaml_tag, r.Function), reverse=True)
else:
@ -259,6 +253,14 @@ def generate_report(all_remarks,
shutil.copy(os.path.join(os.path.dirname(os.path.realpath(__file__)),
"style.css"), output_dir)
_render_file_bound = functools.partial(_render_file, source_dir, output_dir, context, no_highlight)
if should_print_progress:
print('Rendering HTML files...')
optpmap.pmap(_render_file_bound,
file_remarks.items(),
num_jobs,
should_print_progress)
def main():
parser = argparse.ArgumentParser(description=desc)