diff options
Diffstat (limited to 'utils/opt-viewer/opt-stats.py')
-rwxr-xr-x | utils/opt-viewer/opt-stats.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/utils/opt-viewer/opt-stats.py b/utils/opt-viewer/opt-stats.py index 79e5c03eca9fa..a7e598fdfd026 100755 --- a/utils/opt-viewer/opt-stats.py +++ b/utils/opt-viewer/opt-stats.py @@ -22,15 +22,19 @@ if __name__ == '__main__': default=cpu_count(), type=int, help='Max job count (defaults to %(default)s, the current CPU count)') + parser.add_argument( + '--no-progress-indicator', + '-n', + action='store_true', + default=False, + help='Do not display any indicator of how many YAML files were read.') args = parser.parse_args() - if args.jobs == 1: - pmap = map - else: - pool = Pool(processes=args.jobs) - pmap = pool.map - - all_remarks, file_remarks, _ = optrecord.gather_results(pmap, args.yaml_files) + print_progress = not args.no_progress_indicator + all_remarks, file_remarks, _ = optrecord.gather_results( + args.yaml_files, args.jobs, print_progress) + if print_progress: + print('\n') bypass = defaultdict(int) byname = defaultdict(int) |