aboutsummaryrefslogtreecommitdiff
path: root/tools/make-one-time-file.py
blob: 3df7d7e58447f8330b68db747e70599c4e20e251 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env python3
import sys
from TimeFileMaker import *

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description=r'''Formats timing information from the output of `make TIMED=1` into a sorted table.''')
    add_real(parser)
    add_file_name(parser)
    add_output_file_name(parser)
    args = parser.parse_args()
    times_dict = get_times(args.FILE_NAME, use_real=args.real)
    table = make_table_string(times_dict)
    print_or_write_table(table, args.OUTPUT_FILE_NAME)