← Index
NYTProf Performance Profile   « block view • line view • sub view »
For 02.Cache.t
  Run on Tue May 4 16:41:02 2010
Reported on Tue May 4 16:41:41 2010

File /data/SimpleDB-Class/author.t/02.Cache.t
Statements Executed 34
Statement Execution Time 1.19ms
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11110.6ms105msmain::::BEGIN@3main::BEGIN@3
1113.27ms17.1msmain::::BEGIN@1main::BEGIN@1
111515µs669µsmain::::BEGIN@4main::BEGIN@4
0000s0smain::::RUNTIMEmain::RUNTIME
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
13233µs218.7ms
# spent 17.1ms (3.27+13.8) within main::BEGIN@1 which was called # once (3.27ms+13.8ms) by main::RUNTIME at line 1
use Test::More tests => 14;
# spent 17.1ms making 1 call to main::BEGIN@1 # spent 1.65ms making 1 call to Test::Builder::Module::import
23120µs12.83msuse Tie::IxHash;
# spent 2.83ms making 1 call to main::BEGIN@2
33104µs1105ms
# spent 105ms (10.6+94.2) within main::BEGIN@3 which was called # once (10.6ms+94.2ms) by main::RUNTIME at line 3
use DateTime;
# spent 105ms making 1 call to main::BEGIN@3
43428µs2773µs
# spent 669µs (515+155) within main::BEGIN@4 which was called # once (515µs+155µs) by main::RUNTIME at line 4
use lib ('../lib', 'lib');
# spent 669µs making 1 call to main::BEGIN@4 # spent 104µs making 1 call to lib::import
5
612µsmy $a = {foo=>'A'};
71700nsmy $b = {foo=>'B'};
8
913µs1243msuse_ok('SimpleDB::Class::Cache');
# spent 243ms making 1 call to Test::More::use_ok
1017µs117µsmy $cache = SimpleDB::Class::Cache->new(servers=>[{host=>'127.0.0.1',port=>11211}]);
# spent 17µs making 1 call to SimpleDB::Class::Cache::new
1114µs1275µsisa_ok($cache, 'SimpleDB::Class::Cache');
# spent 275µs making 1 call to Test::More::isa_ok
1214µs1905µs$cache->set('foo',"a",$a);
# spent 905µs making 1 call to SimpleDB::Class::Cache::set
13110µs2871µsis($cache->get('foo',"a")->{foo}, "A", "set/get");
# spent 637µs making 1 call to Test::More::is # spent 234µs making 1 call to SimpleDB::Class::Cache::get
1414µs1190µs$cache->set('foo',"b", $b);
# spent 190µs making 1 call to SimpleDB::Class::Cache::set
15111µs1328µsmy ($a1, $b1) = @{$cache->mget([['foo',"a"],['foo',"b"]])};
# spent 328µs making 1 call to SimpleDB::Class::Cache::mget
1613µs1390µsis($a1->{foo}, "A", "mget first value");
# spent 390µs making 1 call to Test::More::is
1714µs1365µsis($b1->{foo}, "B", "mget second value");
# spent 365µs making 1 call to Test::More::is
1816µs1176µs$cache->delete('foo',"a");
# spent 176µs making 1 call to SimpleDB::Class::Cache::delete
1924µs3647µsis(eval{$cache->get('foo',"a")}, undef, 'delete');
# spent 460µs making 1 call to Test::More::is # spent 185µs making 1 call to SimpleDB::Class::Cache::get # spent 2µs making 1 call to JSON::XS::DESTROY
2014µs1111µs$cache->flush;
# spent 111µs making 1 call to SimpleDB::Class::Cache::flush
2124µs3618µsis(eval{$cache->get('foo',"b")}, undef, 'flush');
# spent 450µs making 1 call to Test::More::is # spent 167µs making 1 call to SimpleDB::Class::Cache::get # spent 1µs making 1 call to JSON::XS::DESTROY
22
23#my $foo = {a=>'b', date=>DateTime->new(year=>2000, month=>5, day=>5, hour=>5, minute=>5, second=>5)};
2419µsmy $foo = {a=>'b', date=>{year=>2000, month=>5, day=>5, hour=>5, minute=>5, second=>5}};
2513µs11.12ms$cache->set('foo','foo',$foo);
# spent 1.12ms making 1 call to SimpleDB::Class::Cache::set
2614µs1233µsmy $foo1 = $cache->get('foo','foo');
# spent 233µs making 1 call to SimpleDB::Class::Cache::get
27#cmp_ok($foo->{date}, '==', $foo1->{date}, 'dates in are dates out');
2816µs1355µscmp_ok($foo->{date}{month}, '==', $foo1->{date}{month}, 'dates in are dates out');
# spent 355µs making 1 call to Test::More::cmp_ok
291208µs2546µsis($foo1->{date}->year, 2000, 'year');
# spent 386µs making 1 call to Test::Builder::END # spent 160µs making 1 call to Memcached::libmemcached::DESTROY
30is($foo1->{date}->month, 5, 'month');
31is($foo1->{date}->day, 5, 'day');
32is($foo1->{date}->hour, 5, 'hour');
33is($foo1->{date}->minute, 5, 'minute');
34is($foo1->{date}->second, 5, 'second');