pluginupdate.py: print script duration
to help track the plugin speed across time
This commit is contained in:
committed by
Matthieu Coudron
parent
2432292235
commit
80f48521c9
@@ -788,7 +788,10 @@ def update_plugins(editor: Editor, args):
|
|||||||
fetch_config = FetchConfig(args.proc, args.github_token)
|
fetch_config = FetchConfig(args.proc, args.github_token)
|
||||||
update = editor.get_update(args.input_file, args.outfile, fetch_config)
|
update = editor.get_update(args.input_file, args.outfile, fetch_config)
|
||||||
|
|
||||||
|
start_time = time.time()
|
||||||
redirects = update()
|
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)
|
editor.rewrite_input(fetch_config, args.input_file, editor.deprecated, redirects)
|
||||||
|
|
||||||
autocommit = not args.no_commit
|
autocommit = not args.no_commit
|
||||||
|
|||||||
Reference in New Issue
Block a user