Filename | /var/www/foswiki11/lib/Foswiki/Macros/VAR.pm |
Statements | Executed 341 statements in 992µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
42 | 1 | 1 | 890µs | 5.24ms | VAR | Foswiki::
1 | 1 | 1 | 37µs | 75µs | BEGIN@4.64 | Foswiki::
1 | 1 | 1 | 33µs | 55µs | BEGIN@5.65 | 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 | 74µs | 2 | 114µs | # spent 75µs (37+38) within Foswiki::BEGIN@4.64 which was called:
# once (37µs+38µs) by Foswiki::_expandMacroOnTopicRendering at line 4 # spent 75µs making 1 call to Foswiki::BEGIN@4.64
# spent 38µs making 1 call to strict::import |
5 | 2 | 221µs | 2 | 77µs | # spent 55µs (33+22) within Foswiki::BEGIN@5.65 which was called:
# once (33µs+22µs) by Foswiki::_expandMacroOnTopicRendering at line 5 # spent 55µs making 1 call to Foswiki::BEGIN@5.65
# spent 22µs making 1 call to warnings::import |
6 | |||||
7 | # spent 5.24ms (890µs+4.35) within Foswiki::VAR which was called 42 times, avg 125µs/call:
# 42 times (890µs+4.35ms) by Foswiki::_expandMacroOnTopicRendering at line 3160 of /var/www/foswiki11/lib/Foswiki.pm, avg 125µs/call | ||||
8 | 42 | 35µs | my ( $this, $params, $topicObject ) = @_; | ||
9 | 42 | 27µs | my $key = $params->{_DEFAULT}; | ||
10 | 42 | 8µs | return '' unless $key; | ||
11 | 42 | 20µs | my $web = $params->{web} || $topicObject->web; | ||
12 | 42 | 71µs | 42 | 105µs | my $topic = $topicObject->topic; # spent 105µs making 42 calls to Foswiki::Meta::topic, avg 2µs/call |
13 | |||||
14 | # handle %USERSWEB%-type cases | ||||
15 | 42 | 142µs | 42 | 497µs | ( $web, $topic ) = $this->normalizeWebTopicName( $web, $topic ); # spent 497µs making 42 calls to Foswiki::normalizeWebTopicName, avg 12µs/call |
16 | |||||
17 | 42 | 147µs | 42 | 946µs | my $webObject = Foswiki::Meta->new( $this, $web ); # spent 946µs making 42 calls to Foswiki::Meta::new, avg 23µs/call |
18 | |||||
19 | # always return a value, even when the key isn't defined | ||||
20 | 42 | 244µs | 42 | 2.81ms | return $webObject->getPreference($key) || ''; # spent 2.81ms making 42 calls to Foswiki::Meta::getPreference, avg 67µs/call |
21 | } | ||||
22 | |||||
23 | 1 | 4µs | 1; | ||
24 | __END__ |