← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/local/src/github.com/foswiki/core/bin/view
  Run on Sun Dec 4 17:17:59 2011
Reported on Sun Dec 4 17:27:06 2011

Filename/usr/local/src/github.com/foswiki/core/lib/Foswiki/Prefs/HASH.pm
StatementsExecuted 1577 statements in 6.95ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
325114.83ms11.9msFoswiki::Prefs::HASH::::insertFoswiki::Prefs::HASH::insert
111752µs903µsFoswiki::Prefs::HASH::::BEGIN@20Foswiki::Prefs::HASH::BEGIN@20
2111576µs801µsFoswiki::Prefs::HASH::::newFoswiki::Prefs::HASH::new
7122532µs532µsFoswiki::Prefs::HASH::::getFoswiki::Prefs::HASH::get
2111131µs131µsFoswiki::Prefs::HASH::::prefsFoswiki::Prefs::HASH::prefs
11126µs34µsFoswiki::Prefs::HASH::::BEGIN@17Foswiki::Prefs::HASH::BEGIN@17
11117µs37µsFoswiki::Prefs::HASH::::BEGIN@18Foswiki::Prefs::HASH::BEGIN@18
1114µs4µsFoswiki::Prefs::HASH::::finishFoswiki::Prefs::HASH::finish
0000s0sFoswiki::Prefs::HASH::::getLocalFoswiki::Prefs::HASH::getLocal
0000s0sFoswiki::Prefs::HASH::::localPrefsFoswiki::Prefs::HASH::localPrefs
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
2
3=begin TML
4
5---+ package Foswiki::Prefs::HASH
6
7This is a simple preferences backend that keeps keys and values as an in-memory
8hash.
9
10=cut
11
12# See documentation on Foswiki::Prefs::BaseBackend to get details about the
13# methods.
14
15package Foswiki::Prefs::HASH;
16
17249µs242µ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
use strict;
# spent 34µs making 1 call to Foswiki::Prefs::HASH::BEGIN@17 # spent 8µs making 1 call to strict::import
18248µs256µ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
use warnings;
# spent 37µs making 1 call to Foswiki::Prefs::HASH::BEGIN@18 # spent 20µs making 1 call to warnings::import
19
202498µs1903µ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
use Foswiki::Prefs::BaseBackend ();
# spent 903µs making 1 call to Foswiki::Prefs::HASH::BEGIN@20
21114µsour @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
sub new {
242154µs my ( $proto, $values ) = @_;
25
2621266µs21225µs my $this = $proto->SUPER::new();
# spent 225µs making 21 calls to Foswiki::Prefs::BaseBackend::new, avg 11µs/call
272195µs while ( my ( $key, $value ) = each %$values ) {
28 $this->insert( 'Set', $key, $value );
29 }
30
3121138µs return $this;
32}
33
3419µ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
sub finish { }
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
sub prefs {
372132µs my $this = shift;
3821141µs return keys %$this;
39}
40
41sub 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
sub get {
4671152µs my ( $this, $key ) = @_;
4771471µs return $this->{$key};
48}
49
50sub 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
sub insert {
55325696µs my ( $this, $type, $key, $value ) = @_;
56
573251.73ms3257.03ms $this->cleanupInsertValue( \$value );
# spent 7.03ms making 325 calls to Foswiki::Prefs::BaseBackend::cleanupInsertValue, avg 22µs/call
58325810µs $this->{$key} = $value;
593251.74ms return 1;
60}
61
6216µs1;
63__END__