Filename | /var/www/foswiki11/lib/Foswiki/Macros/REVINFO.pm |
Statements | Executed 50 statements in 369µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
3 | 1 | 1 | 172µs | 4.47ms | REVINFO | Foswiki::
1 | 1 | 1 | 18µs | 35µs | BEGIN@4.49 | Foswiki::
1 | 1 | 1 | 16µs | 23µs | BEGIN@5.50 | 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 | 33µs | 2 | 52µ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 # spent 35µs making 1 call to Foswiki::BEGIN@4.49
# spent 17µs making 1 call to strict::import |
5 | 2 | 215µs | 2 | 30µ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 # 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 | ||||
11 | 3 | 2µs | my ( $this, $params, $topicObject ) = @_; | ||
12 | 3 | 5µs | my $format = $params->{_DEFAULT} || $params->{format}; | ||
13 | 3 | 6µs | 3 | 6µs | my $web = $params->{web} || $topicObject->web; # spent 6µs making 3 calls to Foswiki::Meta::web, avg 2µs/call |
14 | 3 | 7µs | 3 | 6µs | my $topic = $params->{topic} || $topicObject->topic; # spent 6µs making 3 calls to Foswiki::Meta::topic, avg 2µs/call |
15 | 3 | 2µs | my $cgiQuery = $this->{request}; | ||
16 | 3 | 1µs | my $cgiRev = ''; | ||
17 | 3 | 7µs | 3 | 59µs | $cgiRev = $cgiQuery->param('rev') if ($cgiQuery); # spent 59µs making 3 calls to Foswiki::Request::param, avg 20µs/call |
18 | 3 | 13µs | 3 | 15µs | my $rev = Foswiki::Store::cleanUpRevID( $params->{rev} || $cgiRev || '' ); # spent 15µs making 3 calls to Foswiki::Store::cleanUpRevID, avg 5µs/call |
19 | |||||
20 | 3 | 9µs | 3 | 30µs | ( $web, $topic ) = $this->normalizeWebTopicName( $web, $topic ); # spent 30µs making 3 calls to Foswiki::normalizeWebTopicName, avg 10µs/call |
21 | 3 | 5µs | 3 | 14µs | my $loadedRev = $topicObject->getLoadedRev(); # spent 14µs making 3 calls to Foswiki::Meta::getLoadedRev, avg 5µs/call |
22 | 3 | 12µs | 6 | 10µ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 | { | ||||
27 | 3 | 15µs | 3 | 80µ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 | ||||
31 | 3 | 700ns | $topicObject->load($rev) if ($rev); | ||
32 | 3 | 12µs | 3 | 3.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 | |||||
38 | 3 | 20µs | 6 | 884µ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 | |||||
41 | 1 | 3µs | 1; | ||
42 | __END__ |