← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 19:05:14 2015
Reported on Fri Jul 31 19:08:10 2015

Filename/var/www/foswiki11/lib/Foswiki/Macros/REVINFO.pm
StatementsExecuted 50 statements in 369µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
311172µs4.47msFoswiki::::REVINFOFoswiki::REVINFO
11118µs35µsFoswiki::::BEGIN@4.49Foswiki::BEGIN@4.49
11116µs23µsFoswiki::::BEGIN@5.50Foswiki::BEGIN@5.50
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
4233µs252µs
# spent 35µs (18+17) within Foswiki::BEGIN@4.49 which was called: # once (18µs+17µs) by Foswiki::_expandMacroOnTopicRendering at line 4
use strict;
# spent 35µs making 1 call to Foswiki::BEGIN@4.49 # spent 17µs making 1 call to strict::import
52215µs230µs
# spent 23µs (16+7) within Foswiki::BEGIN@5.50 which was called: # once (16µs+7µs) by Foswiki::_expandMacroOnTopicRendering at line 5
use warnings;
# spent 23µs making 1 call to Foswiki::BEGIN@5.50 # spent 7µs making 1 call to warnings::import
6
7#| $web | web and |
8#| $topic | topic to display the name for |
9#| $formatString | format string (like in search) |
10
# spent 4.47ms (172µs+4.29) within Foswiki::REVINFO which was called 3 times, avg 1.49ms/call: # 3 times (172µs+4.29ms) by Foswiki::_expandMacroOnTopicRendering at line 3160 of /var/www/foswiki11/lib/Foswiki.pm, avg 1.49ms/call
sub REVINFO {
1132µs my ( $this, $params, $topicObject ) = @_;
1235µs my $format = $params->{_DEFAULT} || $params->{format};
1336µs36µs my $web = $params->{web} || $topicObject->web;
# spent 6µs making 3 calls to Foswiki::Meta::web, avg 2µs/call
1437µs36µs my $topic = $params->{topic} || $topicObject->topic;
# spent 6µs making 3 calls to Foswiki::Meta::topic, avg 2µs/call
1532µs my $cgiQuery = $this->{request};
1631µs my $cgiRev = '';
1737µs359µs $cgiRev = $cgiQuery->param('rev') if ($cgiQuery);
# spent 59µs making 3 calls to Foswiki::Request::param, avg 20µs/call
18313µs315µs my $rev = Foswiki::Store::cleanUpRevID( $params->{rev} || $cgiRev || '' );
# spent 15µs making 3 calls to Foswiki::Store::cleanUpRevID, avg 5µs/call
19
2039µs330µs ( $web, $topic ) = $this->normalizeWebTopicName( $web, $topic );
# spent 30µs making 3 calls to Foswiki::normalizeWebTopicName, avg 10µs/call
2135µs314µs my $loadedRev = $topicObject->getLoadedRev();
# spent 14µs making 3 calls to Foswiki::Meta::getLoadedRev, avg 5µs/call
22312µs610µs if ( $web ne $topicObject->web
# spent 5µs making 3 calls to Foswiki::Meta::web, avg 2µs/call # spent 5µs making 3 calls to Foswiki::Meta::topic, avg 2µs/call
23 || $topic ne $topicObject->topic
24 || !defined($loadedRev)
25 || $loadedRev ne $rev )
26 {
27315µs380µs $topicObject = Foswiki::Meta->new( $this, $web, $topic );
# spent 80µs making 3 calls to Foswiki::Meta::new, avg 27µs/call
28
29 # haveAccess will try to load the object on the fly, so make sure
30 # it is loaded if rev is defined
313700ns $topicObject->load($rev) if ($rev);
32312µs33.19ms unless ( $topicObject->haveAccess('VIEW') ) {
# spent 3.19ms making 3 calls to Foswiki::Meta::haveAccess, avg 1.06ms/call
33 return $this->inlineAlert( 'alerts', 'access_denied', $web,
34 $topic );
35 }
36 }
37
38320µs6884µs return $this->renderer->renderRevisionInfo( $topicObject, $rev, $format );
# spent 878µs making 3 calls to Foswiki::Render::renderRevisionInfo, avg 293µs/call # spent 6µs making 3 calls to Foswiki::renderer, avg 2µs/call
39}
40
4113µs1;
42__END__