| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/KiokuDB/Reference.pm |
| Statements | Executed 11 statements in 1.03ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 106µs | 25.4ms | KiokuDB::Reference::BEGIN@4 |
| 1 | 1 | 1 | 44µs | 1.55ms | KiokuDB::Reference::BEGIN@6 |
| 0 | 0 | 0 | 0s | 0s | KiokuDB::Reference::STORABLE_freeze |
| 0 | 0 | 0 | 0s | 0s | KiokuDB::Reference::STORABLE_thaw |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | #!/usr/bin/perl | ||||
| 2 | |||||
| 3 | package KiokuDB::Reference; | ||||
| 4 | 3 | 197µs | 2 | 50.6ms | # spent 25.4ms (106µs+25.3) within KiokuDB::Reference::BEGIN@4 which was called:
# once (106µs+25.3ms) by KiokuDB::Collapser::BEGIN@14 at line 4 # spent 25.4ms making 1 call to KiokuDB::Reference::BEGIN@4
# spent 25.3ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:456] |
| 5 | |||||
| 6 | 3 | 611µs | 2 | 3.05ms | # spent 1.55ms (44µs+1.51) within KiokuDB::Reference::BEGIN@6 which was called:
# once (44µs+1.51ms) by KiokuDB::Collapser::BEGIN@14 at line 6 # spent 1.55ms making 1 call to KiokuDB::Reference::BEGIN@6
# spent 1.51ms making 1 call to namespace::clean::import |
| 7 | |||||
| 8 | 1 | 15µs | 1 | 4.74ms | with qw(MooseX::Clone); # spent 4.74ms making 1 call to Moose::with |
| 9 | |||||
| 10 | 1 | 16µs | 1 | 8.79ms | has id => ( # spent 8.79ms making 1 call to Moose::has |
| 11 | isa => "Str", | ||||
| 12 | is => "rw", | ||||
| 13 | required => 1, | ||||
| 14 | ); | ||||
| 15 | |||||
| 16 | 1 | 12µs | 1 | 8.52ms | has is_weak => ( # spent 8.52ms making 1 call to Moose::has |
| 17 | isa => "Bool", | ||||
| 18 | is => "rw", | ||||
| 19 | ); | ||||
| 20 | |||||
| 21 | sub STORABLE_freeze { | ||||
| 22 | my ( $self, $cloning ) = @_; | ||||
| 23 | |||||
| 24 | |||||
| 25 | join(",", $self->id, !!$self->is_weak); # FIXME broken | ||||
| 26 | } | ||||
| 27 | |||||
| 28 | sub STORABLE_thaw { | ||||
| 29 | my ( $self, $cloning, $serialized ) = @_; | ||||
| 30 | |||||
| 31 | my ( $id, $weak ) = ( $serialized =~ /^(.*?),(1?)$/ ); | ||||
| 32 | |||||
| 33 | $self->id($id); | ||||
| 34 | $self->is_weak(1) if $weak; | ||||
| 35 | |||||
| 36 | return $self; | ||||
| 37 | } | ||||
| 38 | |||||
| 39 | 1 | 24µs | 2 | 16.3ms | __PACKAGE__->meta->make_immutable; # spent 16.2ms making 1 call to Class::MOP::Class::make_immutable
# spent 100µs making 1 call to KiokuDB::Reference::meta |
| 40 | |||||
| 41 | 1 | 64µs | __PACKAGE__ | ||
| 42 | |||||
| 43 | 1 | 91µs | 1 | 4.22ms | __END__ # spent 4.22ms making 1 call to B::Hooks::EndOfScope::__ANON__[B/Hooks/EndOfScope.pm:26] |