pluginupdate.py: print script duration

to help track the plugin speed across time
This commit is contained in:
Matthieu C. 2024-06-19 22:36:59 +02:00 committed by Matthieu Coudron
parent 2432292235
commit 80f48521c9

View File

@ -788,7 +788,10 @@ def update_plugins(editor: Editor, args):
fetch_config = FetchConfig(args.proc, args.github_token)
update = editor.get_update(args.input_file, args.outfile, fetch_config)
start_time = time.time()
redirects = update()
duration = time.time() - start_time
print(f"The plugin update took {duration}s.")
editor.rewrite_input(fetch_config, args.input_file, editor.deprecated, redirects)
autocommit = not args.no_commit