aboutsummaryrefslogtreecommitdiff
path: root/testdata/speed_cache.tdir/makeqs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'testdata/speed_cache.tdir/makeqs.sh')
-rw-r--r--testdata/speed_cache.tdir/makeqs.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/testdata/speed_cache.tdir/makeqs.sh b/testdata/speed_cache.tdir/makeqs.sh
new file mode 100644
index 000000000000..aebabfcafa25
--- /dev/null
+++ b/testdata/speed_cache.tdir/makeqs.sh
@@ -0,0 +1,33 @@
+# 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