socsvn commit: r257704 - soc2013/dpl/benchmark
dpl at FreeBSD.org
dpl at FreeBSD.org
Tue Sep 24 22:09:39 UTC 2013
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
More information about the svn-soc-all
mailing list