Knowledge Base / Appnel Solutions 

Last Modified
30 January 2008 @ 11am

Temper for Movable Type Manual

Temper (TEMPlate profilER) for Movable Type measures and logs system page building performance information for benchmark and diagnostic purposes.

This plugin was designed to aid in pro-actively detecting and identify performance bottlenecks in a Movable Type system's publishing.

Temper does two things:

  • Enable the output template/page build times to STDERR using DebugMode 16.
  • Log template/page build times to the system activity log.

System Requirements

This plugin requires at least version 4.01 of Movable Type and Time::HiRes from CPAN.

Getting Started

You install it like any other plugin by unpacking the contents of the distribution in the MT application directory.

Once installed, the plugin won't do anything unless you add one of the following to your mt-config.cgi file:

    DebugMode 16
    TemplateProfilerLog All

The first directive will output page build messages for anything it builds to STDERR. The second directive tells MT to log all page build times to the activity of regardless of the warning threshold. (Changing "All" to "Warning" will only log "slow" page builds.)

Remember that DebugMode is the sum of bitwise switches so you may not be using 16 like in the example above. For instance, displaying general Perl warnings and tag build times would use a DebugMode of 25 (1+8+16).

Debug Mode

Temper will output all page build times to STDERR with a bitwise value of 16. The output is similar to the template tag build messages DebugMode 8 will output.

NOTE: that the DebugMode functionality is separate and independent of the activity logging function.

Configuration Directives

You can modify the behavior of this plugin using configuration directives in your system's mt-config.cgi file.

  • TemplateProfilerLog

    Sets the type of activity logging the plugin will perform. Recognized values are "All", "Warning" or "None". None is the default therefore the plugin doesn't do anything without this directive or setting the DebugMode with a bitwise value of 16.

  • TemplateProfilerEntryThreshold

    Defines the maximum amount of time in seconds that an entry page build can use without generating a warning.

  • TemplateProfilerPageThreshold

    Defines the maximum amount of time in seconds that an page (as in content record) build can use without generating a warning.

  • TemplateProfilerArchiveThreshold

    Defines the maximum amount of time in seconds that an archive page build can use without generating a warning.

  • TemplateProfilerIndexThreshold

    Defines the maximum amount of time in seconds that an index page build can use without generating a warning.

  • TemplateProfilerSystemThreshold

    Defines the maximum amount of time in seconds that a system template page (such as search results or comment preview page) build can use without generating a warning.

Known Issues

  • The activity log meta data I am passing in is being interpreted as a string and with encoding applied displays the HTML tags rather then passing them on the browser to interpret. Is this another undocumented change in MT? How are you suppose to format meta data?
  • It's been reported that this plugin doesn't work with the PublishQueue. This needs to be addressed, but I don't have enough information to go off of yet.

 

Submit Feedback on This Article

Your comments on how we can improve this article are appreciated. Please do not use the feedback form to submit support requests or question. We will not respond to or publish such queries submitted through this form.

Back to Home