D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
usr
/
share
/
doc
/
perl-Digest
/
Filename :
digest-bench
back
Copy
#!/usr/bin/perl -w use strict; die unless @ARGV; my($mod, @args) = @ARGV; eval "require $mod"; die $@ if $@; $a = substr(join("", "a" .. "z",) x 800, 0, 8 * 1024); my $count = 4*1024; use Time::HiRes qw(time); my $before = time; my $ctx = $mod->new(@args); for (1 .. $count) { $ctx->add($a); } print $ctx->hexdigest, "\n"; my $sec = time - $before; my $bytes = length($a) * $count; print "$bytes/$sec\n"; my $vers = do { no strict 'refs'; ${$mod . '::VERSION'} }; printf "$mod $vers\t%.2f MB/s\n", $bytes/(1024*1024*$sec)
Name
Size
Last Modified
Owner
Permissions
Actions
Changes
3.499
KB
October 02 2011 10:10:24
root
0644
README
0.406
KB
March 06 2009 1:51:38
root
0644
digest-bench
0.522
KB
March 06 2009 1:51:38
root
0644
2017 © D7net | D704T team