Commit aaf7f627 authored by Mathis Rosenhauer's avatar Mathis Rosenhauer

benchmarking for encoding and decoding

parent 3668f972
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src tests
EXTRA_DIST = doc/license.txt doc/logo.svg
\ No newline at end of file
EXTRA_DIST = doc/license.txt doc/logo.svg
bench: all
cd tests && $(MAKE) $(AM_MAKEFLAGS) bench
benc: all
cd tests && $(MAKE) $(AM_MAKEFLAGS) benc
bdec: all
cd tests && $(MAKE) $(AM_MAKEFLAGS) bdec
.PHONY: bench benc bdec
......@@ -14,4 +14,10 @@ check_long_fs_SOURCES = check_long_fs.c check_aec.h \
$(top_builddir)/src/libaec.h
LDADD = libcheck_aec.la $(top_builddir)/src/libaec.la
EXTRA_DIST = sampledata.sh
EXTRA_DIST = sampledata.sh benc.sh bdec.sh
bench: benc bdec
benc:
./benc.sh
bdec:
./bdec.sh
.PHONY: bench benc bdec
#!/bin/sh
AEC=../src/aec
if [ ! -f bench.rz ]; then
echo "No encoded file found. Encoding now..."
./benc.sh
fi
rm -f dec.dat
bsize=$(stat -c "%s" bench.dat)
utime=$(
(
/usr/bin/time -f "%U" $AEC -d -n16 -j64 -r256 -m -c \
bench.rz > dec.dat
) 2>&1
)
perf=$(echo "$bsize/1048576/$utime" | bc)
echo "*** Decoding with $perf MiB/s user time ***"
cmp bench.dat dec.dat
#!/bin/sh
AEC=../src/aec
if [ ! -f typical.dat ]; then
wget https://www.dkrz.de/redmine/attachments/download/441/typical.dat
fi
if [ ! -f bench.dat ]; then
for i in $(seq 0 499);
do
cat typical.dat >> bench.dat
done
fi
rm -f bench.rz
utime=$(
(
/usr/bin/time -f "%U" $AEC -n16 -j64 -r256 -m -c bench.dat > bench.rz
) 2>&1
)
bsize=$(stat -c "%s" bench.dat)
perf=$(echo "$bsize/1048576/$utime" | bc)
echo "*** Encoding with $perf MiB/s user time ***"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment