← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Wed Dec 14 16:10:05 2022
Reported on Wed Dec 14 16:12:58 2022

Filename/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/YAML/PP/Writer.pm
StatementsExecuted 12 statements in 316µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11134µs40µsYAML::PP::Dumper::::BEGIN@2.297YAML::PP::Dumper::BEGIN@2.297
1119µs47µsYAML::PP::Dumper::::BEGIN@3YAML::PP::Dumper::BEGIN@3
1114µs6µsYAML::PP::Writer::::initYAML::PP::Writer::init
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
2240µs246µs
# spent 40µs (34+6) within YAML::PP::Dumper::BEGIN@2.297 which was called: # once (34µs+6µs) by YAML::PP::Dumper::BEGIN@11 at line 2
use strict;
# spent 40µs making 1 call to YAML::PP::Dumper::BEGIN@2.297 # spent 6µs making 1 call to strict::import
32260µs285µs
# spent 47µs (9+38) within YAML::PP::Dumper::BEGIN@3 which was called: # once (9µs+38µs) by YAML::PP::Dumper::BEGIN@11 at line 3
use warnings;
# spent 47µs making 1 call to YAML::PP::Dumper::BEGIN@3 # spent 38µs making 1 call to warnings::import
4package YAML::PP::Writer;
5
611µsour $VERSION = '0.035'; # VERSION
7
8sub output { return $_[0]->{output} }
913µ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 {
1210s 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 6µs (4+2) within YAML::PP::Writer::init which was called: # once (4µ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
3414µs1;
35
36__END__