summaryrefslogtreecommitdiff
path: root/bin/searchtest.sh
blob: eea86e7d6cec064ce4a526fb4713d835ee65bacc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
cd "`dirname $0`"
S=`date "+%s"`
C=0
for N in `cat $1`; do 
  echo search for $N:
  ./search.sh $N | head -1
  C=$(($C+1))
  T=`date "+%s"`
  echo runtime = $(($T-$S)) seconds, count = $C, time per query = $((1000*($T-$S)/$C)) milliseconds
  #sleep 1
done