← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Thu Dec 15 15:23:56 2022
Reported on Thu Dec 15 15:27:04 2022

Filename/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/YAML/PP/Writer.pm
StatementsExecuted 12 statements in 212µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11124µs26µsYAML::PP::Dumper::::BEGIN@2.297YAML::PP::Dumper::BEGIN@2.297
1114µs4µsYAML::PP::Writer::::newYAML::PP::Writer::new
1113µs21µsYAML::PP::Dumper::::BEGIN@3YAML::PP::Dumper::BEGIN@3
1113µs6µsYAML::PP::Writer::::initYAML::PP::Writer::init
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
2225µs228µs
# spent 26µs (24+2) within YAML::PP::Dumper::BEGIN@2.297 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.297 # spent 2µs making 1 call to strict::import
32168µs239µs
# spent 21µs (3+18) within YAML::PP::Dumper::BEGIN@3 which was called: # once (3µs+18µs) by YAML::PP::Dumper::BEGIN@11 at line 3
use warnings;
# spent 21µs making 1 call to YAML::PP::Dumper::BEGIN@3 # spent 18µs making 1 call to warnings::import
4package YAML::PP::Writer;
5
610sour $VERSION = '0.035'; # VERSION
7
8sub output { return $_[0]->{output} }
913µ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 {
1211µs my ($class, %args) = @_;
1310s my $output = delete $args{output};
1411µs $output = '' unless defined $output;
1513µs return bless {
16 output => $output,
17 }, $class;
18}
19
20sub write {
21 my ($self, $line) = @_;
22 $self->{output} .= $line;
23}
24
25
# spent 6µs (3+3) within YAML::PP::Writer::init which was called: # once (3µs+3µs) by YAML::PP::Emitter::init at line 60 of YAML/PP/Emitter.pm
sub init {
2613µ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
3418µs1;
35
36__END__