← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 18:42:36 2015
Reported on Fri Jul 31 18:48:15 2015

Filename/var/www/foswikidev/core/lib/Foswiki/Macros/SCRIPTURL.pm
StatementsExecuted 276 statements in 632µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
3022318µs793µsFoswiki::::SCRIPTURLFoswiki::SCRIPTURL
111153µs203µsFoswiki::::BEGIN@7.54Foswiki::BEGIN@7.54
11114µs27µsFoswiki::::BEGIN@4.52Foswiki::BEGIN@4.52
1119µs13µsFoswiki::::BEGIN@5.53Foswiki::BEGIN@5.53
1114µs4µsFoswiki::::BEGIN@9Foswiki::BEGIN@9
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# See bottom of file for license and copyright information
2package Foswiki;
3
4226µs240µs
# spent 27µs (14+13) within Foswiki::BEGIN@4.52 which was called: # once (14µs+13µs) by Foswiki::_expandMacroOnTopicRendering at line 4
use strict;
# spent 27µs making 1 call to Foswiki::BEGIN@4.52 # spent 13µs making 1 call to strict::import
5222µs217µs
# spent 13µs (9+4) within Foswiki::BEGIN@5.53 which was called: # once (9µs+4µs) by Foswiki::_expandMacroOnTopicRendering at line 5
use warnings;
# spent 13µs making 1 call to Foswiki::BEGIN@5.53 # spent 4µs making 1 call to warnings::import
6
72108µs1203µs
# spent 203µs (153+50) within Foswiki::BEGIN@7.54 which was called: # once (153µs+50µs) by Foswiki::_expandMacroOnTopicRendering at line 7
use Foswiki::Macros::SCRIPTURLPATH;
# spent 203µs making 1 call to Foswiki::BEGIN@7.54
8
9
# spent 4µs within Foswiki::BEGIN@9 which was called: # once (4µs+0s) by Foswiki::_expandMacroOnTopicRendering at line 14
BEGIN {
1015µs if ( $Foswiki::cfg{UseLocale} ) {
11 require locale;
12 import locale();
13 }
141150µs14µs}
# spent 4µs making 1 call to Foswiki::BEGIN@9
15
16
# spent 793µs (318+475) within Foswiki::SCRIPTURL which was called 30 times, avg 26µs/call: # 17 times (161µs+277µs) by Foswiki::SCRIPTURLPATH at line 11 of /var/www/foswikidev/core/lib/Foswiki/Macros/SCRIPTURLPATH.pm, avg 26µs/call # 13 times (156µs+198µs) by Foswiki::_expandMacroOnTopicRendering at line 3435 of /var/www/foswikidev/core/lib/Foswiki.pm, avg 27µs/call
sub SCRIPTURL {
173018µs my ( $this, $params, $topicObject, $relative ) = @_;
18 my @p =
195883µs map { $_ => $params->{$_} }
203073µs grep { !/^(_.*|path)$/ }
21 keys %$params;
22308µs my ( $web, $topic, $script );
233014µs $script = $params->{_DEFAULT};
24308µs $web = $params->{web};
25307µs if ( defined $params->{topic} ) {
26 my @path = split( /[\/.]+/, $params->{topic} );
27 $topic = pop(@path) if scalar(@path);
28 $web = join( '/', @path ) if scalar(@path); # web= is ignored
29 }
3030107µs30475µs return $this->getScriptUrl( !$relative, $script, $web, $topic, @p );
# spent 475µs making 30 calls to Foswiki::getScriptUrl, avg 16µs/call
31}
32
3312µs1;
34__END__