2
# @(#) $Revision: 4.5 $ $Source: /judy/test/manual/Checkit $
4
echo "=== +++++++++ This test runs in 15 seconds on a PIII 750Mhz +++++++"
6
LIBJUDY=`find ../../ -name libJudy.a`
7
JUDY_H=`find ../../ -name Judy.h`
9
cc -O SLcompare.c -DHASHMETHOD -o SL_Hash
10
cc -O SLcompare.c -DSPLAYMETHOD -o SL_Splay
11
cc -O SLcompare.c -DREDBLACKMETHOD -o SL_Redblack
13
echo Compiling with Judy library: $LIBJUDY
15
cc -O -I../../src SLcompare.c -DJUDYMETHOD -o SL_Judy $LIBJUDY -lm
16
if [ $? -ne 0 ] ; then
17
echo "=== Failed: cc SLcompare.c -DJUDYMETHOD"
20
cc -O -I../../src Judy1LCheck.c -o Judy1LCheck $LIBJUDY -lm
21
if [ $? -ne 0 ] ; then
22
echo "=== Failed: cc Judy1LCheck.c"
25
cc -O -I../../src Judy1LTime.c -DNOINLINE -o Judy1LTime $LIBJUDY -lm
26
if [ $? -ne 0 ] ; then
27
echo "=== Failed: cc Judy1LTime.c"
32
# -OR- if Judy is installed, these can be compiled from anywhere:
35
#cc -O SLcompare.c -DJUDYMETHOD -o SL_Judy -lJudy -lm
36
#cc -O Judy1LCheck.c -o Judy1LCheck -lJudy -lm
37
#cc -O Judy1LTime.c -DNOINLINE -o Judy1LTime -lJudy -lm
39
echo "=== Pass: Compile of tests"
41
echo " Validate Judy1/JudyL functions (except Judy*ByCount)"
42
./Judy1LCheck -n 300000 -B20 > /dev/null
43
if [ $? -ne 0 ] ; then
44
echo "=== Failed: Judy1/JudyL validate program"
47
echo "=== Pass: Judy1/JudyL validate program"
49
echo " Do a few timings tests of Judy1/JudyL"
52
# Pop1 is: current number of Indexes stored in Judy array
53
# Measmts is: lookups to make measurement
57
# MU is: Memory Used (allocated thru malloc(3))
58
# HEAP is: Memory change measured with sbrk(0)
60
echo " Pop1 Measmts J1S JLI J1T JLG J1MU/I JLMU/I HEAP/I"
61
./Judy1LTime -n 2000000 -P1 -B19 | grep -v "^#"
62
echo "=== Pass: Judy1/JudyL performance program"
64
echo " Do a few timings tests of JudySL and friends"
67
# lines is: number of lines in source file
68
# avg_linelen is: average bytes per line
69
# getline is: average time go get a line and remove white space
70
# StoreD is: number of unique lines stored into JudySL array
71
# RAMused/line is: Memory change measured with sbrk(0)
72
# store/ln is: average insert time (including duplicates)
73
# lookup/ln is: average lookup time in same order as inserts
74
# ADT is: Abstract Data Type method
76
echo " lines avg_linelen getline StoreD RAMused/line store/ln lookup/ln ADT"
77
./SL_Hash ../../Makefile | grep HASH
78
./SL_Splay ../../Makefile | grep SPLAY
79
./SL_Redblack ../../Makefile | grep REDBLACK
80
./SL_Judy ../../Makefile | grep JUDY
81
if [ $? -ne 0 ] ; then
82
echo "=== Failed: JudySL if StoreD numbers are all the same"
85
echo "=== Pass: JudySL if StoreD numbers are all the same"