← 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/PUBURL.pm
StatementsExecuted 335 statements in 423µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
4722228µs896µsFoswiki::::PUBURLFoswiki::PUBURL
11113µs24µsFoswiki::::BEGIN@4.50Foswiki::BEGIN@4.50
1118µs12µsFoswiki::::BEGIN@5.51Foswiki::BEGIN@5.51
1114µs4µsFoswiki::::BEGIN@7Foswiki::BEGIN@7
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
4225µs236µs
# spent 24µs (13+11) within Foswiki::BEGIN@4.50 which was called: # once (13µs+11µs) by Foswiki::BEGIN@6 at line 4
use strict;
# spent 24µs making 1 call to Foswiki::BEGIN@4.50 # spent 11µs making 1 call to strict::import
5246µs215µs
# spent 12µs (8+4) within Foswiki::BEGIN@5.51 which was called: # once (8µs+4µs) by Foswiki::BEGIN@6 at line 5
use warnings;
# spent 12µs making 1 call to Foswiki::BEGIN@5.51 # spent 4µs making 1 call to warnings::import
6
7
# spent 4µs within Foswiki::BEGIN@7 which was called: # once (4µs+0s) by Foswiki::BEGIN@6 at line 12
BEGIN {
814µs if ( $Foswiki::cfg{UseLocale} ) {
9 require locale;
10 import locale();
11 }
121125µs14µs}
# spent 4µs making 1 call to Foswiki::BEGIN@7
13
14
# spent 896µs (228+668) within Foswiki::PUBURL which was called 47 times, avg 19µs/call: # 45 times (217µs+646µs) by Foswiki::PUBURLPATH at line 10 of /var/www/foswikidev/core/lib/Foswiki/Macros/PUBURLPATH.pm, avg 19µs/call # 2 times (11µs+22µs) by Foswiki::_expandMacroOnTopicRendering at line 3435 of /var/www/foswikidev/core/lib/Foswiki.pm, avg 16µs/call
sub PUBURL {
154720µs my ( $this, $params, $topicObject, $relative ) = @_;
164710µs my ( $web, $topic, $attachment );
174715µs $web = $params->{web};
18479µs if ( defined $params->{topic} ) {
19 my @path = split( /[\/.]+/, $params->{topic} );
20 $topic = pop(@path) if scalar(@path);
21 $web = join( '/', @path ) if scalar(@path); # web= is ignored
22 }
23477µs $attachment = $params->{_DEFAULT};
24476µs $params->{absolute} = 1 unless $relative;
2547153µs47668µs return $this->getPubURL( $web, $topic, $attachment, %{$params} );
# spent 668µs making 47 calls to Foswiki::getPubURL, avg 14µs/call
26}
27
2812µs1;
29__END__