File | /data/SimpleDB-Class/author.t/05.Domain_and_Item.t |
Statements Executed | 115 |
Statement Execution Time | 4.75ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 629µs | 780µs | BEGIN@3 | main::
1 | 1 | 1 | 161µs | 854ms | BEGIN@13 | main::
1 | 1 | 1 | 8µs | 8µs | BEGIN@26 | Moose::Util::TypeConstraints::OptimizedConstraints::
0 | 0 | 0 | 0s | 0s | RUNTIME | main::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | 3 | 1.09ms | 2 | 18.0ms | use Test::More tests => 51; # spent 16.3ms making 1 call to main::BEGIN@1
# spent 1.75ms making 1 call to Test::Builder::Module::import |
2 | 3 | 108µs | 2 | 11.8ms | use Test::Deep; # spent 11.7ms making 1 call to main::BEGIN@2
# spent 175µs making 1 call to Exporter::import |
3 | 3 | 130µs | 2 | 879µs | # spent 780µs (629+152) within main::BEGIN@3 which was called
# once (629µs+152µs) by main::RUNTIME at line 3 # spent 780µs making 1 call to main::BEGIN@3
# spent 98µs making 1 call to lib::import |
4 | 1 | 3µs | $|=1; | ||
5 | |||||
6 | 1 | 4µs | my $access = $ENV{AWS_ACCESS_KEY}; | ||
7 | 1 | 2µs | my $secret = $ENV{AWS_SECRET_ACCESS_KEY}; | ||
8 | |||||
9 | 1 | 1µs | unless (defined $access && defined $secret) { | ||
10 | die "You need to set environment variables AWS_ACCESS_KEY and AWS_SECRET_ACCESS_KEY to run these tests."; | ||||
11 | } | ||||
12 | |||||
13 | 3 | 2.18ms | 1 | 854ms | # spent 854ms (161µs+854) within main::BEGIN@13 which was called
# once (161µs+854ms) by main::RUNTIME at line 13 # spent 854ms making 1 call to main::BEGIN@13 |
14 | 1 | 8µs | my %params = (secret_key=>$secret, access_key=>$access, cache_servers=>[{host=>'127.0.0.1', port=>11211}]); | ||
15 | 1 | 700ns | if ($ARGV[0]) { | ||
16 | $params{domain_prefix} = $ARGV[0]; | ||||
17 | } | ||||
18 | 1 | 12µs | 1 | 735µs | my $foo = Foo->new(%params); # spent 735µs making 1 call to SimpleDB::Class::new |
19 | 1 | 8µs | 2 | 1.17ms | $foo->cache->flush; # spent 1.10ms making 1 call to SimpleDB::Class::Cache::flush
# spent 65µs making 1 call to SimpleDB::Class::cache |
20 | 1 | 8µs | 1 | 174µs | my $domain = $foo->domain('foo_domain'); # spent 174µs making 1 call to SimpleDB::Class::domain |
21 | 1 | 4µs | 1 | 570µs | isa_ok($domain,'SimpleDB::Class::Domain'); # spent 570µs making 1 call to Test::More::isa_ok |
22 | 1 | 8µs | 2 | 339µs | isa_ok($domain->simpledb,'SimpleDB::Class'); # spent 332µs making 1 call to Test::More::isa_ok
# spent 6µs making 1 call to SimpleDB::Class::Domain::simpledb |
23 | |||||
24 | 1 | 6µs | 1 | 98µs | my $parent = $foo->domain('foo_parent'); # spent 98µs making 1 call to SimpleDB::Class::domain |
25 | 1 | 36µs | 2 | 1.55s | ok($parent->create, 'create a domain'); # spent 1.55s making 1 call to SimpleDB::Class::Domain::create
# spent 407µs making 1 call to Test::More::ok |
26 | 1 | 5µs | # spent 8µs within Moose::Util::TypeConstraints::OptimizedConstraints::BEGIN@26 which was called
# once (8µs+0s) by Moose::Util::TypeConstraints::OptimizedConstraints::CORE:match at line 0 | ||
27 | 1 | 1µs | if ($ARGV[0]) { | ||
28 | $domain_expected = $ARGV[0].$domain_expected; | ||||
29 | } | ||||
30 | 1 | 29µs | 2 | 69.3ms | ok(grep({$_ eq $domain_expected} @{$foo->list_domains}), 'got created domain'); # spent 68.9ms making 1 call to SimpleDB::Class::list_domains
# spent 366µs making 1 call to Test::More::ok |
31 | 1 | 11µs | 2 | 77.4ms | is($parent->count, 0, 'should be 0 items'); # spent 76.7ms making 1 call to SimpleDB::Class::Domain::count
# spent 718µs making 1 call to Test::More::is |
32 | 1 | 10µs | 1 | 293ms | my $parent_one = $parent->insert({title=>'One'},id=>'one'); # spent 293ms making 1 call to SimpleDB::Class::Domain::insert |
33 | 1 | 17µs | 2 | 492ms | $parent->insert({title=>'Two'},id=>'two'); # spent 492ms making 1 call to SimpleDB::Class::Domain::insert
# spent 123µs making 1 call to Moose::Object::DESTROY |
34 | 1 | 11µs | 2 | 64.1ms | is($parent->count(consistent=>1), 2, 'should be 2 items'); # spent 63.6ms making 1 call to SimpleDB::Class::Domain::count
# spent 550µs making 1 call to Test::More::is |
35 | |||||
36 | 1 | 10µs | 1 | 1.25s | $domain->create; # spent 1.25s making 1 call to SimpleDB::Class::Domain::create |
37 | 1 | 22µs | 2 | 117ms | ok($domain->insert({color=>'red',size=>'large',parentId=>'one',quantity=>5}, id=>'largered'), 'adding item with id'); # spent 116ms making 1 call to SimpleDB::Class::Domain::insert
# spent 480µs making 1 call to Test::More::ok |
38 | 1 | 44µs | 3 | 340ms | ok($domain->insert({color=>'blue',size=>'small',parentId=>'two',quantity=>1}), 'adding item without id'); # spent 340ms making 1 call to SimpleDB::Class::Domain::insert
# spent 496µs making 1 call to Test::More::ok
# spent 106µs making 1 call to Moose::Object::DESTROY |
39 | 1 | 34µs | 4 | 5.46ms | is($domain->find('largered')->size, 'large', 'find() works'); # spent 4.81ms making 1 call to SimpleDB::Class::Domain::find
# spent 532µs making 1 call to Test::More::is
# spent 114µs making 1 call to Moose::Object::DESTROY
# spent 3µs making 1 call to Foo::Domain::size |
40 | |||||
41 | 1 | 22µs | 2 | 318ms | my $x = $domain->insert({color=>'orange',size=>'large',parentId=>'one',properties=>{this=>'that'},quantity=>3}); # spent 318ms making 1 call to SimpleDB::Class::Domain::insert
# spent 60µs making 1 call to Moose::Object::DESTROY |
42 | 1 | 5µs | 1 | 523µs | isa_ok($x, 'Foo::Domain'); # spent 523µs making 1 call to Test::More::isa_ok |
43 | 1 | 28µs | 3 | 13.2ms | cmp_deeply($x->to_hashref, {properties=>{this=>'that'}, color=>'orange',size=>'large',size_formatted=>'Large',parentId=>'one', start_date=>ignore(), components=>[], notes=>'', quantity=>3}, 'to_hashref()'); # spent 11.4ms making 1 call to Test::Deep::cmp_deeply
# spent 1.63ms making 1 call to Test::Deep::__ANON__[Test/Deep.pm:92]
# spent 159µs making 1 call to SimpleDB::Class::Item::to_hashref |
44 | 1 | 35µs | 2 | 319ms | $domain->insert({color=>'green',size=>'small',parentId=>'two',quantity=>11}); # spent 319ms making 1 call to SimpleDB::Class::Domain::insert
# spent 96µs making 1 call to Moose::Object::DESTROY |
45 | 1 | 35µs | 2 | 123ms | $domain->insert({color=>'black',size=>'huge',parentId=>'one',quantity=>2}); # spent 122ms making 1 call to SimpleDB::Class::Domain::insert
# spent 90µs making 1 call to Moose::Object::DESTROY |
46 | 1 | 13µs | 2 | 85.8ms | is($domain->max('quantity', consistent=>1), 11, 'max'); # spent 85.2ms making 1 call to SimpleDB::Class::Domain::max
# spent 519µs making 1 call to Test::More::is |
47 | 1 | 9µs | 2 | 72.9ms | is($domain->min('quantity', consistent=>1), 1, 'min'); # spent 72.1ms making 1 call to SimpleDB::Class::Domain::min
# spent 703µs making 1 call to Test::More::is |
48 | 1 | 15µs | 2 | 72.1ms | is($domain->max('quantity',consistent=>1, where=>{parentId=>'one'}), 5, 'max with clause'); # spent 71.6ms making 1 call to SimpleDB::Class::Domain::max
# spent 526µs making 1 call to Test::More::is |
49 | 1 | 13µs | 2 | 57.5ms | is($domain->min('quantity', consistent=>1, where=>{parentId=>'one'}), 2, 'min with clause'); # spent 57.0ms making 1 call to SimpleDB::Class::Domain::min
# spent 512µs making 1 call to Test::More::is |
50 | |||||
51 | 1 | 9µs | 1 | 211µs | my $foos = $domain->search(where=>{size=>'small'}, consistent=>1); # spent 211µs making 1 call to SimpleDB::Class::Domain::search |
52 | 1 | 3µs | 1 | 275µs | isa_ok($foos, 'SimpleDB::Class::ResultSet'); # spent 275µs making 1 call to Test::More::isa_ok |
53 | 1 | 12µs | 2 | 64.5ms | isa_ok($foos->next, 'Foo::Domain'); # spent 64.1ms making 1 call to SimpleDB::Class::ResultSet::next
# spent 375µs making 1 call to Test::More::isa_ok |
54 | 1 | 10µs | 2 | 2.35ms | my $a_domain = $foos->next; # spent 2.28ms making 1 call to SimpleDB::Class::ResultSet::next
# spent 68µs making 1 call to Moose::Object::DESTROY |
55 | 1 | 8µs | 2 | 247µs | ok($a_domain->can('size'), 'attribute methods created'); # spent 246µs making 1 call to Test::More::ok
# spent 1µs making 1 call to UNIVERSAL::can |
56 | 1 | 18µs | 2 | 261µs | ok(!$a_domain->can('title'), 'other class attribute methods not created'); # spent 250µs making 1 call to Test::More::ok
# spent 11µs making 1 call to UNIVERSAL::can |
57 | 1 | 5µs | 2 | 417µs | is($a_domain->size, 'small', 'fetched an item from the result set'); # spent 415µs making 1 call to Test::More::is
# spent 2µs making 1 call to Foo::Domain::size |
58 | 1 | 12µs | 2 | 163µs | $foos = $domain->search(consistent=>1, where=>{'itemName()'=>$a_domain->id}); # spent 157µs making 1 call to SimpleDB::Class::Domain::search
# spent 6µs making 1 call to SimpleDB::Class::Item::id |
59 | 1 | 2µs | 1 | 71.7ms | my $b_domain = $foos->next; # spent 71.7ms making 1 call to SimpleDB::Class::ResultSet::next |
60 | 1 | 12µs | 3 | 508µs | is($b_domain->id, $a_domain->id, "searching on itemName() works"); # spent 496µs making 1 call to Test::More::is
# spent 12µs making 2 calls to SimpleDB::Class::Item::id, avg 6µs/call |
61 | 1 | 12µs | 1 | 194µs | $foos = $domain->search(where=>{size=>'small', 'itemName()'=>['>','0']}, consistent=>1, order_by=>'itemName()'); # spent 194µs making 1 call to SimpleDB::Class::Domain::search |
62 | 1 | 8µs | 1 | 54.0ms | $a_domain = $foos->next; # spent 54.0ms making 1 call to SimpleDB::Class::ResultSet::next |
63 | 1 | 21µs | 2 | 2.52ms | $b_domain = $foos->next; # spent 2.45ms making 1 call to SimpleDB::Class::ResultSet::next
# spent 71µs making 1 call to Moose::Object::DESTROY |
64 | 1 | 20µs | 4 | 784µs | ok($a_domain->id < $b_domain->id, 'order by itemName() works'); # spent 716µs making 1 call to Test::More::ok
# spent 60µs making 1 call to Moose::Object::DESTROY
# spent 8µs making 2 calls to SimpleDB::Class::Item::id, avg 4µs/call |
65 | 1 | 9µs | 1 | 320ms | my $c_domain = $b_domain->copy; # spent 320ms making 1 call to SimpleDB::Class::Item::copy |
66 | 1 | 10µs | 3 | 531µs | is($b_domain->size, $c_domain->size, "copy() works."); # spent 523µs making 1 call to Test::More::is
# spent 8µs making 2 calls to Foo::Domain::size, avg 4µs/call |
67 | 1 | 9µs | 3 | 292µs | cmp_ok($b_domain->id, 'ne', $c_domain->id, "copy() provides new id"); # spent 284µs making 1 call to Test::More::cmp_ok
# spent 9µs making 2 calls to SimpleDB::Class::Item::id, avg 4µs/call |
68 | 1 | 14µs | 1 | 189µs | $foos = $domain->search(where=>{size=>'large'}, consistent=>1); # spent 189µs making 1 call to SimpleDB::Class::Domain::search |
69 | 1 | 7µs | 2 | 77.1ms | is($foos->count, 2, 'counting items in a result set'); # spent 76.6ms making 1 call to SimpleDB::Class::ResultSet::count
# spent 476µs making 1 call to Test::More::is |
70 | 1 | 10µs | 1 | 158µs | $foos = $domain->search(consistent=>1, where=>{size=>'large'}); # spent 158µs making 1 call to SimpleDB::Class::Domain::search |
71 | 1 | 10µs | 2 | 113ms | is($foos->count(where=>{color=>'orange'}), 1, 'counting subset of items in a result set'); # spent 112ms making 1 call to SimpleDB::Class::ResultSet::count
# spent 498µs making 1 call to Test::More::is |
72 | |||||
73 | 1 | 21µs | 3 | 71.0ms | is($parent_one->domains->count, 3, "can count result set"); # spent 70.2ms making 1 call to SimpleDB::Class::ResultSet::count
# spent 482µs making 1 call to Test::More::is
# spent 307µs making 1 call to Foo::Parent::domains |
74 | 1 | 26µs | 3 | 57.7ms | is($parent_one->domains(where=>{color=>'red'})->count, 1, "can narrow relationship"); # spent 56.8ms making 1 call to SimpleDB::Class::ResultSet::count
# spent 577µs making 1 call to Test::More::is
# spent 267µs making 1 call to Foo::Parent::domains |
75 | |||||
76 | 1 | 6µs | 1 | 132µs | my $children = $foo->domain('foo_child'); # spent 132µs making 1 call to SimpleDB::Class::domain |
77 | 1 | 10µs | 1 | 1.25s | $children->create; # spent 1.25s making 1 call to SimpleDB::Class::Domain::create |
78 | 1 | 10µs | 1 | 132ms | my $child = $children->insert({domainId=>'largered'}); # spent 132ms making 1 call to SimpleDB::Class::Domain::insert |
79 | 1 | 5µs | 1 | 452µs | isa_ok($child, 'Foo::Child'); # spent 452µs making 1 call to Test::More::isa_ok |
80 | 1 | 11µs | 1 | 87.8ms | my $subchild = $children->insert({domainId=>'largered', class=>'Foo::SubChild'}); # spent 87.8ms making 1 call to SimpleDB::Class::Domain::insert |
81 | 1 | 5µs | 1 | 574µs | isa_ok($subchild, 'Foo::SubChild'); # spent 574µs making 1 call to Test::More::isa_ok |
82 | |||||
83 | 1 | 8µs | 1 | 4.40ms | my $largered = $domain->find('largered', set => { parent => $parent_one } ); # spent 4.40ms making 1 call to SimpleDB::Class::Domain::find |
84 | 1 | 5µs | 2 | 626µs | is($parent_one, $largered->parent, 'presetting parent works'); # spent 623µs making 1 call to Test::More::is
# spent 3µs making 1 call to Foo::Domain::parent |
85 | 1 | 11µs | 3 | 481µs | is($largered->parent->title, 'One', 'belongs_to works'); # spent 469µs making 1 call to Test::More::is
# spent 6µs making 1 call to Foo::Parent::title
# spent 5µs making 1 call to Foo::Domain::parent |
86 | 1 | 6µs | 1 | 109µs | $largered->parentId('two'); # spent 109µs making 1 call to Foo::Domain::parentId |
87 | 1 | 6µs | 3 | 1.78ms | is($largered->parent->title, 'Two', 'belongs to clear works'); # spent 1.32ms making 1 call to Foo::Domain::parent
# spent 456µs making 1 call to Test::More::is
# spent 3µs making 1 call to Foo::Parent::title |
88 | 1 | 25µs | 5 | 70.6ms | is($domain->find('largered')->children->next->domainId, 'largered', 'has_many works'); # spent 66.7ms making 1 call to SimpleDB::Class::ResultSet::next
# spent 2.89ms making 1 call to SimpleDB::Class::Domain::find
# spent 706µs making 1 call to Test::More::is
# spent 248µs making 1 call to Foo::Domain::children
# spent 40µs making 1 call to Foo::Child::domainId |
89 | |||||
90 | 1 | 35µs | 2 | 172µs | my $note = 'NOTE: # spent 172µs making 2 calls to Moose::Object::DESTROY, avg 86µs/call |
91 | This is a really long note that I am adding to prove that we can have really long notes in SimpleDB. | ||||
92 | This is a really long note that I am adding to prove that we can have really long notes in SimpleDB. | ||||
93 | This is a really long note that I am adding to prove that we can have really long notes in SimpleDB. | ||||
94 | This is a really long note that I am adding to prove that we can have really long notes in SimpleDB. | ||||
95 | This is a really long note that I am adding to prove that we can have really long notes in SimpleDB. | ||||
96 | This is a really long note that I am adding to prove that we can have really long notes in SimpleDB. | ||||
97 | This is a really long note that I am adding to prove that we can have really long notes in SimpleDB. | ||||
98 | This is a really long note that I am adding to prove that we can have really long notes in SimpleDB. | ||||
99 | This is a really long note that I am adding to prove that we can have really long notes in SimpleDB. | ||||
100 | This is a really long note that I am adding to prove that we can have really long notes in SimpleDB. | ||||
101 | This is a really long note that I am adding to prove that we can have really long notes in SimpleDB. | ||||
102 | '; | ||||
103 | |||||
104 | 1 | 25µs | 2 | 338ms | my $j = $domain->insert({start_date=>DateTime->new(year=>2000, month=>5, day=>5, hour=>5, minute=>5, second=>5), color=>'orange',size=>'large',parentId=>'one',properties=>{this=>'that'},quantity=>4, notes=>$note, components=>['cotton','dye','thread']}); # spent 337ms making 1 call to SimpleDB::Class::Domain::insert
# spent 555µs making 1 call to DateTime::new |
105 | 1 | 11µs | 2 | 466µs | $foo->cache->flush; # spent 458µs making 1 call to SimpleDB::Class::Cache::flush
# spent 8µs making 1 call to SimpleDB::Class::cache |
106 | 1 | 11µs | 2 | 138ms | my $j1 = $domain->find($j->id, consistent=>1); # spent 138ms making 1 call to SimpleDB::Class::Domain::find
# spent 9µs making 1 call to SimpleDB::Class::Item::id |
107 | 1 | 7µs | 3 | 643µs | cmp_ok($j->start_date, '==', $j1->start_date, 'dates in are dates out'); # spent 637µs making 1 call to Test::More::cmp_ok
# spent 5µs making 2 calls to Foo::Domain::start_date, avg 3µs/call |
108 | 1 | 7µs | 3 | 366µs | is($j->start_date->year, 2000, 'year'); # spent 359µs making 1 call to Test::More::is
# spent 4µs making 1 call to DateTime::year
# spent 3µs making 1 call to Foo::Domain::start_date |
109 | 1 | 5µs | 3 | 337µs | is($j->start_date->month, 5, 'month'); # spent 332µs making 1 call to Test::More::is
# spent 3µs making 1 call to Foo::Domain::start_date
# spent 2µs making 1 call to DateTime::month |
110 | 1 | 6µs | 3 | 334µs | is($j->start_date->day, 5, 'day'); # spent 327µs making 1 call to Test::More::is
# spent 5µs making 1 call to DateTime::day_of_month
# spent 3µs making 1 call to Foo::Domain::start_date |
111 | 1 | 6µs | 3 | 341µs | is($j->start_date->hour, 5, 'hour'); # spent 333µs making 1 call to Test::More::is
# spent 5µs making 1 call to DateTime::hour
# spent 3µs making 1 call to Foo::Domain::start_date |
112 | 1 | 7µs | 3 | 419µs | is($j->start_date->minute, 5, 'minute'); # spent 411µs making 1 call to Test::More::is
# spent 4µs making 1 call to DateTime::minute
# spent 3µs making 1 call to Foo::Domain::start_date |
113 | 1 | 7µs | 3 | 356µs | is($j->start_date->second, 5, 'second'); # spent 348µs making 1 call to Test::More::is
# spent 4µs making 1 call to Foo::Domain::start_date
# spent 3µs making 1 call to DateTime::second |
114 | 1 | 6µs | 2 | 376µs | is($j1->properties->{this}, 'that', 'hash refs work'); # spent 368µs making 1 call to Test::More::is
# spent 8µs making 1 call to Foo::Domain::properties |
115 | 1 | 6µs | 2 | 412µs | is($j1->notes, $note, 'medium strings work'); # spent 406µs making 1 call to Test::More::is
# spent 6µs making 1 call to Foo::Domain::notes |
116 | 1 | 6µs | 2 | 367µs | is($j1->components->[1], 'dye', 'arrays of strings work'); # spent 362µs making 1 call to Test::More::is
# spent 5µs making 1 call to Foo::Domain::components |
117 | |||||
118 | 1 | 14µs | 2 | 391ms | my $page2 = $domain->search( # spent 391ms making 1 call to SimpleDB::Class::ResultSet::paginate
# spent 210µs making 1 call to SimpleDB::Class::Domain::search |
119 | where => { quantity => ['>', 1] }, | ||||
120 | consistent => 1, | ||||
121 | order_by => 'quantity' | ||||
122 | )->paginate(2,2); | ||||
123 | 1 | 18µs | 3 | 5.43ms | is($page2->next->color, 'orange', "pagination works"); # spent 4.75ms making 1 call to SimpleDB::Class::ResultSet::next
# spent 670µs making 1 call to Test::More::is
# spent 5µs making 1 call to Foo::Domain::color |
124 | |||||
125 | 1 | 16µs | 1 | 78µs | my $bighashref = {this=>'that',really_long_line_to_see_a_multiattribute_hash_ref_work=>'this is me testing to see what happens if i have a string that is too long to fit in one attribute value. perhaps its broken. 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000'}; # spent 78µs making 1 call to Moose::Object::DESTROY |
126 | 1 | 20µs | 2 | 1.32s | my $bigprops = $domain->insert({start_date=>DateTime->new(year=>2000, month=>5, day=>5, hour=>5, minute=>5, second=>5), color=>'orange',size=>'large',parentId=>'one',properties=>$bighashref,quantity=>4, notes=>$note, components=>['cotton','dye','thread']}); # spent 1.32s making 1 call to SimpleDB::Class::Domain::insert
# spent 388µs making 1 call to DateTime::new |
127 | |||||
128 | 1 | 12µs | 2 | 372µs | $foo->cache->flush; # spent 364µs making 1 call to SimpleDB::Class::Cache::flush
# spent 8µs making 1 call to SimpleDB::Class::cache |
129 | 1 | 13µs | 2 | 96.5ms | my $bigprops2 = $domain->find($bigprops->id, consistent=>1); # spent 96.5ms making 1 call to SimpleDB::Class::Domain::find
# spent 9µs making 1 call to SimpleDB::Class::Item::id |
130 | 1 | 7µs | 2 | 482µs | is($bigprops2->properties->{really_long_line_to_see_a_multiattribute_hash_ref_work}, $bighashref->{really_long_line_to_see_a_multiattribute_hash_ref_work}, 'long hashref works'); # spent 479µs making 1 call to Test::More::is
# spent 3µs making 1 call to Foo::Domain::properties |
131 | |||||
132 | 1 | 5µs | 1 | 164µs | my $rs = $domain->search(limit=>3); # spent 164µs making 1 call to SimpleDB::Class::Domain::search |
133 | 1 | 200ns | my $i = 0; | ||
134 | 1 | 4µs | 1 | 64.0ms | while ($rs->next) { # spent 64.0ms making 1 call to SimpleDB::Class::ResultSet::next |
135 | 3 | 35µs | 6 | 10.9ms | $i++; # spent 10.7ms making 3 calls to SimpleDB::Class::ResultSet::next, avg 3.57ms/call
# spent 162µs making 3 calls to Moose::Object::DESTROY, avg 54µs/call |
136 | } | ||||
137 | 1 | 4µs | 1 | 499µs | is($i, 3, 'limits are held'); # spent 499µs making 1 call to Test::More::is |
138 | |||||
139 | 1 | 11µs | 1 | 53.1ms | my $ids = $domain->fetch_ids(where => { color=>'orange' }, consistent=>1); # spent 53.1ms making 1 call to SimpleDB::Class::Domain::fetch_ids |
140 | 1 | 5µs | 1 | 566µs | is(scalar(@{$ids}), 3, 'fetch_ids gets the right amount'); # spent 566µs making 1 call to Test::More::is |
141 | 1 | 25µs | 2 | 262µs | ok($bigprops->id ~~ @{$ids}, 'fetch_ids returns expected id'); # spent 255µs making 1 call to Test::More::ok
# spent 7µs making 1 call to SimpleDB::Class::Item::id |
142 | |||||
143 | 1 | 15µs | 2 | 1.13s | ok($domain->delete,'deleting domain'); # spent 1.13s making 1 call to SimpleDB::Class::Domain::delete
# spent 540µs making 1 call to Test::More::ok |
144 | 1 | 8µs | 1 | 3.34s | $parent->delete; # spent 3.34s making 1 call to SimpleDB::Class::Domain::delete |
145 | 1 | 9µs | 1 | 1.12s | $children->delete; # spent 1.12s making 1 call to SimpleDB::Class::Domain::delete |
146 | 1 | 37µs | 2 | 76.2ms | ok(!grep({$_ eq 'foo_domain'} @{$foo->list_domains}), 'domain deleted'); # spent 75.6ms making 1 call to SimpleDB::Class::list_domains
# spent 561µs making 1 call to Test::More::ok |
147 | |||||
148 |