unbound/testdata/speed_cache.tdir/makeqs.sh
Wouter Wijngaards 5165e14802 tests in tdir format.
git-svn-id: file:///svn/unbound/trunk@4264 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-06 13:27:30 +00:00

34 lines
647 B
Bash

# generate query file, $1=number $2=filename.
cat >makeqs.c <<EOF
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char** argv) {
int i;
int max = atoi(argv[1]);
for(i=0; i<max; i++)
printf("a%8.8d.example.com IN A\n", i);
return 0;
}
EOF
gcc -o makeqs makeqs.c
#function makeqs() {
#i=0
#echo "; generated by makeqs" > $2
#while test $i -lt $1; do
#echo "a$i.example.com IN A" >> $2
#i=`expr $i + 1`
#done
#}
./makeqs 10 > q10.txt
cat q10.txt
./makeqs 100 > q100.txt
./makeqs 1000 > q1000.txt
./makeqs 10000 > q10000.txt
./makeqs 100000 > q100000.txt
#./makeqs 1000000 > q1000000.txt
#./makeqs 10000000 > q10000000.txt