Profile of Stream/Buffered/File.pm

← Index
NYTProf Performance Profile «line view»
For script/ponapi
Run on Wed Feb 10 15:51:26 2016
Reported on Thu Feb 11 09:43:10 2016

Filename | /usr/local/share/perl/5.18.2/Stream/Buffered/File.pm
Statements | Executed 9 statements in 178µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 8µs | 17µs | Stream::Buffered::File::::BEGIN@2Stream::Buffered::File::BEGIN@2
1 | 1 | 1 | 8µs | 108µs | Stream::Buffered::File::::BEGIN@6Stream::Buffered::File::BEGIN@6
1 | 1 | 1 | 7µs | 10µs | Stream::Buffered::File::::BEGIN@3Stream::Buffered::File::BEGIN@3
1 | 1 | 1 | 5µs | 52µs | Stream::Buffered::File::::BEGIN@4Stream::Buffered::File::BEGIN@4
0 | 0 | 0 | 0s | 0s | Stream::Buffered::File::::newStream::Buffered::File::new
0 | 0 | 0 | 0s | 0s | Stream::Buffered::File::::printStream::Buffered::File::print
0 | 0 | 0 | 0s | 0s | Stream::Buffered::File::::rewindStream::Buffered::File::rewind
0 | 0 | 0 | 0s | 0s | Stream::Buffered::File::::sizeStream::Buffered::File::size

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package Stream::Buffered::File;
2 | 2 | 19µs | 2 | 26µs | # spent 17µs (8+9) within Stream::Buffered::File::BEGIN@2 which was called: # once (8µs+9µs) by Stream::Buffered::BEGIN@7 at line 2 use strict; # spent 17µs making 1 call to Stream::Buffered::File::BEGIN@2 # spent 9µs making 1 call to strict::import
3 | 2 | 21µs | 2 | 14µs | # spent 10µs (7+3) within Stream::Buffered::File::BEGIN@3 which was called: # once (7µs+3µs) by Stream::Buffered::BEGIN@7 at line 3 use warnings; # spent 10µs making 1 call to Stream::Buffered::File::BEGIN@3 # spent 3µs making 1 call to warnings::import
4 | 2 | 21µs | 2 | 98µs | # spent 52µs (5+47) within Stream::Buffered::File::BEGIN@4 which was called: # once (5µs+47µs) by Stream::Buffered::BEGIN@7 at line 4 use base 'Stream::Buffered'; # spent 52µs making 1 call to Stream::Buffered::File::BEGIN@4 # spent 47µs making 1 call to base::import
5 |  |  |  |  |
6 | 2 | 115µs | 2 | 208µs | # spent 108µs (8+100) within Stream::Buffered::File::BEGIN@6 which was called: # once (8µs+100µs) by Stream::Buffered::BEGIN@7 at line 6 use IO::File; # spent 108µs making 1 call to Stream::Buffered::File::BEGIN@6 # spent 100µs making 1 call to Exporter::import
7 |  |  |  |  |
8 |  |  |  |  | sub new {
9 |  |  |  |  | my $class = shift;
10 |  |  |  |  |
11 |  |  |  |  | my $fh = IO::File->new_tmpfile;
12 |  |  |  |  | $fh->binmode;
13 |  |  |  |  |
14 |  |  |  |  | bless { fh => $fh }, $class;
15 |  |  |  |  | }
16 |  |  |  |  |
17 |  |  |  |  | sub print {
18 |  |  |  |  | my $self = shift;
19 |  |  |  |  | $self->{fh}->print(@_);
20 |  |  |  |  | }
21 |  |  |  |  |
22 |  |  |  |  | sub size {
23 |  |  |  |  | my $self = shift;
24 |  |  |  |  | $self->{fh}->flush;
25 |  |  |  |  | -s $self->{fh};
26 |  |  |  |  | }
27 |  |  |  |  |
28 |  |  |  |  | sub rewind {
29 |  |  |  |  | my $self = shift;
30 |  |  |  |  | $self->{fh}->seek(0, 0);
31 |  |  |  |  | $self->{fh};
32 |  |  |  |  | }
33 |  |  |  |  |
34 | 1 | 2µs |  |  | 1;