← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 19:05:14 2015
Reported on Fri Jul 31 19:08:09 2015

Filename/var/www/foswiki11/lib/Foswiki/Prefs/HASH.pm
StatementsExecuted 261 statements in 898µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111387µs451µsFoswiki::Prefs::HASH::::BEGIN@20Foswiki::Prefs::HASH::BEGIN@20
4811354µs538µsFoswiki::Prefs::HASH::::insertFoswiki::Prefs::HASH::insert
711151µs188µsFoswiki::Prefs::HASH::::newFoswiki::Prefs::HASH::new
92232µs32µsFoswiki::Prefs::HASH::::getFoswiki::Prefs::HASH::get
71118µs18µsFoswiki::Prefs::HASH::::prefsFoswiki::Prefs::HASH::prefs
11113µs29µsFoswiki::Prefs::HASH::::BEGIN@17Foswiki::Prefs::HASH::BEGIN@17
1119µs14µsFoswiki::Prefs::HASH::::BEGIN@18Foswiki::Prefs::HASH::BEGIN@18
1112µs2µ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
17227µs245µs
# spent 29µs (13+16) within Foswiki::Prefs::HASH::BEGIN@17 which was called: # once (13µs+16µs) by Foswiki::Prefs::BEGIN@69 at line 17
use strict;
# spent 29µs making 1 call to Foswiki::Prefs::HASH::BEGIN@17 # spent 16µs making 1 call to strict::import
18223µs220µs
# spent 14µs (9+5) within Foswiki::Prefs::HASH::BEGIN@18 which was called: # once (9µs+5µs) by Foswiki::Prefs::BEGIN@69 at line 18
use warnings;
# spent 14µs making 1 call to Foswiki::Prefs::HASH::BEGIN@18 # spent 5µs making 1 call to warnings::import
19
202282µs1451µs
# spent 451µs (387+63) within Foswiki::Prefs::HASH::BEGIN@20 which was called: # once (387µs+63µs) by Foswiki::Prefs::BEGIN@69 at line 20
use Foswiki::Prefs::BaseBackend ();
# spent 451µs making 1 call to Foswiki::Prefs::HASH::BEGIN@20
2118µsour @ISA = qw(Foswiki::Prefs::BaseBackend);
22
23
# spent 188µs (151+37) within Foswiki::Prefs::HASH::new which was called 7 times, avg 27µs/call: # 7 times (151µs+37µs) by Foswiki::Prefs::pushTopicContext at line 283 of /var/www/foswiki11/lib/Foswiki/Prefs.pm, avg 27µs/call
sub new {
24710µs my ( $proto, $values ) = @_;
25
26790µs737µs my $this = $proto->SUPER::new();
# spent 37µs making 7 calls to Foswiki::Prefs::BaseBackend::new, avg 5µs/call
27716µs while ( my ( $key, $value ) = each %$values ) {
28 $this->insert( 'Set', $key, $value );
29 }
30
31731µs return $this;
32}
33
3416µs
# spent 2µs within Foswiki::Prefs::HASH::finish which was called: # once (2µs+0s) by Foswiki::Prefs::Stack::finish at line 65 of /var/www/foswiki11/lib/Foswiki/Prefs/Stack.pm
sub finish { }
35
36
# spent 18µs within Foswiki::Prefs::HASH::prefs which was called 7 times, avg 3µs/call: # 7 times (18µs+0s) by Foswiki::Prefs::Stack::newLevel at line 192 of /var/www/foswiki11/lib/Foswiki/Prefs/Stack.pm, avg 3µs/call
sub prefs {
3773µs my $this = shift;
38727µs return keys %$this;
39}
40
41sub localPrefs {
42 return ();
43}
44
45
# spent 32µs within Foswiki::Prefs::HASH::get which was called 9 times, avg 4µs/call: # 7 times (24µs+0s) by Foswiki::Prefs::Stack::newLevel at line 198 of /var/www/foswiki11/lib/Foswiki/Prefs/Stack.pm, avg 3µs/call # 2 times (8µs+0s) by Foswiki::Prefs::getPreference at line 450 of /var/www/foswiki11/lib/Foswiki/Prefs.pm, avg 4µs/call
sub get {
4699µs my ( $this, $key ) = @_;
47931µs return $this->{$key};
48}
49
50sub getLocal {
51 return;
52}
53
54
# spent 538µs (354+184) within Foswiki::Prefs::HASH::insert which was called 48 times, avg 11µs/call: # 48 times (354µs+184µs) by Foswiki::Prefs::Stack::insert at line 164 of /var/www/foswiki11/lib/Foswiki/Prefs/Stack.pm, avg 11µs/call
sub insert {
554853µs my ( $this, $type, $key, $value ) = @_;
56
574885µs48184µs $this->cleanupInsertValue( \$value );
# spent 184µs making 48 calls to Foswiki::Prefs::BaseBackend::cleanupInsertValue, avg 4µs/call
584855µs $this->{$key} = $value;
5948139µs return 1;
60}
61
6213µs1;
63__END__