Mercurial > piecrust2
diff piecrust/rendering.py @ 803:bf9f4e55f751
rendering: Separate performance timers for renering segments and layouts.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 29 Sep 2016 21:59:20 -0700 |
parents | 6d8fe8e93a91 |
children | 10c482d57c79 |
line wrap: on
line diff
--- a/piecrust/rendering.py Thu Sep 29 21:52:18 2016 -0700 +++ b/piecrust/rendering.py Thu Sep 29 21:59:20 2016 -0700 @@ -279,7 +279,8 @@ for seg_part in seg.parts: part_format = seg_part.fmt or format_name try: - with app.env.timerScope(engine.__class__.__name__): + with app.env.timerScope( + engine.__class__.__name__ + '_segment'): part_text = engine.renderSegmentPart( page.path, seg_part, page_data) except TemplatingError as err: @@ -324,7 +325,7 @@ engine = get_template_engine(page.app, engine_name) try: - with page.app.env.timerScope(engine.__class__.__name__): + with page.app.env.timerScope(engine.__class__.__name__ + '_layout'): output = engine.renderFile(full_names, layout_data) except TemplateNotFoundError as ex: logger.exception(ex)