← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 18:42:36 2015
Reported on Fri Jul 31 18:48:14 2015

Filename/var/www/foswikidev/core/lib/Foswiki/Prefs/HASH.pm
StatementsExecuted 334 statements in 826µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111417µs496µsFoswiki::Prefs::HASH::::BEGIN@20Foswiki::Prefs::HASH::BEGIN@20
6211278µs466µsFoswiki::Prefs::HASH::::insertFoswiki::Prefs::HASH::insert
911122µs154µsFoswiki::Prefs::HASH::::newFoswiki::Prefs::HASH::new
112224µs24µsFoswiki::Prefs::HASH::::getFoswiki::Prefs::HASH::get
91117µs17µsFoswiki::Prefs::HASH::::prefsFoswiki::Prefs::HASH::prefs
11113µs26µsFoswiki::Prefs::HASH::::BEGIN@17Foswiki::Prefs::HASH::BEGIN@17
1119µs13µsFoswiki::Prefs::HASH::::BEGIN@18Foswiki::Prefs::HASH::BEGIN@18
1114µs4µsFoswiki::Prefs::HASH::::BEGIN@23Foswiki::Prefs::HASH::BEGIN@23
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
17226µs238µs
# spent 26µs (13+13) within Foswiki::Prefs::HASH::BEGIN@17 which was called: # once (13µs+13µs) by Foswiki::Prefs::BEGIN@76 at line 17
use strict;
# spent 26µs making 1 call to Foswiki::Prefs::HASH::BEGIN@17 # spent 13µs making 1 call to strict::import
18222µs217µs
# spent 13µs (9+4) within Foswiki::Prefs::HASH::BEGIN@18 which was called: # once (9µs+4µs) by Foswiki::Prefs::BEGIN@76 at line 18
use warnings;
# spent 13µs making 1 call to Foswiki::Prefs::HASH::BEGIN@18 # spent 4µs making 1 call to warnings::import
19
202125µs1496µs
# spent 496µs (417+79) within Foswiki::Prefs::HASH::BEGIN@20 which was called: # once (417µs+79µs) by Foswiki::Prefs::BEGIN@76 at line 20
use Foswiki::Prefs::BaseBackend ();
# spent 496µs making 1 call to Foswiki::Prefs::HASH::BEGIN@20
2117µsour @ISA = qw(Foswiki::Prefs::BaseBackend);
22
23
# spent 4µs within Foswiki::Prefs::HASH::BEGIN@23 which was called: # once (4µs+0s) by Foswiki::Prefs::BEGIN@76 at line 28
BEGIN {
2415µs if ( $Foswiki::cfg{UseLocale} ) {
25 require locale;
26 import locale();
27 }
281176µs14µs}
# spent 4µs making 1 call to Foswiki::Prefs::HASH::BEGIN@23
29
30
# spent 154µs (122+32) within Foswiki::Prefs::HASH::new which was called 9 times, avg 17µs/call: # 9 times (122µs+32µs) by Foswiki::Prefs::pushTopicContext at line 288 of /var/www/foswikidev/core/lib/Foswiki/Prefs.pm, avg 17µs/call
sub new {
3198µs my ( $proto, $values ) = @_;
32
33969µs932µs my $this = $proto->SUPER::new();
# spent 32µs making 9 calls to Foswiki::Prefs::BaseBackend::new, avg 4µs/call
34916µs while ( my ( $key, $value ) = each %$values ) {
35 $this->insert( 'Set', $key, $value );
36 }
37
38924µs return $this;
39}
40
4114µs
# spent 2µs within Foswiki::Prefs::HASH::finish which was called: # once (2µs+0s) by Foswiki::Prefs::Stack::finish at line 72 of /var/www/foswikidev/core/lib/Foswiki/Prefs/Stack.pm
sub finish { }
42
43
# spent 17µs within Foswiki::Prefs::HASH::prefs which was called 9 times, avg 2µs/call: # 9 times (17µs+0s) by Foswiki::Prefs::Stack::newLevel at line 199 of /var/www/foswikidev/core/lib/Foswiki/Prefs/Stack.pm, avg 2µs/call
sub prefs {
4493µs my $this = shift;
45924µs return keys %$this;
46}
47
48sub localPrefs {
49 return ();
50}
51
52
# spent 24µs within Foswiki::Prefs::HASH::get which was called 11 times, avg 2µs/call: # 9 times (15µs+0s) by Foswiki::Prefs::Stack::newLevel at line 205 of /var/www/foswikidev/core/lib/Foswiki/Prefs/Stack.pm, avg 2µs/call # 2 times (8µs+0s) by Foswiki::Prefs::getPreference at line 455 of /var/www/foswikidev/core/lib/Foswiki/Prefs.pm, avg 4µs/call
sub get {
53117µs my ( $this, $key ) = @_;
541133µs return $this->{$key};
55}
56
57sub getLocal {
58 return;
59}
60
61
# spent 466µs (278+188) within Foswiki::Prefs::HASH::insert which was called 62 times, avg 8µs/call: # 62 times (278µs+188µs) by Foswiki::Prefs::Stack::insert at line 171 of /var/www/foswikidev/core/lib/Foswiki/Prefs/Stack.pm, avg 8µs/call
sub insert {
626237µs my ( $this, $type, $key, $value ) = @_;
63
646263µs62188µs $this->cleanupInsertValue( \$value );
# spent 188µs making 62 calls to Foswiki::Prefs::BaseBackend::cleanupInsertValue, avg 3µs/call
656245µs $this->{$key} = $value;
6662129µs return 1;
67}
68
6913µs1;
70__END__