forked from PASAUCMerced/PMDebugger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathredis_run.sh
executable file
·43 lines (39 loc) · 1.06 KB
/
redis_run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
export LD_LIBRARY_PATH=/usr/local/lib64/:$LD_LIBRARY_PATH
if [[ $1 == 'pmdebugger' ]]
then
rm /mnt/dbpmemfs/redis.pm
valgrind --tool=pmdebugger ./src/redis-server redis.conf &
sleep 50
timeout 20s stdbuf -o0 src/redis-cli --lru-test $2
echo "shutdown" | src/redis-cli
elif [[ $1 == 'pmemcheck' ]]
then
rm /mnt/dbpmemfs/redis.pm
valgrind --tool=pmemcheck ./src/redis-server redis.conf &
#./src/redis-server redis.conf &
sleep 50
timeout 20s stdbuf -o0 src/redis-cli --lru-test $2
echo "shutdown" | src/redis-cli
rm /mnt/dbpmemfs/redis.pm
elif [[ $1 == 'Nulgrind' ]]
then
rm /mnt/dbpmemfs/redis.pm
valgrind --tool=none ./src/redis-server redis.conf &
#./src/redis-server redis.conf &
sleep 50
timeout 20s stdbuf -o0 src/redis-cli --lru-test $2
echo "shutdown" | src/redis-cli
rm /mnt/dbpmemfs/redis.pm
elif [[ $1 == 'original' ]]
then
rm /mnt/dbpmemfs/redis.pm
./src/redis-server redis.conf &
#./src/redis-server redis.conf &
sleep 50
timeout 20s stdbuf -o0 src/redis-cli --lru-test $2
echo "shutdown" | src/redis-cli
rm /mnt/dbpmemfs/redis.pm
else
echo "Unknow checker"
fi