Filename | /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugins/CompareRevisionsAddonPlugin.pm |
Statements | Executed 2321 statements in 15.8ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1151 | 1 | 1 | 14.0ms | 16.7ms | commonTagsHandler | Foswiki::Plugins::CompareRevisionsAddonPlugin::
1152 | 2 | 1 | 2.49ms | 2.49ms | CORE:subst (opcode) | Foswiki::Plugins::CompareRevisionsAddonPlugin::
1 | 1 | 1 | 66µs | 87µs | BEGIN@16 | Foswiki::Plugins::CompareRevisionsAddonPlugin::
1 | 1 | 1 | 59µs | 100µs | _handleRdiff2Compare | Foswiki::Plugins::CompareRevisionsAddonPlugin::
1 | 1 | 1 | 39µs | 39µs | CORE:regcomp (opcode) | Foswiki::Plugins::CompareRevisionsAddonPlugin::
1 | 1 | 1 | 30µs | 38µs | BEGIN@15 | Foswiki::Plugins::CompareRevisionsAddonPlugin::
2 | 1 | 1 | 29µs | 29µs | CORE:substcont (opcode) | Foswiki::Plugins::CompareRevisionsAddonPlugin::
1 | 1 | 1 | 22µs | 22µs | BEGIN@18 | Foswiki::Plugins::CompareRevisionsAddonPlugin::
1 | 1 | 1 | 14µs | 14µs | initPlugin | 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 | 49µs | 2 | 46µs | # spent 38µs (30+8) within Foswiki::Plugins::CompareRevisionsAddonPlugin::BEGIN@15 which was called:
# once (30µs+8µs) by Foswiki::Plugin::BEGIN@2.6 at line 15 # spent 38µs making 1 call to Foswiki::Plugins::CompareRevisionsAddonPlugin::BEGIN@15
# spent 8µs making 1 call to strict::import |
16 | 2 | 50µs | 2 | 108µs | # spent 87µs (66+21) within Foswiki::Plugins::CompareRevisionsAddonPlugin::BEGIN@16 which was called:
# once (66µs+21µs) by Foswiki::Plugin::BEGIN@2.6 at line 16 # spent 87µs making 1 call to Foswiki::Plugins::CompareRevisionsAddonPlugin::BEGIN@16
# spent 21µs making 1 call to warnings::import |
17 | |||||
18 | 2 | 443µs | 1 | 22µs | # spent 22µs within Foswiki::Plugins::CompareRevisionsAddonPlugin::BEGIN@18 which was called:
# once (22µs+0s) by Foswiki::Plugin::BEGIN@2.6 at line 18 # spent 22µs making 1 call to Foswiki::Plugins::CompareRevisionsAddonPlugin::BEGIN@18 |
19 | |||||
20 | # This should always be $Rev$ so that Foswiki can determine the checked-in | ||||
21 | # status of the plugin. It is used by the build automation tools, so | ||||
22 | # you should leave it alone. | ||||
23 | 1 | 2µs | our $VERSION = '$Rev$ (2011-04-30)'; | ||
24 | |||||
25 | # This is a free-form string you can use to "name" your own plugin version. | ||||
26 | # It is *not* used by the build automation tools, but is reported as part | ||||
27 | # of the version number in PLUGINDESCRIPTIONS. | ||||
28 | 1 | 1µs | our $RELEASE = '1.1.5'; | ||
29 | |||||
30 | # Name of this Plugin, only used in this module | ||||
31 | 1 | 1µs | our $pluginName = 'CompareRevisionsAddonPlugin'; | ||
32 | |||||
33 | # We have no prefs in plugin topic | ||||
34 | 1 | 1µs | our $NO_PREFS_IN_TOPIC = 1; | ||
35 | |||||
36 | 1 | 1µs | our $debug = 0; | ||
37 | |||||
38 | # spent 14µs within Foswiki::Plugins::CompareRevisionsAddonPlugin::initPlugin which was called:
# once (14µs+0s) by Foswiki::Plugin::__ANON__[/usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugin.pm:235] at line 228 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugin.pm | ||||
39 | 3 | 14µs | my ( $topic, $web, $user, $installWeb ) = @_; | ||
40 | |||||
41 | # check for Plugins.pm versions | ||||
42 | if ( $Foswiki::Plugins::VERSION < 1.026 ) { | ||||
43 | Foswiki::Func::writeWarning( | ||||
44 | "Version mismatch between $pluginName and Plugins.pm"); | ||||
45 | return 0; | ||||
46 | } | ||||
47 | |||||
48 | # Plugin correctly initialized | ||||
49 | return 1; | ||||
50 | } | ||||
51 | |||||
52 | # spent 16.7ms (14.0+2.62) within Foswiki::Plugins::CompareRevisionsAddonPlugin::commonTagsHandler which was called 1151 times, avg 14µs/call:
# 1151 times (14.0ms+2.62ms) by Foswiki::Plugin::invoke at line 287 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Plugin.pm, avg 14µs/call | ||||
53 | |||||
54 | # do not uncomment, use $_[0], $_[1]... instead | ||||
55 | ### my ( $text, $topic, $web ) = @_; | ||||
56 | |||||
57 | 2303 | 15.1ms | Foswiki::Func::writeDebug( | ||
58 | "- ${pluginName}::commonTagsHandler( $_[2].$_[1] )") | ||||
59 | if $debug; | ||||
60 | |||||
61 | 1154 | 2.62ms | $_[0] =~ s/%RDIFF2COMPARE{"?(.*?)"?}%/&_handleRdiff2Compare($1)/ge; # spent 2.49ms making 1151 calls to Foswiki::Plugins::CompareRevisionsAddonPlugin::CORE:subst, avg 2µs/call
# spent 100µs making 1 call to Foswiki::Plugins::CompareRevisionsAddonPlugin::_handleRdiff2Compare
# spent 29µs making 2 calls to Foswiki::Plugins::CompareRevisionsAddonPlugin::CORE:substcont, avg 15µs/call | ||
62 | } | ||||
63 | |||||
64 | # spent 100µs (59+41) within Foswiki::Plugins::CompareRevisionsAddonPlugin::_handleRdiff2Compare which was called:
# once (59µs+41µs) by Foswiki::Plugins::CompareRevisionsAddonPlugin::commonTagsHandler at line 61 | ||||
65 | |||||
66 | 3 | 113µs | my $text = shift; | ||
67 | 2 | 41µs | $text =~ s{/rdiff $Foswiki::cfg{ScriptSuffix}/} # spent 39µs making 1 call to Foswiki::Plugins::CompareRevisionsAddonPlugin::CORE:regcomp
# spent 2µs making 1 call to Foswiki::Plugins::CompareRevisionsAddonPlugin::CORE:subst | ||
68 | {/compare$Foswiki::cfg{ScriptSuffix}/}xmsg; | ||||
69 | return $text; | ||||
70 | |||||
71 | } | ||||
72 | |||||
73 | 1 | 7µs | 1; | ||
74 | __END__ | ||||
# spent 39µs within Foswiki::Plugins::CompareRevisionsAddonPlugin::CORE:regcomp which was called:
# once (39µs+0s) by Foswiki::Plugins::CompareRevisionsAddonPlugin::_handleRdiff2Compare at line 67 | |||||
# spent 2.49ms within Foswiki::Plugins::CompareRevisionsAddonPlugin::CORE:subst which was called 1152 times, avg 2µs/call:
# 1151 times (2.49ms+0s) by Foswiki::Plugins::CompareRevisionsAddonPlugin::commonTagsHandler at line 61, avg 2µs/call
# once (2µs+0s) by Foswiki::Plugins::CompareRevisionsAddonPlugin::_handleRdiff2Compare at line 67 | |||||
# spent 29µs within Foswiki::Plugins::CompareRevisionsAddonPlugin::CORE:substcont which was called 2 times, avg 15µs/call:
# 2 times (29µs+0s) by Foswiki::Plugins::CompareRevisionsAddonPlugin::commonTagsHandler at line 61, avg 15µs/call |