Plugin Benchmark Add-On
This is a small script to measure the performance of a Plugin. Plugin authors can use it to measure and document the
TWiki:Plugins/Benchmark numbers.
Usage
- Specify Plugin name and other topics to benchmark. The first parameter is the Plugin name, followed by topic names. The TWiki web is assumed unless specified.
- Example:
% ./pluginbenchmark TablePlugin GoodStyle FormattedSearch Main.TWikiUsers
Notes:
- Before running the benchmarks, disable mod_perl or SpeedyCGI in case used
- Run utility on web server's shell where TWiki is installed
- Measure when there is no load on the server
- All Plugins are automatically disabled except for the DefaultPlugin and the specified Plugin. The classic TWiki skin is enabled
Example output
% ./pluginbenchmark SpreadSheetPlugin FormattedSearch GoodStyle
TWiki Plugin benchmark tool. Time::HiRes is used.
Measuring, please be patient...
Topic: Without: With: Percent:
------------------------------ -------- -------- --------
TWiki.SpreadSheetPlugin 0.481 0.506 95%
TWiki.FormattedSearch 1.677 1.694 99%
TWiki.GoodStyle 0.301 0.304 99%
Add-On Installation Instructions
Note: You do not need to install anything on the browser to use this add-on. The following instructions are for the administrator who installs the add-on on the server where TWiki is running.
- Download the ZIP file from the Add-on Home (see below)
- Unzip
PluginBenchmarkAddOn.zip in your twiki installation directory. Content:
| File: | Description: |
data/TWiki/PluginBenchmarkAddOn.txt | Add-on topic |
data/TWiki/PluginBenchmarkAddOn.txt,v | Plugin topic repository |
bin/pluginbenchmark | Benchmark utility script |
- Patch TWiki::Plugins if needed:
- Currently activated Plugins: DefaultPlugin, SpreadSheetPlugin, BlackListPlugin, CommentPlugin, EditTablePlugin, HeadlinesPlugin, InterwikiPlugin, NetgrepPlugin, PerlDocPlugin, RenderListPlugin, SlideShowPlugin, SmiliesPlugin, SyndicatePlugin, TablePlugin, TreePlugin
- Test if above list shows only the
DefaultPlugin
- In case not, apply the TWiki:Codev/DebugEnablePlugins patch. This allows one to enable and disable installed Plugins with a
debugenableplugins URL parameter
- Configure the utility script:
- Edit
bin/pluginbenchmark and set the variables on top to reflect your environment
- Install CPAN:Time::HiRes if needed:
- Run the pluginbenchmark utility from the shell without parameters, it will tell you if Time::HiRes is installed or not.
- It is strongly recommended to run the utility only with Time::HiRes installed (it will work without the module, but it is very slow and the result is not accurate)
- Test if the installation was successful:
- Run the pluginbenchmark utility from the shell:
% ./pluginbenchmark TablePlugin GoodStyle
Add-On Info
Related Topic: TWikiAddOns?
--
TWiki:Main/PeterThoeny - 11 Nov 2004
to top