← 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/PerlIO.pm
StatementsExecuted 7 statements in 147µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1118µs17µsStream::Buffered::PerlIO::::BEGIN@2Stream::Buffered::PerlIO::BEGIN@2
1116µs9µsStream::Buffered::PerlIO::::BEGIN@3Stream::Buffered::PerlIO::BEGIN@3
1115µs54µsStream::Buffered::PerlIO::::BEGIN@4Stream::Buffered::PerlIO::BEGIN@4
0000s0sStream::Buffered::PerlIO::::newStream::Buffered::PerlIO::new
0000s0sStream::Buffered::PerlIO::::printStream::Buffered::PerlIO::print
0000s0sStream::Buffered::PerlIO::::rewindStream::Buffered::PerlIO::rewind
0000s0sStream::Buffered::PerlIO::::sizeStream::Buffered::PerlIO::size
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Stream::Buffered::PerlIO;
2218µs226µs
# spent 17µs (8+9) within Stream::Buffered::PerlIO::BEGIN@2 which was called: # once (8µs+9µs) by Stream::Buffered::BEGIN@8 at line 2
use strict;
# spent 17µs making 1 call to Stream::Buffered::PerlIO::BEGIN@2 # spent 9µs making 1 call to strict::import
3218µs212µs
# spent 9µs (6+3) within Stream::Buffered::PerlIO::BEGIN@3 which was called: # once (6µs+3µs) by Stream::Buffered::BEGIN@8 at line 3
use warnings;
# spent 9µs making 1 call to Stream::Buffered::PerlIO::BEGIN@3 # spent 3µs making 1 call to warnings::import
42109µs2102µs
# spent 54µs (5+49) within Stream::Buffered::PerlIO::BEGIN@4 which was called: # once (5µs+49µs) by Stream::Buffered::BEGIN@8 at line 4
use base 'Stream::Buffered';
# spent 54µs making 1 call to Stream::Buffered::PerlIO::BEGIN@4 # spent 49µs making 1 call to base::import
5
6sub new {
7 my $class = shift;
8 bless { buffer => '' }, $class;
9}
10
11sub print {
12 my $self = shift;
13 $self->{buffer} .= "@_";
14}
15
16sub size {
17 my $self = shift;
18 length $self->{buffer};
19}
20
21sub rewind {
22 my $self = shift;
23 my $buffer = $self->{buffer};
24 open my $io, "<", \$buffer;
25 bless $io, 'FileHandle'; # This makes $io work as FileHandle under 5.8, .10 and .11 :/
26 return $io;
27}
28
2912µs1;