← Index
NYTProf Performance Profile   « line view »
For /usr/local/bin/sa-learn
  Run on Tue Nov 7 05:38:10 2017
Reported on Tue Nov 7 06:16:06 2017

Filename/usr/local/lib/perl5/site_perl/Net/DNS/RR/A.pm
StatementsExecuted 11 statements in 784µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11156µs74µsNet::DNS::RR::A::::BEGIN@9Net::DNS::RR::A::BEGIN@9
11133µs50µsNet::DNS::RR::A::::BEGIN@20Net::DNS::RR::A::BEGIN@20
11125µs253µsNet::DNS::RR::A::::BEGIN@11Net::DNS::RR::A::BEGIN@11
11121µs58µsNet::DNS::RR::A::::BEGIN@10Net::DNS::RR::A::BEGIN@10
0000s0sNet::DNS::RR::A::::_decode_rdataNet::DNS::RR::A::_decode_rdata
0000s0sNet::DNS::RR::A::::_encode_rdataNet::DNS::RR::A::_encode_rdata
0000s0sNet::DNS::RR::A::::_format_rdataNet::DNS::RR::A::_format_rdata
0000s0sNet::DNS::RR::A::::_parse_rdataNet::DNS::RR::A::_parse_rdata
0000s0sNet::DNS::RR::A::::addressNet::DNS::RR::A::address
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Net::DNS::RR::A;
2
3#
4# $Id: A.pm 1597 2017-09-22 08:04:02Z willem $
5#
615µsour $VERSION = (qw$LastChangedRevision: 1597 $)[1];
7
8
9282µs292µs
# spent 74µs (56+18) within Net::DNS::RR::A::BEGIN@9 which was called: # once (56µs+18µs) by Net::DNS::RR::OPT::CLIENT_SUBNET::BEGIN@240 at line 9
use strict;
# spent 74µs making 1 call to Net::DNS::RR::A::BEGIN@9 # spent 18µs making 1 call to strict::import
10270µs295µs
# spent 58µs (21+37) within Net::DNS::RR::A::BEGIN@10 which was called: # once (21µs+37µs) by Net::DNS::RR::OPT::CLIENT_SUBNET::BEGIN@240 at line 10
use warnings;
# spent 58µs making 1 call to Net::DNS::RR::A::BEGIN@10 # spent 37µs making 1 call to warnings::import
11296µs2481µs
# spent 253µs (25+228) within Net::DNS::RR::A::BEGIN@11 which was called: # once (25µs+228µs) by Net::DNS::RR::OPT::CLIENT_SUBNET::BEGIN@240 at line 11
use base qw(Net::DNS::RR);
# spent 253µs making 1 call to Net::DNS::RR::A::BEGIN@11 # spent 228µs making 1 call to base::import
12
13=head1 NAME
14
15Net::DNS::RR::A - DNS A resource record
16
17=cut
18
19
202518µs266µs
# spent 50µs (33+17) within Net::DNS::RR::A::BEGIN@20 which was called: # once (33µs+17µs) by Net::DNS::RR::OPT::CLIENT_SUBNET::BEGIN@240 at line 20
use integer;
# spent 50µs making 1 call to Net::DNS::RR::A::BEGIN@20 # spent 17µs making 1 call to integer::import
21
22
23sub _decode_rdata { ## decode rdata from wire-format octet string
24 my $self = shift;
25 my ( $data, $offset ) = @_;
26
27 $self->{address} = unpack "\@$offset a4", $$data;
28}
29
30
31sub _encode_rdata { ## encode rdata as wire-format octet string
32 my $self = shift;
33
34 pack 'a4', $self->{address};
35}
36
37
38sub _format_rdata { ## format rdata portion of RR string.
39 my $self = shift;
40
41 $self->address;
42}
43
44
45sub _parse_rdata { ## populate RR from rdata in argument list
46 my $self = shift;
47
48 $self->address(shift);
49}
50
51
5212µs14µsmy $pad = pack 'x4';
# spent 4µs making 1 call to main::CORE:pack
53
54sub address {
55 my $self = shift;
56 my $addr = shift;
57
58 return join '.', unpack 'C4', $self->{address} . $pad unless defined $addr;
59
60 # Note: pack masks overlarge values, mostly without warning
61 my @part = split /\./, $addr;
62 my $last = pop(@part);
63 $self->{address} = pack 'C4', @part, (0) x ( 3 - @part ), $last;
64}
65
66
67110µs1;
68__END__