Filename | /usr/share/perl/5.18/SelectSaver.pm |
Statements | Executed 21 statements in 235µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
2 | 1 | 1 | 35µs | 56µs | new | SelectSaver::
6 | 3 | 1 | 20µs | 20µs | CORE:select (opcode) | SelectSaver::
1 | 1 | 1 | 15µs | 56µs | BEGIN@6 | SelectSaver::
2 | 1 | 1 | 12µs | 12µs | DESTROY | SelectSaver::
1 | 1 | 1 | 8µs | 43µs | BEGIN@7 | SelectSaver::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package SelectSaver; | ||||
2 | |||||
3 | 1 | 700ns | our $VERSION = '1.02'; | ||
4 | |||||
5 | 1 | 9µs | require 5.000; | ||
6 | 2 | 29µs | 2 | 98µs | # spent 56µs (15+41) within SelectSaver::BEGIN@6 which was called:
# once (15µs+41µs) by IO::Handle::BEGIN@8 at line 6 # spent 56µs making 1 call to SelectSaver::BEGIN@6
# spent 41µs making 1 call to Exporter::import |
7 | 2 | 128µs | 2 | 78µs | # spent 43µs (8+35) within SelectSaver::BEGIN@7 which was called:
# once (8µs+35µs) by IO::Handle::BEGIN@8 at line 7 # spent 43µs making 1 call to SelectSaver::BEGIN@7
# spent 35µs making 1 call to Exporter::import |
8 | |||||
9 | # spent 56µs (35+22) within SelectSaver::new which was called 2 times, avg 28µs/call:
# 2 times (35µs+22µs) by IO::Handle::autoflush at line 236 of IO/Handle.pm, avg 28µs/call | ||||
10 | 2 | 2µs | @_ >= 1 && @_ <= 2 or croak 'usage: SelectSaver->new( [FILEHANDLE] )'; | ||
11 | 2 | 12µs | 2 | 4µs | my $fh = select; # spent 4µs making 2 calls to SelectSaver::CORE:select, avg 2µs/call |
12 | 2 | 3µs | my $self = bless \$fh, $_[0]; | ||
13 | 2 | 28µs | 4 | 18µs | select qualify($_[1], caller) if @_ > 1; # spent 15µs making 2 calls to SelectSaver::CORE:select, avg 8µs/call
# spent 3µs making 2 calls to Symbol::qualify, avg 1µs/call |
14 | 2 | 6µs | $self; | ||
15 | } | ||||
16 | |||||
17 | # spent 12µs (12+900ns) within SelectSaver::DESTROY which was called 2 times, avg 6µs/call:
# 2 times (12µs+900ns) by IO::Handle::autoflush at line 44 of IO/Socket.pm, avg 6µs/call | ||||
18 | 2 | 700ns | my $self = $_[0]; | ||
19 | 2 | 13µs | 2 | 900ns | select $$self; # spent 900ns making 2 calls to SelectSaver::CORE:select, avg 450ns/call |
20 | } | ||||
21 | |||||
22 | 1 | 3µs | 1; | ||
sub SelectSaver::CORE:select; # opcode |