← Index
NYTProf Performance Profile   « block view • line view • sub view »
For 05.Domain_and_Item.t
  Run on Tue May 4 17:21:41 2010
Reported on Tue May 4 17:22:20 2010

File /usr/local/lib/perl5/site_perl/5.10.1/URI/http.pm
Statements Executed 252
Statement Execution Time 1.15ms
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
4111971µs7.01msURI::http::::canonicalURI::http::canonical
411170µs70µsURI::http::::default_portURI::http::default_port
11114µs17µsURI::http::::BEGIN@6URI::http::BEGIN@6
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package URI::http;
2
3192µsrequire URI::_server;
415µs@ISA=qw(URI::_server);
5
6392µs220µs
# spent 17µs (14+3) within URI::http::BEGIN@6 which was called # once (14µs+3µs) by URI::implementor at line 6
use strict;
# spent 17µs making 1 call to URI::http::BEGIN@6 # spent 3µs making 1 call to strict::import
7
841105µs
# spent 70µs within URI::http::default_port which was called 41 times, avg 2µs/call: # 41 times (70µs+0s) by URI::_server::port at line 123 of URI/_server.pm, avg 2µs/call
sub default_port { 80 }
9
10sub canonical
11
# spent 7.01ms (971µs+6.04) within URI::http::canonical which was called 41 times, avg 171µs/call: # 41 times (971µs+6.04ms) by HTTP::Request::uri_canonical at line 93 of HTTP/Request.pm, avg 171µs/call
{
12205854µs my $self = shift;
13 my $other = $self->SUPER::canonical;
# spent 5.24ms making 41 calls to URI::_server::canonical, avg 128µs/call
14
15 my $slash_path = defined($other->authority) &&
# spent 464µs making 41 calls to URI::_generic::path, avg 11µs/call # spent 338µs making 41 calls to URI::_generic::authority, avg 8µs/call
16 !length($other->path) && !defined($other->query);
17
18 if ($slash_path) {
19 $other = $other->clone if $other == $self;
20 $other->path("/");
21 }
22 $other;
23}
24
2513µs1;