diff options
author | Jason Gross <jgross@mit.edu> | 2018-07-11 04:05:29 -0400 |
---|---|---|
committer | Jason Gross <jgross@mit.edu> | 2018-07-11 04:05:29 -0400 |
commit | d5ff40b57c880a096d8997d20f6211880336659a (patch) | |
tree | 539fa9611bfce67afe48f75c3d81477665c36a11 /tools | |
parent | e372f0e5f0646eb4209baa06c874b4f041ed6574 (diff) | |
parent | cdb38794ff232dbe418aac2c349a2d6dcbd05419 (diff) |
Merge PR #8002: make-both-single-timing-files: fix --sort-by=diff
Diffstat (limited to 'tools')
-rw-r--r-- | tools/TimeFileMaker.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/TimeFileMaker.py b/tools/TimeFileMaker.py index b16888c7e..8564aeff6 100644 --- a/tools/TimeFileMaker.py +++ b/tools/TimeFileMaker.py @@ -145,13 +145,14 @@ def make_diff_table_string(left_times_dict, right_times_dict, for name, lseconds, rseconds in prediff_times) # update to sort by approximate difference, first get_key_abs = make_sorting_key(all_names_dict, descending=descending) - get_key_diff = (lambda name: fix_sign_for_sorting(int(abs(to_seconds(diff_times_dict[name]))), descending=descending)) + get_key_diff_float = (lambda name: fix_sign_for_sorting(to_seconds(diff_times_dict[name]), descending=descending)) + get_key_diff_absint = (lambda name: fix_sign_for_sorting(int(abs(to_seconds(diff_times_dict[name]))), descending=descending)) if sort_by == 'absolute': get_key = get_key_abs elif sort_by == 'diff': - get_key = get_key_diff + get_key = get_key_diff_float else: # sort_by == 'auto' - get_key = (lambda name: (get_key_diff(name), get_key_abs(name))) + get_key = (lambda name: (get_key_diff_absint(name), get_key_abs(name))) names = sorted(all_names_dict.keys(), key=get_key) #names = get_sorted_file_list_from_times_dict(all_names_dict, descending=descending) # set the widths of each of the columns by the longest thing to go in that column |