File: testscript.sh

package info (click to toggle)
pipemeter 1.1.3-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch, wheezy
  • size: 352 kB
  • ctags: 67
  • sloc: ansic: 651; sh: 230; makefile: 46
file content (28 lines) | stat: -rw-r--r-- 891 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
TESTSIZE=200M
RESULTS="results.txt"
TIME=/usr/bin/time
if [ ! -x ./pipemeter ] ; then
  echo "You must compile pipemeter before testing it."
  exit 1
fi
./pipemeter -V
rm -f $RESULTS
echo "Making a $TESTSIZE File..."
if [ ! -f ./$TESTSIZE ] ; then
  dd if=/dev/zero of=./$TESTSIZE bs=$TESTSIZE count=1
fi
echo "Making sure its cached..."
cat ./$TESTSIZE > /dev/null
echo "Timing raw speed"
$TIME -a -o $RESULTS cat ./$TESTSIZE > /dev/null
$TIME -a -o $RESULTS cat ./$TESTSIZE > /dev/null
echo "Timing speed through pipemeter"
$TIME -a -o $RESULTS cat ./$TESTSIZE | ./pipemeter 2>> $RESULTS | cat > /dev/null
$TIME -a -o $RESULTS cat ./$TESTSIZE | ./pipemeter 2>> $RESULTS | cat > /dev/null
echo "Getting system info"
cat /proc/cpuinfo >> $RESULTS
free -m >> $RESULTS
uname -a >> $RESULTS
rm -f $TESTSIZE
echo "done. Please mail the file $RESULTS to spamaps@spamaps.org ... thanks"