← 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/REVINFO.pm
StatementsExecuted 51 statements in 376µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
311154µs48.4msFoswiki::::REVINFOFoswiki::REVINFO
11113µs26µsFoswiki::::BEGIN@4.80Foswiki::BEGIN@4.80
1119µs14µsFoswiki::::BEGIN@5.81Foswiki::BEGIN@5.81
1114µs4µsFoswiki::::BEGIN@7.82Foswiki::BEGIN@7.82
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
4231µs238µs
# spent 26µs (13+12) within Foswiki::BEGIN@4.80 which was called: # once (13µs+12µs) by Foswiki::_expandMacroOnTopicRendering at line 4
use strict;
# spent 26µs making 1 call to Foswiki::BEGIN@4.80 # spent 12µs making 1 call to strict::import
5247µs218µs
# spent 14µs (9+4) within Foswiki::BEGIN@5.81 which was called: # once (9µs+4µs) by Foswiki::_expandMacroOnTopicRendering at line 5
use warnings;
# spent 14µs making 1 call to Foswiki::BEGIN@5.81 # spent 4µs making 1 call to warnings::import
6
7
# spent 4µs within Foswiki::BEGIN@7.82 which was called: # once (4µs+0s) by Foswiki::_expandMacroOnTopicRendering at line 12
BEGIN {
814µs if ( $Foswiki::cfg{UseLocale} ) {
9 require locale;
10 import locale();
11 }
121186µs14µs}
# spent 4µs making 1 call to Foswiki::BEGIN@7.82
13
14#| $web | web and |
15#| $topic | topic to display the name for |
16#| $formatString | format string (like in search) |
17
# spent 48.4ms (154µs+48.2) within Foswiki::REVINFO which was called 3 times, avg 16.1ms/call: # 3 times (154µs+48.2ms) by Foswiki::_expandMacroOnTopicRendering at line 3435 of /var/www/foswikidev/core/lib/Foswiki.pm, avg 16.1ms/call
sub REVINFO {
1833µs my ( $this, $params, $topicObject ) = @_;
1934µs my $format = $params->{_DEFAULT} || $params->{format};
2036µs35µs my $web = $params->{web} || $topicObject->web;
# spent 5µs making 3 calls to Foswiki::Meta::web, avg 2µs/call
2135µs35µs my $topic = $params->{topic} || $topicObject->topic;
# spent 5µs making 3 calls to Foswiki::Meta::topic, avg 2µs/call
2231µs my $cgiQuery = $this->{request};
2331µs my $cgiRev = '';
2435µs350µs $cgiRev = $cgiQuery->param('rev') if ($cgiQuery);
# spent 50µs making 3 calls to Foswiki::Request::param, avg 16µs/call
2536µs37µs my $rev = Foswiki::Store::cleanUpRevID( $params->{rev} || $cgiRev || '' );
# spent 7µs making 3 calls to Foswiki::Store::cleanUpRevID, avg 2µs/call
26
2738µs318µs ( $web, $topic ) = $this->normalizeWebTopicName( $web, $topic );
# spent 18µs making 3 calls to Foswiki::normalizeWebTopicName, avg 6µs/call
2836µs35µs my $loadedRev = $topicObject->getLoadedRev();
# spent 5µs making 3 calls to Foswiki::Meta::getLoadedRev, avg 2µs/call
29312µs69µs if ( $web ne $topicObject->web
# spent 5µs making 3 calls to Foswiki::Meta::web, avg 2µs/call # spent 4µs making 3 calls to Foswiki::Meta::topic, avg 1µs/call
30 || $topic ne $topicObject->topic
31 || !defined($loadedRev)
32 || $loadedRev ne $rev )
33 {
3439µs333µs $topicObject = Foswiki::Meta->new( $this, $web, $topic );
# spent 33µs making 3 calls to Foswiki::Meta::new, avg 11µs/call
35
36 # haveAccess will try to load the object on the fly, so make sure
37 # it is loaded if rev is defined
383700ns $topicObject = $topicObject->load($rev) if ($rev);
3938µs3117µs unless ( $topicObject->haveAccess('VIEW') ) {
# spent 117µs making 3 calls to Foswiki::Meta::haveAccess, avg 39µs/call
40 return $this->inlineAlert( 'alerts', 'access_denied', $web,
41 $topic );
42 }
43 }
44
45330µs648.0ms return $this->renderer->renderRevisionInfo( $topicObject, $rev, $format );
# spent 48.0ms making 3 calls to Foswiki::Render::renderRevisionInfo, avg 16.0ms/call # spent 6µs making 3 calls to Foswiki::renderer, avg 2µs/call
46}
47
4812µs1;
49__END__