Filename | /var/www/foswikidev/core/lib/Foswiki/Macros/SCRIPTURL.pm |
Statements | Executed 276 statements in 632µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
30 | 2 | 2 | 318µs | 793µs | SCRIPTURL | Foswiki::
1 | 1 | 1 | 153µs | 203µs | BEGIN@7.54 | Foswiki::
1 | 1 | 1 | 14µs | 27µs | BEGIN@4.52 | Foswiki::
1 | 1 | 1 | 9µs | 13µs | BEGIN@5.53 | Foswiki::
1 | 1 | 1 | 4µs | 4µs | BEGIN@9 | Foswiki::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # See bottom of file for license and copyright information | ||||
2 | package Foswiki; | ||||
3 | |||||
4 | 2 | 26µs | 2 | 40µ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 # spent 27µs making 1 call to Foswiki::BEGIN@4.52
# spent 13µs making 1 call to strict::import |
5 | 2 | 22µs | 2 | 17µ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 # spent 13µs making 1 call to Foswiki::BEGIN@5.53
# spent 4µs making 1 call to warnings::import |
6 | |||||
7 | 2 | 108µs | 1 | 203µ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 # 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 | ||||
10 | 1 | 5µs | if ( $Foswiki::cfg{UseLocale} ) { | ||
11 | require locale; | ||||
12 | import locale(); | ||||
13 | } | ||||
14 | 1 | 150µs | 1 | 4µ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 | ||||
17 | 30 | 18µs | my ( $this, $params, $topicObject, $relative ) = @_; | ||
18 | my @p = | ||||
19 | 58 | 83µs | map { $_ => $params->{$_} } | ||
20 | 30 | 73µs | grep { !/^(_.*|path)$/ } | ||
21 | keys %$params; | ||||
22 | 30 | 8µs | my ( $web, $topic, $script ); | ||
23 | 30 | 14µs | $script = $params->{_DEFAULT}; | ||
24 | 30 | 8µs | $web = $params->{web}; | ||
25 | 30 | 7µ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 | } | ||||
30 | 30 | 107µs | 30 | 475µs | return $this->getScriptUrl( !$relative, $script, $web, $topic, @p ); # spent 475µs making 30 calls to Foswiki::getScriptUrl, avg 16µs/call |
31 | } | ||||
32 | |||||
33 | 1 | 2µs | 1; | ||
34 | __END__ |