Filename | /var/www/foswiki11/lib/Foswiki/Plugins/FindElsewherePlugin.pm |
Statements | Executed 27 statements in 347µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
5 | 1 | 1 | 1.84ms | 9.63ms | startRenderingHandler | Foswiki::Plugins::FindElsewherePlugin::
1 | 1 | 1 | 21µs | 72µs | initPlugin | Foswiki::Plugins::FindElsewherePlugin::
1 | 1 | 1 | 14µs | 27µs | BEGIN@23 | Foswiki::Plugins::FindElsewherePlugin::
1 | 1 | 1 | 11µs | 44µs | BEGIN@25 | Foswiki::Plugins::FindElsewherePlugin::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # Copyright (C) 2002 Mike Barton, Marco Carnut, Peter Hernst | ||||
2 | # (C) 2003 Martin Cleaver, (C) 2004 Matt Wilkie (C) 2007 Crawford Currie | ||||
3 | # (C) 2008 Foswiki Contributors | ||||
4 | # | ||||
5 | # This program is free software; you can redistribute it and/or | ||||
6 | # modify it under the terms of the GNU General Public License | ||||
7 | # as published by the Free Software Foundation; either version 2 | ||||
8 | # of the License, or (at your option) any later version. | ||||
9 | # | ||||
10 | # This program is distributed in the hope that it will be useful, | ||||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
13 | # GNU General Public License for more details, published at | ||||
14 | # http://www.gnu.org/copyleft/gpl.html | ||||
15 | # | ||||
16 | # ========================= | ||||
17 | # | ||||
18 | # This is the FindElsewhere Foswiki plugin, | ||||
19 | # see http://foswiki.org/Extensions/FindElsewherePlugin for details. | ||||
20 | |||||
21 | package Foswiki::Plugins::FindElsewherePlugin; | ||||
22 | |||||
23 | 2 | 36µs | 2 | 40µs | # spent 27µs (14+13) within Foswiki::Plugins::FindElsewherePlugin::BEGIN@23 which was called:
# once (14µs+13µs) by Foswiki::Plugin::BEGIN@2.15 at line 23 # spent 27µs making 1 call to Foswiki::Plugins::FindElsewherePlugin::BEGIN@23
# spent 13µs making 1 call to strict::import |
24 | |||||
25 | 1 | 5µs | 1 | 33µs | # spent 44µs (11+33) within Foswiki::Plugins::FindElsewherePlugin::BEGIN@25 which was called:
# once (11µs+33µs) by Foswiki::Plugin::BEGIN@2.15 at line 27 # spent 33µs making 1 call to vars::import |
26 | $VERSION $RELEASE $NO_PREFS_IN_TOPIC $disabled | ||||
27 | 1 | 136µs | 1 | 44µs | ); # spent 44µs making 1 call to Foswiki::Plugins::FindElsewherePlugin::BEGIN@25 |
28 | |||||
29 | 1 | 300ns | $NO_PREFS_IN_TOPIC = 1; | ||
30 | |||||
31 | 1 | 300ns | $VERSION = '$Rev: 3273 (2009-03-25) $'; | ||
32 | 1 | 200ns | $RELEASE = '2.0.1 (25 Mar 2009)'; | ||
33 | |||||
34 | # spent 72µs (21+51) within Foswiki::Plugins::FindElsewherePlugin::initPlugin which was called:
# once (21µs+51µs) by Foswiki::Plugin::__ANON__[/var/www/foswiki11/lib/Foswiki/Plugin.pm:241] at line 234 of /var/www/foswiki11/lib/Foswiki/Plugin.pm | ||||
35 | #my( $topic, $web, $user, $installWeb ) = @_; | ||||
36 | |||||
37 | # check for Plugins.pm versions | ||||
38 | 1 | 14µs | 1 | 7µs | if( $Foswiki::Plugins::VERSION < 1 ) { # spent 7µs making 1 call to version::vxs::VCMP |
39 | Foswiki::Func::writeWarning( "Version mismatch between FindElsewherePlugin and Plugins.pm" ); | ||||
40 | return 0; | ||||
41 | } | ||||
42 | |||||
43 | 1 | 3µs | 1 | 44µs | $disabled = Foswiki::Func::getPreferencesFlag( "DISABLELOOKELSEWHERE" ); # spent 44µs making 1 call to Foswiki::Func::getPreferencesFlag |
44 | 1 | 1µs | unless( defined( $disabled )) { | ||
45 | # Compatibility, deprecated | ||||
46 | $disabled = Foswiki::Func::getPluginPreferencesFlag( "DISABLELOOKELSEWHERE" ); | ||||
47 | } | ||||
48 | |||||
49 | 1 | 6µs | return 1; | ||
50 | } | ||||
51 | |||||
52 | # spent 9.63ms (1.84+7.79) within Foswiki::Plugins::FindElsewherePlugin::startRenderingHandler which was called 5 times, avg 1.93ms/call:
# 5 times (1.84ms+7.79ms) by Foswiki::Plugin::invoke at line 294 of /var/www/foswiki11/lib/Foswiki/Plugin.pm, avg 1.93ms/call | ||||
53 | # This handler is called by getRenderedVersion just before the line loop | ||||
54 | ### my ( $text, $web ) = @_; | ||||
55 | 5 | 2µs | return if $disabled; | ||
56 | |||||
57 | 5 | 110µs | require Foswiki::Plugins::FindElsewherePlugin::Core; | ||
58 | |||||
59 | 5 | 31µs | 5 | 7.63ms | return Foswiki::Plugins::FindElsewherePlugin::Core::handle(@_); # spent 7.63ms making 5 calls to Foswiki::Plugins::FindElsewherePlugin::Core::handle, avg 1.53ms/call |
60 | } | ||||
61 | |||||
62 | 1 | 3µs | 1; |