Date: Tue, 24 Sep 2013 22:09:38 GMT From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r257704 - soc2013/dpl/benchmark Message-ID: <201309242209.r8OM9cgA050466@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dpl Date: Tue Sep 24 22:09:38 2013 New Revision: 257704 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=257704 Log: Updated the benchmarking suite. It now works well. Added: soc2013/dpl/benchmark/ soc2013/dpl/benchmark/testbzip2.sh (contents, props changed) soc2013/dpl/benchmark/testxz.sh (contents, props changed) Added: soc2013/dpl/benchmark/testbzip2.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2013/dpl/benchmark/testbzip2.sh Tue Sep 24 22:09:38 2013 (r257704) @@ -0,0 +1,47 @@ +#!/bin/sh + +# Create the files that we'll be using. +createfiles () +{ + for i in $* + do + dd if=/dev/random of=$i bs=1024 count=$i 2>&- + done +} + +# Operate with std bzip2. +bzip () +{ + for i in $* + do + time -h bzip2 $i 2>&1 | tr -d 's' |tr , . | awk '{ print $1 }' >> compressbzip2time + done + for i in $* + do + time -h bzip2 -d `echo ${i}.bz2` 2>&1 | tr -d 's' |tr , . | awk '{ print $1 }' >> decompressbzip2time + done +} + +# Operate with Capsicum bzip2. +cbzip () +{ + for i in $* + do + time -h ./bzip2 $i 2>&1 | tr -d 's' |tr , . | awk '{ print $1 }' >> compresscbzip2time + done + for i in $* + do + time -h ./bzip2 -d `echo ${i}.bz2` 2>&1 | tr -d 's' |tr , . | awk '{ print $1 }' >> decompresscbzip2time + done +} + + +rm *time 1* +createfiles 1 10 100 1000 10000 +bzip 1 10 100 1000 10000 +cbzip 1 10 100 1000 10000 + + +ministat -s compressbzip2time compresscbzip2time +ministat -s decompressbzip2time decompresscbzip2time +rm *time 1* Added: soc2013/dpl/benchmark/testxz.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2013/dpl/benchmark/testxz.sh Tue Sep 24 22:09:38 2013 (r257704) @@ -0,0 +1,46 @@ +#!/bin/sh + +# Create the files that we'll be using. +createfiles () +{ + for i in $* + do + dd if=/dev/random of=$i bs=1024 count=$i 2>&- + done +} + +# Operate with std bzip2. +xzcomp () +{ + for i in $* + do + time -h xz $i 2>&1 | tr -d 's' |tr , . | awk '{ print $1 }' >> compressxztime + done + for i in $* + do + time -h xz -d `echo ${i}.xz` 2>&1 | tr -d 's' |tr , . | awk '{ print $1 }' >> decompressxztime + done +} + +# Operate with Capsicum bzip2. +cxzcomp () +{ + for i in $* + do + time -h ./xz $i 2>&1 | tr -d 's' |tr , . | awk '{ print $1 }' >> compresscxztime + done + for i in $* + do + time -h ./xz -d `echo ${i}.xz` 2>&1 | tr -d 's' |tr , . | awk '{ print $1 }' >> decompresscxztime + done +} + + +rm 1* *time +createfiles 1 10 100 1000 10000 +xzcomp 1 10 100 1000 10000 +cxzcomp 1 10 100 1000 10000 + +ministat -s compressxztime compresscxztime +ministat -s decompressxztime decompresscxztime +rm 1* *time
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309242209.r8OM9cgA050466>