| Filename | /usr/libdata/perl5/amd64-openbsd/OpenBSD/MkTemp.pm |
| Statements | Executed 17 statements in 615µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 101µs | 101µs | OpenBSD::MkTemp::mkstemps_real (xsub) |
| 1 | 1 | 1 | 29µs | 29µs | OpenBSD::MkTemp::BEGIN@3 |
| 1 | 1 | 1 | 19µs | 120µs | OpenBSD::MkTemp::mkstemp |
| 1 | 1 | 1 | 10µs | 19µs | OpenBSD::MkTemp::BEGIN@7 |
| 1 | 1 | 1 | 10µs | 13µs | OpenBSD::MkTemp::BEGIN@4 |
| 1 | 1 | 1 | 8µs | 15µs | OpenBSD::MkTemp::BEGIN@5 |
| 0 | 0 | 0 | 0s | 0s | OpenBSD::MkTemp::mkstemps |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package OpenBSD::MkTemp; | ||||
| 2 | |||||
| 3 | 2 | 57µs | 1 | 29µs | # spent 29µs within OpenBSD::MkTemp::BEGIN@3 which was called:
# once (29µs+0s) by OpenBSD::Temp::BEGIN@23 at line 3 # spent 29µs making 1 call to OpenBSD::MkTemp::BEGIN@3 |
| 4 | 2 | 24µs | 2 | 17µs | # spent 13µs (10+4) within OpenBSD::MkTemp::BEGIN@4 which was called:
# once (10µs+4µs) by OpenBSD::Temp::BEGIN@23 at line 4 # spent 13µs making 1 call to OpenBSD::MkTemp::BEGIN@4
# spent 4µs making 1 call to strict::import |
| 5 | 2 | 25µs | 2 | 22µs | # spent 15µs (8+7) within OpenBSD::MkTemp::BEGIN@5 which was called:
# once (8µs+7µs) by OpenBSD::Temp::BEGIN@23 at line 5 # spent 15µs making 1 call to OpenBSD::MkTemp::BEGIN@5
# spent 7µs making 1 call to warnings::import |
| 6 | |||||
| 7 | 2 | 178µs | 2 | 29µs | # spent 19µs (10+10) within OpenBSD::MkTemp::BEGIN@7 which was called:
# once (10µs+10µs) by OpenBSD::Temp::BEGIN@23 at line 7 # spent 19µs making 1 call to OpenBSD::MkTemp::BEGIN@7
# spent 10µs making 1 call to Exporter::import |
| 8 | |||||
| 9 | 1 | 2µs | our @EXPORT_OK = qw( mkstemps mkstemp mkdtemp ); | ||
| 10 | 1 | 1µs | our @EXPORT = qw( mkstemp mkdtemp ); | ||
| 11 | 1 | 800ns | our $VERSION = '0.02'; | ||
| 12 | |||||
| 13 | 1 | 900ns | require XSLoader; | ||
| 14 | 1 | 198µs | 1 | 190µs | XSLoader::load('OpenBSD::MkTemp', $VERSION); # spent 190µs making 1 call to XSLoader::load |
| 15 | |||||
| 16 | sub mkstemp($) | ||||
| 17 | # spent 120µs (19+101) within OpenBSD::MkTemp::mkstemp which was called:
# once (19µs+101µs) by OpenBSD::Temp::permanent_file at line 104 of OpenBSD/Temp.pm | ||||
| 18 | 1 | 1µs | my $template = shift; | ||
| 19 | 1 | 113µs | 1 | 101µs | my $fh = mkstemps_real($template, 0) || return; # spent 101µs making 1 call to OpenBSD::MkTemp::mkstemps_real |
| 20 | 1 | 8µs | return wantarray() ? ($fh, $template) : $fh; | ||
| 21 | } | ||||
| 22 | |||||
| 23 | sub mkstemps($$) | ||||
| 24 | { | ||||
| 25 | my($template, $suffix) = @_; | ||||
| 26 | $template .= $suffix; | ||||
| 27 | my $fh = mkstemps_real($template, length($suffix)) || return; | ||||
| 28 | return wantarray() ? ($fh, $template) : $fh; | ||||
| 29 | } | ||||
| 30 | |||||
| 31 | |||||
| 32 | 1 | 6µs | 1; | ||
| 33 | __END__ | ||||
# spent 101µs within OpenBSD::MkTemp::mkstemps_real which was called:
# once (101µs+0s) by OpenBSD::MkTemp::mkstemp at line 19 |