debug-timing-point

Summary

Measures the time it takes to process a block of template code.

Usage

{debug-timing-point [ id=id ]}
...
{/debug-timing-point}

Parameters

NameTypeDescriptionRequired
id string An identification string for the timing point. No.

Description

This mechanism starts a timer, executes the template code that is encapsulated by "{debug-timing-point...}" and "{/debug-timing-point}", finally it stops the timer. It can be used to figure out how much time it takes to process a block of template code and/or to isolate debug messages that are generated between the timing points. The measurements will show up in the debug message. The optional "id" parameter can be used to assign an identification string to the block.

Examples

Example 1

{debug-timing-point id='test'}
 
{def $nodes=fetch( 'content', 'tree', hash( 'parent_node_id', 2 ) )}
 
{foreach( $nodes as $node )}
    {$node.name|wash()}
{/foreach}
 
{/debug-timing-point}

This example demonstrates how the "debug-timing-point" mechanism can be used to measure the amount of time it takes to fetch and print the names of all nodes that are below node number 2.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.