Filename | /usr/local/lib/perl/5.14.2/MongoDB/Connection.pm |
Statements | Executed 124 statements in 893µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 2.20ms | 73.4ms | BEGIN@28 | MongoDB::Connection::
1 | 1 | 1 | 1.76ms | 298ms | BEGIN@24 | MongoDB::Connection::
1 | 1 | 1 | 1.13ms | 52.8ms | BEGIN@27 | MongoDB::Connection::
1 | 1 | 1 | 10µs | 10µs | BEGIN@30 | MongoDB::Connection::
1 | 1 | 1 | 10µs | 42µs | BEGIN@34 | MongoDB::Connection::
1 | 1 | 1 | 9µs | 9µs | BEGIN@26 | MongoDB::Connection::
1 | 1 | 1 | 6µs | 23µs | BEGIN@31 | MongoDB::Connection::
1 | 1 | 1 | 6µs | 30µs | BEGIN@33 | MongoDB::Connection::
1 | 1 | 1 | 4µs | 4µs | BEGIN@32 | MongoDB::Connection::
0 | 0 | 0 | 0s | 0s | AUTOLOAD | MongoDB::Connection::
0 | 0 | 0 | 0s | 0s | __ANON__[:49] | MongoDB::Connection::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # | ||||
2 | # Copyright 2009-2013 MongoDB, Inc. | ||||
3 | # | ||||
4 | # Licensed under the Apache License, Version 2.0 (the "License"); | ||||
5 | # you may not use this file except in compliance with the License. | ||||
6 | # You may obtain a copy of the License at | ||||
7 | # | ||||
8 | # http://www.apache.org/licenses/LICENSE-2.0 | ||||
9 | # | ||||
10 | # Unless required by applicable law or agreed to in writing, software | ||||
11 | # distributed under the License is distributed on an "AS IS" BASIS, | ||||
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
13 | # See the License for the specific language governing permissions and | ||||
14 | # limitations under the License. | ||||
15 | # | ||||
16 | |||||
17 | package MongoDB::Connection; | ||||
18 | { | ||||
19 | 2 | 1µs | $MongoDB::Connection::VERSION = '0.702.2'; | ||
20 | } | ||||
21 | |||||
22 | # ABSTRACT: A connection to a MongoDB server (DEPRECATED) | ||||
23 | |||||
24 | 2 | 82µs | 2 | 302ms | # spent 298ms (1.76+296) within MongoDB::Connection::BEGIN@24 which was called:
# once (1.76ms+296ms) by MongoDB::BEGIN@28 at line 24 # spent 298ms making 1 call to MongoDB::Connection::BEGIN@24
# spent 4.61ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:519] |
25 | |||||
26 | 2 | 26µs | 1 | 9µs | # spent 9µs within MongoDB::Connection::BEGIN@26 which was called:
# once (9µs+0s) by MongoDB::BEGIN@28 at line 26 # spent 9µs making 1 call to MongoDB::Connection::BEGIN@26 |
27 | 2 | 119µs | 1 | 52.8ms | # spent 52.8ms (1.13+51.6) within MongoDB::Connection::BEGIN@27 which was called:
# once (1.13ms+51.6ms) by MongoDB::BEGIN@28 at line 27 # spent 52.8ms making 1 call to MongoDB::Connection::BEGIN@27 |
28 | 2 | 135µs | 1 | 73.4ms | # spent 73.4ms (2.20+71.2) within MongoDB::Connection::BEGIN@28 which was called:
# once (2.20ms+71.2ms) by MongoDB::BEGIN@28 at line 28 # spent 73.4ms making 1 call to MongoDB::Connection::BEGIN@28 |
29 | |||||
30 | 2 | 27µs | 1 | 10µs | # spent 10µs within MongoDB::Connection::BEGIN@30 which was called:
# once (10µs+0s) by MongoDB::BEGIN@28 at line 30 # spent 10µs making 1 call to MongoDB::Connection::BEGIN@30 |
31 | 2 | 22µs | 2 | 39µs | # spent 23µs (6+16) within MongoDB::Connection::BEGIN@31 which was called:
# once (6µs+16µs) by MongoDB::BEGIN@28 at line 31 # spent 23µs making 1 call to MongoDB::Connection::BEGIN@31
# spent 16µs making 1 call to Exporter::import |
32 | 2 | 21µs | 1 | 4µs | # spent 4µs within MongoDB::Connection::BEGIN@32 which was called:
# once (4µs+0s) by MongoDB::BEGIN@28 at line 32 # spent 4µs making 1 call to MongoDB::Connection::BEGIN@32 |
33 | 2 | 21µs | 2 | 54µs | # spent 30µs (6+24) within MongoDB::Connection::BEGIN@33 which was called:
# once (6µs+24µs) by MongoDB::BEGIN@28 at line 33 # spent 30µs making 1 call to MongoDB::Connection::BEGIN@33
# spent 24µs making 1 call to Exporter::import |
34 | 2 | 209µs | 2 | 47µs | # spent 42µs (10+33) within MongoDB::Connection::BEGIN@34 which was called:
# once (10µs+33µs) by MongoDB::BEGIN@28 at line 34 # spent 42µs making 1 call to MongoDB::Connection::BEGIN@34
# spent 5µs making 1 call to boolean::import |
35 | |||||
36 | |||||
37 | 49 | 80µs | 49 | 25µs | has '_client' => ( # spent 25µs making 49 calls to MongoDB::Connection::CORE:match, avg 508ns/call |
38 | isa => 'MongoDB::MongoClient', | ||||
39 | is => 'ro', | ||||
40 | 49 | 91µs | 49 | 21µs | handles => [ grep { $_ !~ /^(meta|new)$/ } # spent 21µs making 49 calls to Class::MOP::Method::name, avg 420ns/call |
41 | 1 | 31µs | 3 | 11.7ms | map { $_->name } Class::MOP::Class->initialize( 'MongoDB::MongoClient' )->get_all_methods # spent 7.96ms making 1 call to Moose::has
# spent 3.73ms making 1 call to Class::MOP::Class::Immutable::Moose::Meta::Class::get_all_methods
# spent 9µs making 1 call to Class::MOP::Class::initialize |
42 | ] | ||||
43 | ); | ||||
44 | |||||
45 | |||||
46 | around 'new' => sub { | ||||
47 | 2 | 8µs | my ( $orig, $self, @args ) = @_; | ||
48 | 2 | 8.66ms | return $self->$orig( _client => MongoDB::MongoClient->new( @args ) ); # spent 8.37ms making 1 call to MongoDB::MongoClient::new
# spent 291µs making 1 call to Moose::Object::new | ||
49 | 1 | 4µs | 1 | 261µs | }; # spent 261µs making 1 call to Moose::around |
50 | |||||
- - | |||||
53 | sub AUTOLOAD { | ||||
54 | my $self = shift @_; | ||||
55 | our $AUTOLOAD; | ||||
56 | |||||
57 | my $db = $AUTOLOAD; | ||||
58 | $db =~ s/.*:://; | ||||
59 | |||||
60 | carp sprintf q{AUTOLOADed database method names are deprecated and will be removed in a future release. Use $client->get_database( '%s' ) instead.}, $db; | ||||
61 | |||||
62 | return $self->get_database($db); | ||||
63 | } | ||||
64 | |||||
- - | |||||
67 | 1 | 3µs | 2 | 129µs | __PACKAGE__->meta->make_immutable ( inline_destructor => 0, inline_constructor => 0 ); # spent 116µs making 1 call to Class::MOP::Class::make_immutable
# spent 13µs making 1 call to MongoDB::Connection::meta |
68 | |||||
69 | 1 | 11µs | 1; | ||
70 | |||||
71 | __END__ |