]> Dogcows Code - chaz/p5-CGI-Ex/blob - samples/devel/dprof_conf.d
CGI::Ex 2.00
[chaz/p5-CGI-Ex] / samples / devel / dprof_conf.d
1 # -*-perl-*-
2 # run with perl -d:DProf $0
3
4 use CGI::Ex::Conf qw(conf_read conf_write);
5 use POSIX qw(tmpnam);
6 use Data::Dumper qw(Dumper);
7
8 #my $cob = CGI::Ex::Conf->new;
9 my $tmp = tmpnam .".sto";
10 END { unlink $tmp };
11
12 my $conf = {
13 one => 1,
14 two => 2,
15 three => 3,
16 four => 4,
17 five => 5,
18 six => 6,
19 seven => 7,
20 eight => 8,
21 nine => 9,
22 ten => 10,
23 };
24
25 #$cob->write($tmp, $conf);
26 conf_write($tmp, $conf);
27 #print `cat $tmp`; exit;
28
29 for (1 .. 100_000) {
30 # my $ref = $cob->read($tmp);
31 # my $ref = conf_read($tmp);
32 # print Dumper $ref; exit;
33
34 conf_write($tmp, $conf);
35 }
36
37
38 __END__
39
40 ### conf_read
41 %Time ExclSec CumulS #Calls sec/call Csec/c Name
42 38.5 2.120 0.000 100000 0.0000 0.0000 Storable::_retrieve
43 38.1 2.100 2.100 100000 0.0000 0.0000 Storable::pretrieve
44 20.9 1.150 5.860 100000 0.0000 0.0001 CGI::Ex::Conf::read_ref
45 8.73 0.480 6.720 100000 0.0000 0.0001 CGI::Ex::Conf::conf_read
46 6.91 0.380 0.380 100001 0.0000 0.0000 CGI::Ex::Conf::new
47 4.73 0.260 0.000 100000 0.0000 0.0000 Storable::retrieve
48 4.18 0.230 4.710 100000 0.0000 0.0000 CGI::Ex::Conf::read_handler_storab
49 le
50 0.36 0.020 0.040 3 0.0067 0.0133 main::BEGIN
51 0.18 0.010 0.010 6 0.0017 0.0017 Exporter::import
52 0.18 0.010 0.010 4 0.0025 0.0025 CGI::Ex::Conf::BEGIN
53 0.18 0.010 0.020 1 0.0100 0.0199 CGI::Ex::Conf::write_handler_stora
54 ble
55 0.18 0.010 0.010 5 0.0020 0.0020 AutoLoader::AUTOLOAD
56 0.00 0.000 0.000 1 0.0000 0.0000 POSIX::load_imports
57 0.00 0.000 0.000 1 0.0000 0.0000 Exporter::Heavy::heavy_export
58 0.00 0.000 0.000 1 0.0000 0.0000 Storable::store
59
60 ### conf_write
61 %Time ExclSec CumulS #Calls sec/call Csec/c Name
62 60.3 9.510 9.510 100001 0.0001 0.0001 Storable::pstore
63 32.8 5.170 0.000 100001 0.0001 0.0000 Storable::_store
64 7.68 1.210 16.450 100001 0.0000 0.0002 CGI::Ex::Conf::write_ref
65 2.60 0.410 17.220 100001 0.0000 0.0002 CGI::Ex::Conf::conf_write
66 2.28 0.360 0.360 100001 0.0000 0.0000 CGI::Ex::Conf::new
67 2.16 0.340 15.240 100001 0.0000 0.0002 CGI::Ex::Conf::write_handler_stora
68 ble
69 1.33 0.210 0.000 100001 0.0000 0.0000 Storable::store
70 0.06 0.010 0.010 3 0.0033 0.0033 AutoLoader::import
71 0.06 0.010 0.010 2 0.0050 0.0050 DynaLoader::BEGIN
72 0.06 0.010 0.010 4 0.0025 0.0025 CGI::Ex::Conf::BEGIN
73 0.06 0.010 0.030 3 0.0033 0.0099 main::BEGIN
74 0.00 0.000 0.000 1 0.0000 0.0000 POSIX::load_imports
75 0.00 0.000 0.000 1 0.0000 0.0000 Exporter::Heavy::heavy_export
76 0.00 - -0.000 1 - - main::END
77 0.00 - -0.000 1 - - bytes::import
This page took 0.032706 seconds and 4 git commands to generate.