← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Wed Dec 14 15:33:55 2022
Reported on Wed Dec 14 15:40:04 2022

Filename/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/YAML/PP/Writer.pm
StatementsExecuted 12 statements in 255µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11124µs26µsYAML::PP::Dumper::::BEGIN@2.296YAML::PP::Dumper::BEGIN@2.296
1119µs11µsYAML::PP::Writer::::initYAML::PP::Writer::init
1115µs37µsYAML::PP::Dumper::::BEGIN@3YAML::PP::Dumper::BEGIN@3
1114µs4µsYAML::PP::Writer::::newYAML::PP::Writer::new
1112µs2µsYAML::PP::Writer::::set_outputYAML::PP::Writer::set_output
0000s0sYAML::PP::Writer::::finishYAML::PP::Writer::finish
0000s0sYAML::PP::Writer::::outputYAML::PP::Writer::output
0000s0sYAML::PP::Writer::::writeYAML::PP::Writer::write
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# ABSTRACT: Writer class for YAML::PP representing output data
2229µs228µs
# spent 26µs (24+2) within YAML::PP::Dumper::BEGIN@2.296 which was called: # once (24µs+2µs) by YAML::PP::Dumper::BEGIN@11 at line 2
use strict;
# spent 26µs making 1 call to YAML::PP::Dumper::BEGIN@2.296 # spent 2µs making 1 call to strict::import
32205µs269µs
# spent 37µs (5+32) within YAML::PP::Dumper::BEGIN@3 which was called: # once (5µs+32µs) by YAML::PP::Dumper::BEGIN@11 at line 3
use warnings;
# spent 37µs making 1 call to YAML::PP::Dumper::BEGIN@3 # spent 32µs making 1 call to warnings::import
4package YAML::PP::Writer;
5
610sour $VERSION = '0.035'; # VERSION
7
8sub output { return $_[0]->{output} }
919µs
# spent 2µs within YAML::PP::Writer::set_output which was called: # once (2µs+0s) by YAML::PP::Writer::init at line 26
sub set_output { $_[0]->{output} = $_[1] }
10
11
# spent 4µs within YAML::PP::Writer::new which was called: # once (4µs+0s) by YAML::PP::Emitter::init at line 51 of YAML/PP/Emitter.pm
sub new {
1211µs my ($class, %args) = @_;
1310s my $output = delete $args{output};
1410s $output = '' unless defined $output;
1514µs return bless {
16 output => $output,
17 }, $class;
18}
19
20sub write {
21 my ($self, $line) = @_;
22 $self->{output} .= $line;
23}
24
25
# spent 11µs (9+2) within YAML::PP::Writer::init which was called: # once (9µs+2µs) by YAML::PP::Emitter::init at line 60 of YAML/PP/Emitter.pm
sub init {
2614µs12µs $_[0]->set_output('');
# spent 2µs making 1 call to YAML::PP::Writer::set_output
27}
28
29sub finish {
30 my ($self) = @_;
31 $_[0]->set_output(undef);
32}
33
3413µs1;
35
36__END__