Filename | /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/HASH.pm |
Statements | Executed 1577 statements in 6.95ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
325 | 1 | 1 | 4.83ms | 11.9ms | insert | Foswiki::Prefs::HASH::
1 | 1 | 1 | 752µs | 903µs | BEGIN@20 | Foswiki::Prefs::HASH::
21 | 1 | 1 | 576µs | 801µs | new | Foswiki::Prefs::HASH::
71 | 2 | 2 | 532µs | 532µs | get | Foswiki::Prefs::HASH::
21 | 1 | 1 | 131µs | 131µs | prefs | Foswiki::Prefs::HASH::
1 | 1 | 1 | 26µs | 34µs | BEGIN@17 | Foswiki::Prefs::HASH::
1 | 1 | 1 | 17µs | 37µs | BEGIN@18 | Foswiki::Prefs::HASH::
1 | 1 | 1 | 4µs | 4µs | finish | Foswiki::Prefs::HASH::
0 | 0 | 0 | 0s | 0s | getLocal | Foswiki::Prefs::HASH::
0 | 0 | 0 | 0s | 0s | localPrefs | Foswiki::Prefs::HASH::
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::HASH | ||||
6 | |||||
7 | This is a simple preferences backend that keeps keys and values as an in-memory | ||||
8 | hash. | ||||
9 | |||||
10 | =cut | ||||
11 | |||||
12 | # See documentation on Foswiki::Prefs::BaseBackend to get details about the | ||||
13 | # methods. | ||||
14 | |||||
15 | package Foswiki::Prefs::HASH; | ||||
16 | |||||
17 | 2 | 49µs | 2 | 42µs | # spent 34µs (26+8) within Foswiki::Prefs::HASH::BEGIN@17 which was called:
# once (26µs+8µs) by Foswiki::Prefs::BEGIN@69 at line 17 # spent 34µs making 1 call to Foswiki::Prefs::HASH::BEGIN@17
# spent 8µs making 1 call to strict::import |
18 | 2 | 48µs | 2 | 56µs | # spent 37µs (17+20) within Foswiki::Prefs::HASH::BEGIN@18 which was called:
# once (17µs+20µs) by Foswiki::Prefs::BEGIN@69 at line 18 # spent 37µs making 1 call to Foswiki::Prefs::HASH::BEGIN@18
# spent 20µs making 1 call to warnings::import |
19 | |||||
20 | 2 | 498µs | 1 | 903µs | # spent 903µs (752+151) within Foswiki::Prefs::HASH::BEGIN@20 which was called:
# once (752µs+151µs) by Foswiki::Prefs::BEGIN@69 at line 20 # spent 903µs making 1 call to Foswiki::Prefs::HASH::BEGIN@20 |
21 | 1 | 14µs | our @ISA = qw(Foswiki::Prefs::BaseBackend); | ||
22 | |||||
23 | # spent 801µs (576+225) within Foswiki::Prefs::HASH::new which was called 21 times, avg 38µs/call:
# 21 times (576µs+225µs) by Foswiki::Prefs::pushTopicContext at line 281 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs.pm, avg 38µs/call | ||||
24 | 84 | 553µs | my ( $proto, $values ) = @_; | ||
25 | |||||
26 | 21 | 225µs | my $this = $proto->SUPER::new(); # spent 225µs making 21 calls to Foswiki::Prefs::BaseBackend::new, avg 11µs/call | ||
27 | while ( my ( $key, $value ) = each %$values ) { | ||||
28 | $this->insert( 'Set', $key, $value ); | ||||
29 | } | ||||
30 | |||||
31 | return $this; | ||||
32 | } | ||||
33 | |||||
34 | 1 | 9µs | # spent 4µs within Foswiki::Prefs::HASH::finish which was called:
# once (4µs+0s) by Foswiki::Prefs::Stack::finish at line 65 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Stack.pm | ||
35 | |||||
36 | # spent 131µs within Foswiki::Prefs::HASH::prefs which was called 21 times, avg 6µs/call:
# 21 times (131µs+0s) by Foswiki::Prefs::Stack::newLevel at line 192 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Stack.pm, avg 6µs/call | ||||
37 | 42 | 173µs | my $this = shift; | ||
38 | return keys %$this; | ||||
39 | } | ||||
40 | |||||
41 | sub localPrefs { | ||||
42 | return (); | ||||
43 | } | ||||
44 | |||||
45 | # spent 532µs within Foswiki::Prefs::HASH::get which was called 71 times, avg 7µs/call:
# 50 times (382µs+0s) by Foswiki::Prefs::getPreference at line 445 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs.pm, avg 8µs/call
# 21 times (150µ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 | ||||
46 | 142 | 624µs | my ( $this, $key ) = @_; | ||
47 | return $this->{$key}; | ||||
48 | } | ||||
49 | |||||
50 | sub getLocal { | ||||
51 | return; | ||||
52 | } | ||||
53 | |||||
54 | # spent 11.9ms (4.83+7.03) within Foswiki::Prefs::HASH::insert which was called 325 times, avg 37µs/call:
# 325 times (4.83ms+7.03ms) by Foswiki::Prefs::Stack::insert at line 164 of /usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/Stack.pm, avg 37µs/call | ||||
55 | 1300 | 4.97ms | my ( $this, $type, $key, $value ) = @_; | ||
56 | |||||
57 | 325 | 7.03ms | $this->cleanupInsertValue( \$value ); # spent 7.03ms making 325 calls to Foswiki::Prefs::BaseBackend::cleanupInsertValue, avg 22µs/call | ||
58 | $this->{$key} = $value; | ||||
59 | return 1; | ||||
60 | } | ||||
61 | |||||
62 | 1 | 6µs | 1; | ||
63 | __END__ |