| File | /usr/local/lib/perl5/site_perl/5.10.1/URI/http.pm |
| Statements Executed | 24 |
| Statement Execution Time | 330µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 3 | 1 | 1 | 109µs | 583µs | URI::http::canonical |
| 1 | 1 | 1 | 17µs | 23µs | URI::http::BEGIN@6 |
| 3 | 1 | 1 | 6µs | 6µs | URI::http::default_port |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package URI::http; | ||||
| 2 | |||||
| 3 | 1 | 85µs | require URI::_server; | ||
| 4 | 1 | 6µs | @ISA=qw(URI::_server); | ||
| 5 | |||||
| 6 | 3 | 128µs | 2 | 29µs | # spent 23µs (17+6) within URI::http::BEGIN@6 which was called
# once (17µs+6µs) by URI::implementor at line 6 # spent 23µs making 1 call to URI::http::BEGIN@6
# spent 6µs making 1 call to strict::import |
| 7 | |||||
| 8 | 3 | 9µs | # spent 6µs within URI::http::default_port which was called 3 times, avg 2µs/call:
# 3 times (6µs+0s) by URI::_server::port at line 123 of URI/_server.pm, avg 2µs/call | ||
| 9 | |||||
| 10 | sub canonical | ||||
| 11 | # spent 583µs (109+474) within URI::http::canonical which was called 3 times, avg 194µs/call:
# 3 times (109µs+474µs) by HTTP::Request::uri_canonical at line 93 of HTTP/Request.pm, avg 194µs/call | ||||
| 12 | 15 | 99µs | my $self = shift; | ||
| 13 | my $other = $self->SUPER::canonical; # spent 411µs making 3 calls to URI::_server::canonical, avg 137µs/call | ||||
| 14 | |||||
| 15 | my $slash_path = defined($other->authority) && # spent 36µs making 3 calls to URI::_generic::path, avg 12µs/call
# spent 26µs making 3 calls to URI::_generic::authority, avg 9µ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 | |||||
| 25 | 1 | 3µs | 1; |