Filename | /usr/share/perl5/IO/CaptureOutput.pm |
Statements | Executed 1366642 statements in 368s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
13945 | 1 | 1 | 349s | 349s | CORE:system (opcode) | IO::CaptureOutput::
27890 | 1 | 1 | 6.61s | 6.61s | CORE:unlink (opcode) | IO::CaptureOutput::_proxy::
27890 | 1 | 1 | 2.61s | 13.8s | DESTROY | IO::CaptureOutput::_proxy::
13945 | 1 | 1 | 1.98s | 380s | _capture | IO::CaptureOutput::
27890 | 2 | 1 | 1.92s | 14.1s | new | IO::CaptureOutput::_proxy::
111560 | 4 | 1 | 1.65s | 1.65s | CORE:open (opcode) | IO::CaptureOutput::_proxy::
27890 | 1 | 1 | 1.61s | 1.61s | CORE:close (opcode) | IO::CaptureOutput::_proxy::
13945 | 1 | 1 | 1.16s | 350s | __ANON__[:74] | IO::CaptureOutput::
27890 | 1 | 1 | 899ms | 899ms | CORE:readline (opcode) | IO::CaptureOutput::_proxy::
13945 | 7 | 3 | 505ms | 380s | capture_exec | IO::CaptureOutput::
27890 | 1 | 1 | 353ms | 353ms | CORE:ftis (opcode) | IO::CaptureOutput::_proxy::
55780 | 1 | 1 | 113ms | 113ms | CORE:select (opcode) | IO::CaptureOutput::_proxy::
27890 | 1 | 1 | 101ms | 101ms | CORE:seek (opcode) | IO::CaptureOutput::_proxy::
13945 | 1 | 1 | 99.8ms | 99.8ms | _validate | IO::CaptureOutput::
27890 | 1 | 1 | 93.1ms | 93.1ms | _is_wperl | IO::CaptureOutput::_proxy::
13945 | 1 | 1 | 48.8ms | 48.8ms | __ANON__[:94] | IO::CaptureOutput::
1 | 1 | 1 | 7.10ms | 9.73ms | BEGIN@138 | IO::CaptureOutput::_proxy::
1 | 1 | 1 | 19µs | 48µs | BEGIN@139 | IO::CaptureOutput::_proxy::
1 | 1 | 1 | 13µs | 15µs | BEGIN@1.4 | RBM::
1 | 1 | 1 | 10µs | 58µs | BEGIN@9 | IO::CaptureOutput::
1 | 1 | 1 | 8µs | 49µs | BEGIN@11 | IO::CaptureOutput::
1 | 1 | 1 | 7µs | 22µs | BEGIN@154 | IO::CaptureOutput::_proxy::
1 | 1 | 1 | 6µs | 36µs | BEGIN@141 | IO::CaptureOutput::_proxy::
1 | 1 | 1 | 6µs | 43µs | BEGIN@140 | IO::CaptureOutput::_proxy::
1 | 1 | 1 | 6µs | 19µs | BEGIN@10 | IO::CaptureOutput::
1 | 1 | 1 | 6µs | 13µs | BEGIN@178 | IO::CaptureOutput::_proxy::
1 | 1 | 1 | 6µs | 28µs | BEGIN@2.5 | RBM::
1 | 1 | 1 | 900ns | 900ns | CORE:match (opcode) | IO::CaptureOutput::
0 | 0 | 0 | 0s | 0s | __ANON__[:85] | IO::CaptureOutput::
0 | 0 | 0 | 0s | 0s | _shell_quote_win32 | IO::CaptureOutput::
0 | 0 | 0 | 0s | 0s | capture | IO::CaptureOutput::
0 | 0 | 0 | 0s | 0s | capture_exec_combined | IO::CaptureOutput::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | 2 | 21µs | 2 | 18µs | # spent 15µs (13+2) within RBM::BEGIN@1.4 which was called:
# once (13µs+2µs) by RBM::BEGIN@12 at line 1 # spent 15µs making 1 call to RBM::BEGIN@1.4
# spent 2µs making 1 call to strict::import |
2 | 2 | 42µs | 2 | 51µs | # spent 28µs (6+23) within RBM::BEGIN@2.5 which was called:
# once (6µs+23µs) by RBM::BEGIN@12 at line 2 # spent 28µs making 1 call to RBM::BEGIN@2.5
# spent 23µs making 1 call to warnings::import |
3 | |||||
4 | package IO::CaptureOutput; | ||||
5 | # ABSTRACT: capture STDOUT and STDERR from Perl code, subprocesses or XS | ||||
6 | |||||
7 | 1 | 1µs | our $VERSION = '1.1104'; | ||
8 | |||||
9 | 2 | 26µs | 2 | 107µs | # spent 58µs (10+49) within IO::CaptureOutput::BEGIN@9 which was called:
# once (10µs+49µs) by RBM::BEGIN@12 at line 9 # spent 58µs making 1 call to IO::CaptureOutput::BEGIN@9
# spent 49µs making 1 call to vars::import |
10 | 2 | 21µs | 2 | 31µs | # spent 19µs (6+12) within IO::CaptureOutput::BEGIN@10 which was called:
# once (6µs+12µs) by RBM::BEGIN@12 at line 10 # spent 19µs making 1 call to IO::CaptureOutput::BEGIN@10
# spent 12µs making 1 call to Exporter::import |
11 | 2 | 612µs | 2 | 90µs | # spent 49µs (8+41) within IO::CaptureOutput::BEGIN@11 which was called:
# once (8µs+41µs) by RBM::BEGIN@12 at line 11 # spent 49µs making 1 call to IO::CaptureOutput::BEGIN@11
# spent 41µs making 1 call to Exporter::import |
12 | 1 | 8µs | @ISA = 'Exporter'; | ||
13 | 1 | 2µs | @EXPORT_OK = qw/capture capture_exec qxx capture_exec_combined qxy/; | ||
14 | 1 | 1µs | %EXPORT_TAGS = (all => \@EXPORT_OK); | ||
15 | 1 | 500ns | $CarpLevel = 0; # help capture report errors at the right level | ||
16 | |||||
17 | # spent 380s (1.98+378) within IO::CaptureOutput::_capture which was called 13945 times, avg 27.2ms/call:
# 13945 times (1.98s+378s) by IO::CaptureOutput::capture_exec at line 74, avg 27.2ms/call | ||||
18 | 13945 | 12.7ms | my ($code, $output, $error, $output_file, $error_file) = @_; | ||
19 | |||||
20 | # check for valid combinations of input | ||||
21 | { | ||||
22 | 27890 | 26.5ms | local $Carp::CarpLevel = 1; | ||
23 | 13945 | 62.3ms | 13945 | 99.8ms | my $error = _validate($output, $error, $output_file, $error_file); # spent 99.8ms making 13945 calls to IO::CaptureOutput::_validate, avg 7µs/call |
24 | 13945 | 9.69ms | croak $error if $error; | ||
25 | } | ||||
26 | |||||
27 | # if either $output or $error are defined, then we need a variable for | ||||
28 | # results; otherwise we only capture to files and don't waste memory | ||||
29 | 13945 | 13.7ms | if ( defined $output || defined $error ) { | ||
30 | 13945 | 20.6ms | for ($output, $error) { | ||
31 | 27890 | 11.7ms | $_ = \do { my $s; $s = ''} unless ref $_; | ||
32 | 27890 | 44.1ms | $$_ = '' if $_ != \undef && !defined($$_); | ||
33 | } | ||||
34 | } | ||||
35 | |||||
36 | # merge if same refs for $output and $error or if both are undef -- | ||||
37 | # i.e. capture \&foo, undef, undef, $merged_file | ||||
38 | # this means capturing into separate files *requires* at least one | ||||
39 | # capture variable | ||||
40 | 13945 | 32.7ms | my $should_merge = | ||
41 | (defined $error && defined $output && $output == $error) || | ||||
42 | ( !defined $output && !defined $error ) || | ||||
43 | 0; | ||||
44 | |||||
45 | 13945 | 4.32ms | my ($capture_out, $capture_err); | ||
46 | |||||
47 | # undef means capture anonymously; anything other than \undef means | ||||
48 | # capture to that ref; \undef means skip capture | ||||
49 | 13945 | 98.7ms | 13945 | 9.54s | if ( !defined $output || $output != \undef ) { # spent 9.54s making 13945 calls to IO::CaptureOutput::_proxy::new, avg 684µs/call |
50 | $capture_out = IO::CaptureOutput::_proxy->new( | ||||
51 | 'STDOUT', $output, undef, $output_file | ||||
52 | ); | ||||
53 | } | ||||
54 | 13945 | 49.2ms | 13945 | 4.58s | if ( !defined $error || $error != \undef ) { # spent 4.58s making 13945 calls to IO::CaptureOutput::_proxy::new, avg 329µs/call |
55 | $capture_err = IO::CaptureOutput::_proxy->new( | ||||
56 | 'STDERR', $error, ($should_merge ? 'STDOUT' : undef), $error_file | ||||
57 | ); | ||||
58 | } | ||||
59 | |||||
60 | # now that output capture is setup, call the subroutine | ||||
61 | # results get read when IO::CaptureOutput::_proxy objects go out of scope | ||||
62 | 13945 | 1.29s | 41835 | 364s | &$code(); # spent 350s making 13945 calls to IO::CaptureOutput::__ANON__[IO/CaptureOutput.pm:74], avg 25.1ms/call
# spent 13.8s making 27890 calls to IO::CaptureOutput::_proxy::DESTROY, avg 494µs/call |
63 | } | ||||
64 | |||||
65 | # Extra indirection for symmetry with capture_exec, etc. Gets error reporting | ||||
66 | # to the right level | ||||
67 | sub capture (&@) { ## no critic | ||||
68 | return &_capture; | ||||
69 | } | ||||
70 | |||||
71 | # spent 380s (505ms+380) within IO::CaptureOutput::capture_exec which was called 13945 times, avg 27.3ms/call:
# 3974 times (148ms+79.0s) by RBM::git_need_fetch at line 382 of /root/tor-browser-build/rbm/lib/RBM.pm, avg 19.9ms/call
# 3973 times (142ms+82.3s) by RBM::run_script at line 471 of /root/tor-browser-build/rbm/lib/RBM.pm, avg 20.8ms/call
# 3973 times (146ms+81.8s) by RBM::execute at line 483 of /root/tor-browser-build/rbm/lib/RBM.pm, avg 20.6ms/call
# 1991 times (68.7ms+128s) by RBM::DefaultConfig::lsb_release at line 60 of /root/tor-browser-build/rbm/lib/RBM/DefaultConfig.pm, avg 64.1ms/call
# 15 times (597µs+873ms) by RBM::__ANON__[(eval 14)[rbm/lib/RBM.pm:39]:16] at line 14 of (eval 14)[rbm/lib/RBM.pm:39], avg 58.2ms/call
# 15 times (609µs+831ms) by RBM::__ANON__[(eval 14)[rbm/lib/RBM.pm:39]:10] at line 8 of (eval 14)[rbm/lib/RBM.pm:39], avg 55.4ms/call
# 4 times (132µs+7.50s) by RBM::run_script at line 468 of /root/tor-browser-build/rbm/lib/RBM.pm, avg 1.88s/call | ||||
72 | 13945 | 18.9ms | my @args = @_; | ||
73 | 13945 | 5.11ms | my ($output, $error); | ||
74 | 27890 | 350s | 41835 | 729s | # spent 350s (1.16+349) within IO::CaptureOutput::__ANON__[/usr/share/perl5/IO/CaptureOutput.pm:74] which was called 13945 times, avg 25.1ms/call:
# 13945 times (1.16s+349s) by IO::CaptureOutput::_capture at line 62, avg 25.1ms/call # spent 380s making 13945 calls to IO::CaptureOutput::_capture, avg 27.2ms/call
# spent 349s making 13945 calls to IO::CaptureOutput::CORE:system, avg 25.0ms/call
# spent 48.8ms making 13945 calls to IO::CaptureOutput::__ANON__[IO/CaptureOutput.pm:94], avg 3µs/call |
75 | 13945 | 21.1ms | my $success = ($exit == 0 ) ? 1 : 0 ; | ||
76 | 13945 | 23.5ms | $? = $exit; | ||
77 | 13945 | 232ms | return wantarray ? ($output, $error, $success, $exit) : $output; | ||
78 | } | ||||
79 | |||||
80 | 1 | 900ns | *qxx = \&capture_exec; | ||
81 | |||||
82 | sub capture_exec_combined { | ||||
83 | my @args = @_; | ||||
84 | my $output; | ||||
85 | my $exit = _capture sub { system _shell_quote(@args) }, \$output, \$output; | ||||
86 | my $success = ($exit == 0 ) ? 1 : 0 ; | ||||
87 | $? = $exit; | ||||
88 | return wantarray ? ($output, $success, $exit) : $output; | ||||
89 | } | ||||
90 | |||||
91 | 1 | 1µs | *qxy = \&capture_exec_combined; | ||
92 | |||||
93 | # extra quoting required on Win32 systems | ||||
94 | 13946 | 98.8ms | 1 | 900ns | # spent 48.8ms within IO::CaptureOutput::__ANON__[/usr/share/perl5/IO/CaptureOutput.pm:94] which was called 13945 times, avg 3µs/call:
# 13945 times (48.8ms+0s) by IO::CaptureOutput::__ANON__[/usr/share/perl5/IO/CaptureOutput.pm:74] at line 74, avg 3µs/call # spent 900ns making 1 call to IO::CaptureOutput::CORE:match |
95 | sub _shell_quote_win32 { | ||||
96 | my @args; | ||||
97 | for (@_) { | ||||
98 | if (/[ \"]/) { # TODO: check if ^ requires escaping | ||||
99 | (my $escaped = $_) =~ s/([\"])/\\$1/g; | ||||
100 | push @args, '"' . $escaped . '"'; | ||||
101 | next; | ||||
102 | } | ||||
103 | push @args, $_ | ||||
104 | } | ||||
105 | return @args; | ||||
106 | } | ||||
107 | |||||
108 | # detect errors and return an error message or empty string; | ||||
109 | # spent 99.8ms within IO::CaptureOutput::_validate which was called 13945 times, avg 7µs/call:
# 13945 times (99.8ms+0s) by IO::CaptureOutput::_capture at line 23, avg 7µs/call | ||||
110 | 13945 | 10.8ms | my ($output, $error, $output_file, $error_file) = @_; | ||
111 | |||||
112 | # default to "ok" | ||||
113 | 13945 | 12.5ms | my $msg = q{}; | ||
114 | |||||
115 | # \$out, \$out, $outfile, $errfile | ||||
116 | 13945 | 35.8ms | if ( defined $output && defined $error | ||
117 | && defined $output_file && defined $error_file | ||||
118 | && $output == $error | ||||
119 | && $output != \undef | ||||
120 | && $output_file ne $error_file | ||||
121 | ) { | ||||
122 | $msg = "Merged STDOUT and STDERR, but specified different output and error files"; | ||||
123 | } | ||||
124 | # undef, undef, $outfile, $errfile | ||||
125 | elsif ( !defined $output && !defined $error | ||||
126 | && defined $output_file && defined $error_file | ||||
127 | && $output_file ne $error_file | ||||
128 | ) { | ||||
129 | $msg = "Merged STDOUT and STDERR, but specified different output and error files"; | ||||
130 | } | ||||
131 | |||||
132 | 13945 | 109ms | return $msg; | ||
133 | } | ||||
134 | |||||
135 | # Captures everything printed to a filehandle for the lifetime of the object | ||||
136 | # and then transfers it to a scalar reference | ||||
137 | package IO::CaptureOutput::_proxy; | ||||
138 | 3 | 209µs | 3 | 9.81ms | # spent 9.73ms (7.10+2.63) within IO::CaptureOutput::_proxy::BEGIN@138 which was called:
# once (7.10ms+2.63ms) by RBM::BEGIN@12 at line 138 # spent 9.73ms making 1 call to IO::CaptureOutput::_proxy::BEGIN@138
# spent 64µs making 1 call to Exporter::import
# spent 18µs making 1 call to UNIVERSAL::VERSION |
139 | 2 | 26µs | 2 | 78µs | # spent 48µs (19+29) within IO::CaptureOutput::_proxy::BEGIN@139 which was called:
# once (19µs+29µs) by RBM::BEGIN@12 at line 139 # spent 48µs making 1 call to IO::CaptureOutput::_proxy::BEGIN@139
# spent 29µs making 1 call to Exporter::import |
140 | 2 | 23µs | 2 | 80µs | # spent 43µs (6+37) within IO::CaptureOutput::_proxy::BEGIN@140 which was called:
# once (6µs+37µs) by RBM::BEGIN@12 at line 140 # spent 43µs making 1 call to IO::CaptureOutput::_proxy::BEGIN@140
# spent 37µs making 1 call to Exporter::import |
141 | 2 | 84µs | 2 | 65µs | # spent 36µs (6+29) within IO::CaptureOutput::_proxy::BEGIN@141 which was called:
# once (6µs+29µs) by RBM::BEGIN@12 at line 141 # spent 36µs making 1 call to IO::CaptureOutput::_proxy::BEGIN@141
# spent 29µs making 1 call to Exporter::import |
142 | |||||
143 | 27890 | 197ms | # spent 93.1ms within IO::CaptureOutput::_proxy::_is_wperl which was called 27890 times, avg 3µs/call:
# 27890 times (93.1ms+0s) by IO::CaptureOutput::_proxy::new at line 155, avg 3µs/call | ||
144 | |||||
145 | sub new { | ||||
146 | 27890 | 15.0ms | my $class = shift; | ||
147 | 27890 | 23.1ms | my ($orig_fh, $capture_var, $merge_fh, $capture_file) = @_; | ||
148 | 27890 | 58.0ms | 27890 | 589ms | $orig_fh = qualify($orig_fh); # e.g. main::STDOUT # spent 589ms making 27890 calls to Symbol::qualify, avg 21µs/call |
149 | 27890 | 52.1ms | 27890 | 286ms | my $fhref = qualify_to_ref($orig_fh); # e.g. \*STDOUT # spent 286ms making 27890 calls to Symbol::qualify_to_ref, avg 10µs/call |
150 | |||||
151 | # Duplicate the filehandle | ||||
152 | 27890 | 5.09ms | my $saved_fh; | ||
153 | { | ||||
154 | 27892 | 23.6ms | 2 | 36µs | # spent 22µs (7+14) within IO::CaptureOutput::_proxy::BEGIN@154 which was called:
# once (7µs+14µs) by RBM::BEGIN@12 at line 154 # spent 22µs making 1 call to IO::CaptureOutput::_proxy::BEGIN@154
# spent 14µs making 1 call to strict::unimport |
155 | 27890 | 94.1ms | 27890 | 93.1ms | if ( defined fileno($orig_fh) && ! _is_wperl() ) { # spent 93.1ms making 27890 calls to IO::CaptureOutput::_proxy::_is_wperl, avg 3µs/call |
156 | 27890 | 63.9ms | 27890 | 375ms | $saved_fh = gensym; # spent 375ms making 27890 calls to Symbol::gensym, avg 13µs/call |
157 | 27890 | 585ms | 27890 | 407ms | open $saved_fh, ">&$orig_fh" or croak "Can't redirect <$orig_fh> - $!"; # spent 407ms making 27890 calls to IO::CaptureOutput::_proxy::CORE:open, avg 15µs/call |
158 | } | ||||
159 | } | ||||
160 | |||||
161 | # Create replacement filehandle if not merging | ||||
162 | 27890 | 8.31ms | my ($newio_fh, $newio_file); | ||
163 | 27890 | 22.0ms | if ( ! $merge_fh ) { | ||
164 | 27890 | 29.6ms | 27890 | 161ms | $newio_fh = gensym; # spent 161ms making 27890 calls to Symbol::gensym, avg 6µs/call |
165 | 27890 | 207ms | if ($capture_file) { | ||
166 | $newio_file = $capture_file; | ||||
167 | } else { | ||||
168 | 27890 | 92.5ms | 27890 | 9.73s | (undef, $newio_file) = tempfile; # spent 9.73s making 27890 calls to File::Temp::tempfile, avg 349µs/call |
169 | } | ||||
170 | 27890 | 611ms | 27890 | 432ms | open $newio_fh, "+>$newio_file" or croak "Can't write temp file for $orig_fh - $!"; # spent 432ms making 27890 calls to IO::CaptureOutput::_proxy::CORE:open, avg 15µs/call |
171 | } | ||||
172 | else { | ||||
173 | $newio_fh = qualify($merge_fh); | ||||
174 | } | ||||
175 | |||||
176 | # Redirect (or merge) | ||||
177 | { | ||||
178 | 27892 | 13.1ms | 2 | 20µs | # spent 13µs (6+7) within IO::CaptureOutput::_proxy::BEGIN@178 which was called:
# once (6µs+7µs) by RBM::BEGIN@12 at line 178 # spent 13µs making 1 call to IO::CaptureOutput::_proxy::BEGIN@178
# spent 7µs making 1 call to strict::unimport |
179 | 27890 | 268ms | 27890 | 136ms | open $fhref, ">&".fileno($newio_fh) or croak "Can't redirect $orig_fh - $!"; # spent 136ms making 27890 calls to IO::CaptureOutput::_proxy::CORE:open, avg 5µs/call |
180 | } | ||||
181 | |||||
182 | 27890 | 244ms | bless [$$, $orig_fh, $saved_fh, $capture_var, $newio_fh, $newio_file, $capture_file], $class; | ||
183 | } | ||||
184 | |||||
185 | # spent 13.8s (2.61+11.2) within IO::CaptureOutput::_proxy::DESTROY which was called 27890 times, avg 494µs/call:
# 27890 times (2.61s+11.2s) by IO::CaptureOutput::_capture at line 62, avg 494µs/call | ||||
186 | 27890 | 37.6ms | my $self = shift; | ||
187 | |||||
188 | 27890 | 154ms | my ($pid, $orig_fh, $saved_fh, $capture_var, $newio_fh, | ||
189 | $newio_file, $capture_file) = @$self; | ||||
190 | 27890 | 178ms | return unless $pid eq $$; # only cleanup in the process that is capturing | ||
191 | |||||
192 | # restore the original filehandle | ||||
193 | 27890 | 174ms | 27890 | 818ms | my $fh_ref = Symbol::qualify_to_ref($orig_fh); # spent 818ms making 27890 calls to Symbol::qualify_to_ref, avg 29µs/call |
194 | 27890 | 423ms | 55780 | 113ms | select((select ($fh_ref), $|=1)[0]); # spent 113ms making 55780 calls to IO::CaptureOutput::_proxy::CORE:select, avg 2µs/call |
195 | 27890 | 909ms | 27890 | 677ms | if (defined $saved_fh) { # spent 677ms making 27890 calls to IO::CaptureOutput::_proxy::CORE:open, avg 24µs/call |
196 | open $fh_ref, ">&". fileno($saved_fh) or croak "Can't restore $orig_fh - $!"; | ||||
197 | } | ||||
198 | else { | ||||
199 | close $fh_ref; | ||||
200 | } | ||||
201 | |||||
202 | # transfer captured data to the scalar reference if we didn't merge | ||||
203 | # $newio_file is undef if this file handle is merged to another | ||||
204 | 27890 | 23.7ms | if (ref $capture_var && $newio_file) { | ||
205 | # some versions of perl complain about reading from fd 1 or 2 | ||||
206 | # which could happen if STDOUT and STDERR were closed when $newio | ||||
207 | # was opened, so we just squelch warnings here and continue | ||||
208 | 27890 | 186ms | local $^W; | ||
209 | 27890 | 257ms | 27890 | 101ms | seek $newio_fh, 0, 0; # spent 101ms making 27890 calls to IO::CaptureOutput::_proxy::CORE:seek, avg 4µs/call |
210 | 83670 | 1.28s | 27890 | 899ms | $$capture_var = do {local $/; <$newio_fh>}; # spent 899ms making 27890 calls to IO::CaptureOutput::_proxy::CORE:readline, avg 32µs/call |
211 | } | ||||
212 | 27890 | 1.78s | 27890 | 1.61s | close $newio_fh if $newio_file; # spent 1.61s making 27890 calls to IO::CaptureOutput::_proxy::CORE:close, avg 58µs/call |
213 | |||||
214 | # Cleanup | ||||
215 | 27890 | 522ms | 27890 | 353ms | return unless defined $newio_file && -e $newio_file; # spent 353ms making 27890 calls to IO::CaptureOutput::_proxy::CORE:ftis, avg 13µs/call |
216 | 27890 | 8.20ms | return if $capture_file; # the "temp" file was explicitly named | ||
217 | 27890 | 6.98s | 27890 | 6.61s | unlink $newio_file or carp "Couldn't remove temp file '$newio_file' - $!"; # spent 6.61s making 27890 calls to IO::CaptureOutput::_proxy::CORE:unlink, avg 237µs/call |
218 | } | ||||
219 | |||||
220 | 1 | 11µs | 1; | ||
221 | |||||
222 | __END__ | ||||
# spent 900ns within IO::CaptureOutput::CORE:match which was called:
# once (900ns+0s) by RBM::BEGIN@12 at line 94 | |||||
# spent 349s within IO::CaptureOutput::CORE:system which was called 13945 times, avg 25.0ms/call:
# 13945 times (349s+0s) by IO::CaptureOutput::__ANON__[/usr/share/perl5/IO/CaptureOutput.pm:74] at line 74, avg 25.0ms/call | |||||
# spent 1.61s within IO::CaptureOutput::_proxy::CORE:close which was called 27890 times, avg 58µs/call:
# 27890 times (1.61s+0s) by IO::CaptureOutput::_proxy::DESTROY at line 212, avg 58µs/call | |||||
# spent 353ms within IO::CaptureOutput::_proxy::CORE:ftis which was called 27890 times, avg 13µs/call:
# 27890 times (353ms+0s) by IO::CaptureOutput::_proxy::DESTROY at line 215, avg 13µs/call | |||||
# spent 1.65s within IO::CaptureOutput::_proxy::CORE:open which was called 111560 times, avg 15µs/call:
# 27890 times (677ms+0s) by IO::CaptureOutput::_proxy::DESTROY at line 195, avg 24µs/call
# 27890 times (432ms+0s) by IO::CaptureOutput::_proxy::new at line 170, avg 15µs/call
# 27890 times (407ms+0s) by IO::CaptureOutput::_proxy::new at line 157, avg 15µs/call
# 27890 times (136ms+0s) by IO::CaptureOutput::_proxy::new at line 179, avg 5µs/call | |||||
# spent 899ms within IO::CaptureOutput::_proxy::CORE:readline which was called 27890 times, avg 32µs/call:
# 27890 times (899ms+0s) by IO::CaptureOutput::_proxy::DESTROY at line 210, avg 32µs/call | |||||
# spent 101ms within IO::CaptureOutput::_proxy::CORE:seek which was called 27890 times, avg 4µs/call:
# 27890 times (101ms+0s) by IO::CaptureOutput::_proxy::DESTROY at line 209, avg 4µs/call | |||||
# spent 113ms within IO::CaptureOutput::_proxy::CORE:select which was called 55780 times, avg 2µs/call:
# 55780 times (113ms+0s) by IO::CaptureOutput::_proxy::DESTROY at line 194, avg 2µs/call | |||||
# spent 6.61s within IO::CaptureOutput::_proxy::CORE:unlink which was called 27890 times, avg 237µs/call:
# 27890 times (6.61s+0s) by IO::CaptureOutput::_proxy::DESTROY at line 217, avg 237µs/call |