xref: /netbsd-src/external/bsd/unbound/dist/testdata/speed_cache.tdir/makeqs.sh (revision 4b004442778f1201b2161e87fd65ba87aae6601a)
1# generate query file, $1=number $2=filename.
2
3cat >makeqs.c <<EOF
4#include <stdio.h>
5#include <stdlib.h>
6int main(int argc, char** argv) {
7	int i;
8	int max = atoi(argv[1]);
9	for(i=0; i<max; i++)
10		printf("a%8.8d.example.com IN A\n", i);
11	return 0;
12}
13EOF
14
15gcc -o makeqs makeqs.c
16
17#function makeqs() {
18	#i=0
19	#echo "; generated by makeqs" > $2
20	#while test $i -lt $1; do
21		#echo "a$i.example.com IN A" >> $2
22		#i=`expr $i + 1`
23	#done
24#}
25
26./makeqs 10 > q10.txt
27cat q10.txt
28./makeqs 100 > q100.txt
29./makeqs 1000 > q1000.txt
30./makeqs 10000 > q10000.txt
31./makeqs 100000 > q100000.txt
32#./makeqs 1000000 > q1000000.txt
33#./makeqs 10000000 > q10000000.txt
34