Filename | /var/www/foswiki11/lib/Foswiki/Plugins/CompareRevisionsAddonPlugin.pm |
Statements | Executed 45 statements in 568µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
13 | 1 | 1 | 220µs | 256µs | commonTagsHandler | Foswiki::Plugins::CompareRevisionsAddonPlugin::
1 | 1 | 1 | 36µs | 36µs | _handleRdiff2Compare | Foswiki::Plugins::CompareRevisionsAddonPlugin::
1 | 1 | 1 | 30µs | 38µs | initPlugin | Foswiki::Plugins::CompareRevisionsAddonPlugin::
1 | 1 | 1 | 15µs | 28µs | BEGIN@15 | Foswiki::Plugins::CompareRevisionsAddonPlugin::
1 | 1 | 1 | 11µs | 18µs | BEGIN@16 | Foswiki::Plugins::CompareRevisionsAddonPlugin::
1 | 1 | 1 | 9µs | 9µs | BEGIN@18 | Foswiki::Plugins::CompareRevisionsAddonPlugin::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # See bottom of file for license and copyright information | ||||
2 | |||||
3 | =pod | ||||
4 | |||||
5 | ---+ package CompareRevisionsAddonPlugin | ||||
6 | |||||
7 | This is a helper plugin for the CompareRevisionsAddon package. | ||||
8 | |||||
9 | =cut | ||||
10 | |||||
11 | # change the package name and $pluginName!!! | ||||
12 | package Foswiki::Plugins::CompareRevisionsAddonPlugin; | ||||
13 | |||||
14 | # Always use strict to enforce variable scoping | ||||
15 | 2 | 30µs | 2 | 41µs | # spent 28µs (15+13) within Foswiki::Plugins::CompareRevisionsAddonPlugin::BEGIN@15 which was called:
# once (15µs+13µs) by Foswiki::Plugin::BEGIN@2.8 at line 15 # spent 28µs making 1 call to Foswiki::Plugins::CompareRevisionsAddonPlugin::BEGIN@15
# spent 13µs making 1 call to strict::import |
16 | 2 | 26µs | 2 | 24µs | # spent 18µs (11+6) within Foswiki::Plugins::CompareRevisionsAddonPlugin::BEGIN@16 which was called:
# once (11µs+6µs) by Foswiki::Plugin::BEGIN@2.8 at line 16 # spent 18µs making 1 call to Foswiki::Plugins::CompareRevisionsAddonPlugin::BEGIN@16
# spent 6µs making 1 call to warnings::import |
17 | |||||
18 | 2 | 242µs | 1 | 9µs | # spent 9µs within Foswiki::Plugins::CompareRevisionsAddonPlugin::BEGIN@18 which was called:
# once (9µs+0s) by Foswiki::Plugin::BEGIN@2.8 at line 18 # spent 9µs making 1 call to Foswiki::Plugins::CompareRevisionsAddonPlugin::BEGIN@18 |
19 | |||||
20 | # Keep this in sync with CompareRevsionsAddOn | ||||
21 | 1 | 700ns | our $VERSION = '1.112'; | ||
22 | 1 | 300ns | our $RELEASE = '1.112'; | ||
23 | |||||
24 | # Name of this Plugin, only used in this module | ||||
25 | 1 | 200ns | our $pluginName = 'CompareRevisionsAddonPlugin'; | ||
26 | |||||
27 | # We have no prefs in plugin topic | ||||
28 | 1 | 200ns | our $NO_PREFS_IN_TOPIC = 1; | ||
29 | |||||
30 | 1 | 100ns | our $debug = 0; | ||
31 | |||||
32 | # spent 38µs (30+9) within Foswiki::Plugins::CompareRevisionsAddonPlugin::initPlugin which was called:
# once (30µs+9µs) by Foswiki::Plugin::__ANON__[/var/www/foswiki11/lib/Foswiki/Plugin.pm:241] at line 234 of /var/www/foswiki11/lib/Foswiki/Plugin.pm | ||||
33 | 1 | 2µs | my ( $topic, $web, $user, $installWeb ) = @_; | ||
34 | |||||
35 | # check for Plugins.pm versions | ||||
36 | 1 | 27µs | 1 | 9µs | if ( $Foswiki::Plugins::VERSION < 1.026 ) { # spent 9µs making 1 call to version::vxs::VCMP |
37 | Foswiki::Func::writeWarning( | ||||
38 | "Version mismatch between $pluginName and Plugins.pm"); | ||||
39 | return 0; | ||||
40 | } | ||||
41 | |||||
42 | # Plugin correctly initialized | ||||
43 | 1 | 7µs | return 1; | ||
44 | } | ||||
45 | |||||
46 | # spent 256µs (220+36) within Foswiki::Plugins::CompareRevisionsAddonPlugin::commonTagsHandler which was called 13 times, avg 20µs/call:
# 13 times (220µs+36µs) by Foswiki::Plugin::invoke at line 294 of /var/www/foswiki11/lib/Foswiki/Plugin.pm, avg 20µs/call | ||||
47 | |||||
48 | # do not uncomment, use $_[0], $_[1]... instead | ||||
49 | ### my ( $text, $topic, $web ) = @_; | ||||
50 | |||||
51 | 13 | 4µs | Foswiki::Func::writeDebug( | ||
52 | "- ${pluginName}::commonTagsHandler( $_[2].$_[1] )") | ||||
53 | if $debug; | ||||
54 | |||||
55 | 14 | 176µs | 1 | 36µs | $_[0] =~ s/%RDIFF2COMPARE{"?(.*?)"?}%/&_handleRdiff2Compare($1)/ge; # spent 36µs making 1 call to Foswiki::Plugins::CompareRevisionsAddonPlugin::_handleRdiff2Compare |
56 | } | ||||
57 | |||||
58 | # spent 36µs within Foswiki::Plugins::CompareRevisionsAddonPlugin::_handleRdiff2Compare which was called:
# once (36µs+0s) by Foswiki::Plugins::CompareRevisionsAddonPlugin::commonTagsHandler at line 55 | ||||
59 | |||||
60 | 1 | 3µs | my $text = shift; | ||
61 | 1 | 29µs | $text =~ s{/rdiff $Foswiki::cfg{ScriptSuffix}/} | ||
62 | {/compare$Foswiki::cfg{ScriptSuffix}/}xmsg; | ||||
63 | 1 | 16µs | return $text; | ||
64 | |||||
65 | } | ||||
66 | |||||
67 | 1 | 4µs | 1; | ||
68 | __END__ |