From 3a9cc4c0f855bba69dda7aaaa5c1c5374732a332 Mon Sep 17 00:00:00 2001 From: Akbar Rahman Date: Tue, 2 Jan 2024 15:41:19 +0000 Subject: [PATCH] measure and print how long notes generation takes --- gronk.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gronk.py b/gronk.py index aa9d396..8fb230c 100755 --- a/gronk.py +++ b/gronk.py @@ -437,6 +437,8 @@ def generate_tag_browser(output_dir): def main(args): """ Entry point for script """ + start_time = time.time() + global LICENSE global FILEMAP @@ -465,7 +467,7 @@ def main(args): root_properties = FILEMAP.get(root) root_properties['dst_path']['raw'].mkdir(parents=True, exist_ok=True) - pprint.pprint(root_properties) + #pprint.pprint(root_properties) html = JINJA_TEMPLATE_INDEX.render( gronk_commit=GRONK_COMMIT, title=root_properties.get('title', ''), @@ -502,6 +504,9 @@ def main(args): generate_tag_browser(args.output_dir.joinpath('tags')) generate_permalink_page(args.output_dir) + elapsed_time = time.time() - start_time + print(f"generated notes {elapsed_time=}") + return 0