Filename | /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/TopicRAM.pm |
Statements | Executed 3359 statements in 14.3ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
225 | 3 | 1 | 3.96ms | 9.00ms | insert | Foswiki::Prefs::TopicRAM::
517 | 1 | 1 | 3.23ms | 3.23ms | getLocal | Foswiki::Prefs::TopicRAM::
42 | 2 | 1 | 2.19ms | 61.1s | new | Foswiki::Prefs::TopicRAM::
283 | 4 | 3 | 2.06ms | 2.06ms | get | Foswiki::Prefs::TopicRAM::
1 | 1 | 1 | 884µs | 1.02ms | BEGIN@22 | Foswiki::Prefs::TopicRAM::
48 | 1 | 1 | 577µs | 577µs | prefs | Foswiki::Prefs::TopicRAM::
40 | 1 | 1 | 244µs | 244µs | topicObject | Foswiki::Prefs::TopicRAM::
16 | 3 | 3 | 232µs | 232µs | finish | Foswiki::Prefs::TopicRAM::
1 | 1 | 1 | 26µs | 38µs | BEGIN@16 | Foswiki::Prefs::TopicRAM::
1 | 1 | 1 | 19µs | 19µs | BEGIN@19 | Foswiki::Prefs::TopicRAM::
1 | 1 | 1 | 17µs | 37µs | BEGIN@17 | Foswiki::Prefs::TopicRAM::
0 | 0 | 0 | 0s | 0s | localPrefs | Foswiki::Prefs::TopicRAM::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # See bottom of file for license and copyright information | ||||
2 | |||||
3 | =begin TML | ||||
4 | |||||
5 | ---+ package Foswiki::Prefs::TopicRAM | ||||
6 | |||||
7 | This is a preference backend used to get preferences defined in a topic. | ||||
8 | |||||
9 | =cut | ||||
10 | |||||
11 | # See documentation on Foswiki::Prefs::BaseBackend to get details about the | ||||
12 | # methods. | ||||
13 | |||||
14 | package Foswiki::Prefs::TopicRAM; | ||||
15 | |||||
16 | 2 | 47µs | 2 | 50µs | # spent 38µs (26+12) within Foswiki::Prefs::TopicRAM::BEGIN@16 which was called:
# once (26µs+12µs) by Foswiki::Prefs::BEGIN@1 at line 16 # spent 38µs making 1 call to Foswiki::Prefs::TopicRAM::BEGIN@16
# spent 12µs making 1 call to strict::import |
17 | 2 | 54µs | 2 | 57µs | # spent 37µs (17+20) within Foswiki::Prefs::TopicRAM::BEGIN@17 which was called:
# once (17µs+20µs) by Foswiki::Prefs::BEGIN@1 at line 17 # spent 37µs making 1 call to Foswiki::Prefs::TopicRAM::BEGIN@17
# spent 20µs making 1 call to warnings::import |
18 | |||||
19 | 2 | 72µs | 1 | 19µs | # spent 19µs within Foswiki::Prefs::TopicRAM::BEGIN@19 which was called:
# once (19µs+0s) by Foswiki::Prefs::BEGIN@1 at line 19 # spent 19µs making 1 call to Foswiki::Prefs::TopicRAM::BEGIN@19 |
20 | 1 | 11µs | our @ISA = qw(Foswiki::Prefs::BaseBackend); | ||
21 | |||||
22 | 2 | 637µs | 1 | 1.02ms | # spent 1.02ms (884µs+135µs) within Foswiki::Prefs::TopicRAM::BEGIN@22 which was called:
# once (884µs+135µs) by Foswiki::Prefs::BEGIN@1 at line 22 # spent 1.02ms making 1 call to Foswiki::Prefs::TopicRAM::BEGIN@22 |
23 | |||||
24 | # spent 61.1s (2.19ms+61.1) within Foswiki::Prefs::TopicRAM::new which was called 42 times, avg 1.45s/call:
# 35 times (1.87ms+32.9ms) by Foswiki::Prefs::loadPreferences at line 231 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs.pm, avg 993µs/call
# 7 times (319µs+61.0s) by Foswiki::Prefs::_getBackend at line 142 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs.pm, avg 8.72s/call | ||||
25 | 42 | 120µs | my ( $proto, $topicObject ) = @_; | ||
26 | |||||
27 | 42 | 622µs | 42 | 574µs | my $this = $proto->SUPER::new(); # spent 574µs making 42 calls to Foswiki::Prefs::BaseBackend::new, avg 14µs/call |
28 | 42 | 161µs | $this->{values} = {}; | ||
29 | 42 | 94µs | $this->{local} = {}; | ||
30 | |||||
31 | 42 | 374µs | 42 | 6.96ms | if ( $topicObject->existsInStore() ) { # spent 6.96ms making 42 calls to Foswiki::Meta::existsInStore, avg 166µs/call |
32 | 42 | 285µs | 42 | 61.1s | Foswiki::Prefs::Parser::parse( $topicObject, $this ); # spent 61.1s making 42 calls to Foswiki::Prefs::Parser::parse, avg 1.45s/call |
33 | } | ||||
34 | 42 | 135µs | $this->{topicObject} = $topicObject; | ||
35 | |||||
36 | 42 | 270µs | return $this; | ||
37 | } | ||||
38 | |||||
39 | # spent 232µs within Foswiki::Prefs::TopicRAM::finish which was called 16 times, avg 15µs/call:
# 8 times (119µs+0s) by Foswiki::Prefs::Stack::finish at line 65 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Stack.pm, avg 15µs/call
# 7 times (102µs+0s) by Foswiki::Prefs::finish at line 122 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs.pm, avg 15µs/call
# once (11µs+0s) by Foswiki::Meta::unload at line 510 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm | ||||
40 | 16 | 49µs | my $this = shift; | ||
41 | 16 | 92µs | undef $this->{values}; | ||
42 | 16 | 26µs | undef $this->{local}; | ||
43 | 16 | 97µs | undef $this->{topicObject}; | ||
44 | } | ||||
45 | |||||
46 | =begin TML | ||||
47 | |||||
48 | ---++ ObjectMethod topicObject() -> $topicObject | ||||
49 | |||||
50 | Accessor to the topicObject used to create this object. | ||||
51 | |||||
52 | =cut | ||||
53 | |||||
54 | # spent 244µs within Foswiki::Prefs::TopicRAM::topicObject which was called 40 times, avg 6µs/call:
# 40 times (244µs+0s) by Foswiki::Prefs::popTopicContext at line 309 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs.pm, avg 6µs/call | ||||
55 | 40 | 65µs | my $this = shift; | ||
56 | 40 | 231µs | return $this->{topicObject}; | ||
57 | } | ||||
58 | |||||
59 | # spent 577µs within Foswiki::Prefs::TopicRAM::prefs which was called 48 times, avg 12µs/call:
# 48 times (577µs+0s) by Foswiki::Prefs::Stack::newLevel at line 192 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Stack.pm, avg 12µs/call | ||||
60 | 48 | 73µs | my $this = shift; | ||
61 | 96 | 609µs | return keys %{ $this->{values} }; | ||
62 | } | ||||
63 | |||||
64 | sub localPrefs { | ||||
65 | my $this = shift; | ||||
66 | return keys %{ $this->{local} }; | ||||
67 | } | ||||
68 | |||||
69 | # spent 2.06ms within Foswiki::Prefs::TopicRAM::get which was called 283 times, avg 7µs/call:
# 117 times (877µs+0s) by Foswiki::Prefs::getPreference at line 445 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs.pm, avg 7µs/call
# 78 times (558µs+0s) by Foswiki::Meta::getPreference at line 662 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Meta.pm, avg 7µs/call
# 48 times (338µs+0s) by Foswiki::Prefs::Stack::newLevel at line 198 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Stack.pm, avg 7µs/call
# 40 times (289µs+0s) by Foswiki::Prefs::Stack::getPreference at line 255 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Stack.pm, avg 7µs/call | ||||
70 | 283 | 585µs | my ( $this, $key ) = @_; | ||
71 | 283 | 1.86ms | return $this->{values}{$key}; | ||
72 | } | ||||
73 | |||||
74 | # spent 3.23ms within Foswiki::Prefs::TopicRAM::getLocal which was called 517 times, avg 6µs/call:
# 517 times (3.23ms+0s) by Foswiki::Prefs::getPreference at line 439 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs.pm, avg 6µs/call | ||||
75 | 517 | 924µs | my ( $this, $key ) = @_; | ||
76 | 517 | 2.94ms | return $this->{local}{$key}; | ||
77 | } | ||||
78 | |||||
79 | # spent 9.00ms (3.96+5.04) within Foswiki::Prefs::TopicRAM::insert which was called 225 times, avg 40µs/call:
# 124 times (2.20ms+2.77ms) by Foswiki::Prefs::Parser::parse at line 58 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Parser.pm, avg 40µs/call
# 84 times (1.46ms+1.84ms) by Foswiki::Prefs::Parser::parse at line 45 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Parser.pm, avg 39µs/call
# 17 times (303µs+434µs) by Foswiki::Prefs::Parser::parse at line 73 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Parser.pm, avg 43µs/call | ||||
80 | 225 | 511µs | my ( $this, $type, $key, $value ) = @_; | ||
81 | |||||
82 | 225 | 1.16ms | 225 | 5.04ms | $this->cleanupInsertValue( \$value ); # spent 5.04ms making 225 calls to Foswiki::Prefs::BaseBackend::cleanupInsertValue, avg 22µs/call |
83 | |||||
84 | 225 | 382µs | my $index = $type eq 'Set' ? 'values' : 'local'; | ||
85 | 225 | 732µs | $this->{$index}{$key} = $value; | ||
86 | 225 | 1.12ms | return 1; | ||
87 | } | ||||
88 | |||||
89 | 1 | 6µs | 1; | ||
90 | __END__ |