← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Wed Dec 14 15:57:08 2022
Reported on Wed Dec 14 16:00:37 2022

Filename/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/YAML/PP/Writer.pm
StatementsExecuted 12 statements in 287µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11130µs34µsYAML::PP::Dumper::::BEGIN@2.296YAML::PP::Dumper::BEGIN@2.296
1117µs44µsYAML::PP::Dumper::::BEGIN@3YAML::PP::Dumper::BEGIN@3
1115µs8µsYAML::PP::Writer::::initYAML::PP::Writer::init
1114µs4µsYAML::PP::Writer::::newYAML::PP::Writer::new
1113µs3µ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
2233µs238µs
# spent 34µs (30+4) within YAML::PP::Dumper::BEGIN@2.296 which was called: # once (30µs+4µs) by YAML::PP::Dumper::BEGIN@11 at line 2
use strict;
# spent 34µs making 1 call to YAML::PP::Dumper::BEGIN@2.296 # spent 4µs making 1 call to strict::import
32236µs281µs
# spent 44µs (7+37) within YAML::PP::Dumper::BEGIN@3 which was called: # once (7µs+37µs) by YAML::PP::Dumper::BEGIN@11 at line 3
use warnings;
# spent 44µs making 1 call to YAML::PP::Dumper::BEGIN@3 # spent 37µs making 1 call to warnings::import
4package YAML::PP::Writer;
5
610sour $VERSION = '0.035'; # VERSION
7
8sub output { return $_[0]->{output} }
915µs
# spent 3µs within YAML::PP::Writer::set_output which was called: # once (3µ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 {
1210s my ($class, %args) = @_;
1310s my $output = delete $args{output};
1411µs $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 8µs (5+3) within YAML::PP::Writer::init which was called: # once (5µs+3µs) by YAML::PP::Emitter::init at line 60 of YAML/PP/Emitter.pm
sub init {
2615µs13µs $_[0]->set_output('');
# spent 3µ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__