diff options
author | Andreas Mair <amair.sob@googlemail.com> | 2005-03-21 11:57:02 +0100 |
---|---|---|
committer | Andreas Mair <amair.sob@googlemail.com> | 2005-03-21 11:57:02 +0100 |
commit | 5083c05ce2e2bfc5719346d809719ebf01b0e69d (patch) | |
tree | 71e65c65489eebc70a366006be250529a97b5410 /lib/Temp/File-Temp-0.12/misc/benchmark.pl | |
parent | 7525bed2d315a25ac2caf95ff0bf44c905d58a7e (diff) | |
download | vdradmin-am-5083c05ce2e2bfc5719346d809719ebf01b0e69d.tar.gz vdradmin-am-5083c05ce2e2bfc5719346d809719ebf01b0e69d.tar.bz2 |
2005-03-20: 0.97-am2v0.97-am2
- TV and remote templates have same remote control.
Added patches:
- fix for timers.conf of vdr1.3.23+ (Submitted by x-stefan @vdrportal.de)
- Localnet Patch; no password request if client ip in given ip range) (Submitted by "Reiner Buehl" <reiner@buehl.net>)
2005-03-19:
Templates cleanup:
- timer_list.html
- timer_new.html
- toolbar.html
- tv_flash.html
- tv.html
2005-03-18:
- reworked summary display of recordings
- summary editbox preserves linefeeds while editing timers
Templates cleanup:
- prog_timeline.html
- rc.html
- rec_edit.html
- rec_list.html
2005-03-12:
- Added stream button in prog_summmary (suggested by Unimatrix0 @vdrportal.de)
Templates cleanup:
- at_new.html
- at_timer_list.html
- config.html
- error.html
- index.html
- left.html
- noauth.html
- noperm.html
- prog_details.html (TODO)
- prog_list2.html
- prog_list.html
- prog_summary.html (TODO)
Added patches:
- vdradmin-0.96_For_vdr-1.3_StoreAutotimerChannelID_And_EventIdCheckDisable.diff (posted at the VDR mailinglist by "Rantanen Teemu" <teemu.rantanen@tekla.com>)
- vdradmin-0.96_OneShot_Timers_English_Only.diff and merged it to "Deutsch" template (posted at the VDR mailinglist by "Rantanen Teemu" <teemu.rantanen@tekla.com>)
- included changes from vdradmin-0.96-3-ctvdr-1 (see HISTORY.ct).
Changes that have been forgotten while merging previous patches:
- Fixed: timer listing now shows "VPS" instead of "Auto (alt)".
- removed unneeded <br>. They are still used for display only.
Diffstat (limited to 'lib/Temp/File-Temp-0.12/misc/benchmark.pl')
-rwxr-xr-x | lib/Temp/File-Temp-0.12/misc/benchmark.pl | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/Temp/File-Temp-0.12/misc/benchmark.pl b/lib/Temp/File-Temp-0.12/misc/benchmark.pl new file mode 100755 index 0000000..bdea837 --- /dev/null +++ b/lib/Temp/File-Temp-0.12/misc/benchmark.pl @@ -0,0 +1,42 @@ +#!/usr/local/bin/perl -w + +# Simple benchmark of temporary file creation (no filename just a handle) +# Uses the following: +# - temporary file creation created by IO::File +# - temporary file creation using File::Temp (uses security checking) +# - A roll-our-own wrapper on top of POSIX::tempnam (essentially +# a compact form of File::Temp without all the extras) taken from +# the Perl cookbook + +# Would not + +use strict; +use Benchmark; +use IO::File; +use POSIX qw/ tmpnam /; +use File::Temp qw/ tempfile /; +use Symbol; + +# Benchmark IO::File and File::Temp + +timethese(10000, { + 'IO::File' => sub { + my $fh = IO::File::new_tmpfile || die $ !; + }, + 'File::Temp::tempfile' => sub { + my $fh = tempfile() || die $ !; + }, + 'POSIX::tmpnam' => sub { + my $fh = gensym;; + my $name; + for (;;) { + $name = tmpnam(); + sysopen( $fh, $name, O_RDWR | O_CREAT | O_EXCL ) + && last; + } + unlink $name; + } + } + ); + + |