This is an automated email from the git hooks/post-receive script. hlieberman-guest pushed a commit to branch master in repository libtie-cache-perl.
commit 96b39cbe1182c1b142b9c21e3b5dbdd2101c47c7 Author: Harlan Lieberman-Berg <hlieber...@setec.io> Date: Sun Nov 15 21:35:24 2015 -0500 Remove file deleted upstream. --- bench.pl | 64 ---------------------------------------------------------------- 1 file changed, 64 deletions(-) diff --git a/bench.pl b/bench.pl deleted file mode 100755 index 15b4383..0000000 --- a/bench.pl +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/perl - -use Tie::Cache; -use Tie::Cache::LRU; -use Benchmark; -use strict; - -my $cache_size = 5000; -my $write_count = $cache_size * 2; -my $read_count = $write_count * 4; -my $delete_count = $write_count; - -tie my %cache, 'Tie::Cache', $cache_size; -tie my %cache_lru, 'Tie::Cache::LRU', $cache_size; - -my @cols; -push(@cols, \%cache, \%cache_lru); - -printf " %15s", "Cache Size $cache_size"; -for(@cols) { - my $module = ref(tied(%$_)); - printf " %16s %3.2f", $module, eval "\$$module"."::VERSION"; -} -print "\n"; - -&report("$write_count Writes", sub { - my $cache = shift; - for(1..$write_count) { - $cache->{$_} = $_; - } - }, - @cols, - ); - -&report("$read_count Reads", sub { - my $cache = shift; - for(1..$read_count) { - my $value = $cache->{$_}; - } - }, - @cols, - ); - -&report("$delete_count Deletes", sub { - my $cache = shift; - for(1..$delete_count) { - my $value = $cache->{$_}; - } - }, - @cols, - ); - -sub report { - my($desc, $sub, @caches) = @_; - - printf(" %-15s", $desc); - for my $cache (@caches) { - my $timed = timestr(timeit(1, sub { &$sub($cache) })); - $timed =~ /([\d\.]+\s+cpu)/i; - printf("%18s sec", $1); - } - print "\n"; -} - -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libtie-cache-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits