aboutsummaryrefslogtreecommitdiff
path: root/prepopulate2.sh
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2018-07-18 23:37:45 -0400
committerFranklin Wei <me@fwei.tk>2018-07-18 23:37:45 -0400
commit75e5bf09506412ac679d60dc051f97d99d24702d (patch)
tree67de107d7a39ffee14aaec877eb245eca44e3c07 /prepopulate2.sh
parentdc5df5430888f2ff4054d87086f0f8d3689af644 (diff)
downloadcsaa-75e5bf09506412ac679d60dc051f97d99d24702d.zip
csaa-75e5bf09506412ac679d60dc051f97d99d24702d.tar.gz
csaa-75e5bf09506412ac679d60dc051f97d99d24702d.tar.bz2
csaa-75e5bf09506412ac679d60dc051f97d99d24702d.tar.xz
Add a compile-time option to do database prepopulation and exit
Enabling the PREPOPULATE macro in service_provider.c will cause it to initialize a database with 2^logleaves - RUNS_TEST files, and exit. This allows fast testing on the resulting database at near full load.
Diffstat (limited to 'prepopulate2.sh')
-rwxr-xr-xprepopulate2.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/prepopulate2.sh b/prepopulate2.sh
new file mode 100755
index 0000000..dd1b8bf
--- /dev/null
+++ b/prepopulate2.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+mkdir -p databases
+
+for i in `seq 10 25`
+do
+ echo $i
+ rm -f socket
+ ./server $i databases/csaa_$i.db > /dev/null
+done