From af8464e344c9d0337a2189a56abd71eb3688da34 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 11 May 2017 09:20:35 +0100 Subject: [PATCH] Add timer --- md_pdf/build/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/md_pdf/build/__init__.py b/md_pdf/build/__init__.py index 3a34605..5b9f885 100644 --- a/md_pdf/build/__init__.py +++ b/md_pdf/build/__init__.py @@ -6,12 +6,14 @@ from md_pdf.build.pdf import export_pdf from md_pdf.build.template import parse_template import os import logging +import time logger = logging.getLogger(__file__) def build(config): logger.debug("Starting Build...") + start_time = time.time() data = read_files(os.path.abspath(config['input'])) doc = build_document(data, config.get('bibliography'), config.get('context')) parsed_template = parse_template(doc, config) @@ -21,3 +23,4 @@ def build(config): render_cover(config) render_css() export_pdf(parsed_template, config) + logger.info('Output completed in {:.2f} seconds.'.format(time.time() - start_time))