mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 08:23:48 +03:00
increase memory limit during tests for upgrade
This commit is contained in:
parent
13923e4b7b
commit
26ff0c9417
1 changed files with 6 additions and 5 deletions
|
@ -11,9 +11,10 @@ set -e
|
||||||
|
|
||||||
# We'll set a max memory limit during upgrades. We modify the softlimit when
|
# We'll set a max memory limit during upgrades. We modify the softlimit when
|
||||||
# importing the potentially large mbox file.
|
# importing the potentially large mbox file.
|
||||||
# Currently at 768MB, needed for upgrading with 500k messages from v0.0.5 to
|
# Currently at 1024MB, needed for upgrading with 500k messages from v0.0.5 to
|
||||||
# v0.0.6 (two new indexes on store.Message).
|
# v0.0.9 (two new indexes on store.Message).
|
||||||
ulimit -S -d 768000
|
memlimit=1024000
|
||||||
|
ulimit -S -d $memlimit
|
||||||
|
|
||||||
(rm -r testdata/upgrade 2>/dev/null || exit 0)
|
(rm -r testdata/upgrade 2>/dev/null || exit 0)
|
||||||
mkdir testdata/upgrade
|
mkdir testdata/upgrade
|
||||||
|
@ -59,7 +60,7 @@ ulimit -S -d unlimited
|
||||||
echo 'Importing bulk data for upgrading.'
|
echo 'Importing bulk data for upgrading.'
|
||||||
gunzip < ../upgradetest.mbox.gz | time ./$tag/mox ximport mbox ./stepdata/accounts/test0 upgradetest /dev/stdin
|
gunzip < ../upgradetest.mbox.gz | time ./$tag/mox ximport mbox ./stepdata/accounts/test0 upgradetest /dev/stdin
|
||||||
echo
|
echo
|
||||||
ulimit -S -d 768000
|
ulimit -S -d $memlimit
|
||||||
time ../../mox -cpuprof ../../upgrade0-verifydata.cpu.pprof -memprof ../../upgrade0-verifydata.mem.pprof verifydata -skip-size-check stepdata
|
time ../../mox -cpuprof ../../upgrade0-verifydata.cpu.pprof -memprof ../../upgrade0-verifydata.mem.pprof verifydata -skip-size-check stepdata
|
||||||
time ../../mox -loglevel info -cpuprof ../../upgrade0-openaccounts.cpu.pprof -memprof ../../upgrade0-openaccounts.mem.pprof openaccounts stepdata test0 test1 test2
|
time ../../mox -loglevel info -cpuprof ../../upgrade0-openaccounts.cpu.pprof -memprof ../../upgrade0-openaccounts.mem.pprof openaccounts stepdata test0 test1 test2
|
||||||
rm -r stepdata
|
rm -r stepdata
|
||||||
|
@ -82,7 +83,7 @@ for tag in $tags; do
|
||||||
echo 'Importing bulk data for upgrading.'
|
echo 'Importing bulk data for upgrading.'
|
||||||
gunzip < ../upgradetest.mbox.gz | time ./$tag/mox ximport mbox ./stepdata/accounts/test0 upgradetest /dev/stdin
|
gunzip < ../upgradetest.mbox.gz | time ./$tag/mox ximport mbox ./stepdata/accounts/test0 upgradetest /dev/stdin
|
||||||
echo
|
echo
|
||||||
ulimit -S -d 768000
|
ulimit -S -d $memlimit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Upgrade data to $tag."
|
echo "Upgrade data to $tag."
|
||||||
|
|
Loading…
Reference in a new issue