1234567891011121314151617181920212223242526272829303132333435363738 |
- #!/bin/bash
- # Get the IP addresses
- p0addr=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' ramen_p0)
- p1addr=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' ramen_p1)
- p2addr=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' ramen_p2)
- lognitems=20
- naccess=10
- if [ "$1" != "" ]; then
- lognitems="$1"
- fi
- if [ "$2" != "" ]; then
- naccess="$2"
- fi
- echo ===== Running ramen $lognitems $naccess
- date "+===== Start %s %F %T"
- savefile0=$$.p0.out
- savefile1=$$.p1.out
- savefile2=$$.p2.out
- docker exec -w /root/ramen ramen_p2 bash -c "$RAMEN_NUMA_P2 stdbuf -o 0 ./target/release/examples/bench_doram -a $naccess -i 2 -s $lognitems -l $p2addr -p 6000 -c 0:$p0addr:8000 --connect-timeout-seconds 30 > $savefile2 2>&1" &
- docker exec -w /root/ramen ramen_p1 bash -c "$RAMEN_NUMA_P1 stdbuf -o 0 ./target/release/examples/bench_doram -a $naccess -i 1 -s $lognitems -l $p1addr -p 7000 -c 2:$p2addr:6000 --connect-timeout-seconds 30 > $savefile1 2>&1" &
- docker exec -w /root/ramen ramen_p0 bash -c "$RAMEN_NUMA_P0 stdbuf -o 0 ./target/release/examples/bench_doram -a $naccess -i 0 -s $lognitems -l $p0addr -p 8000 -c 1:$p1addr:7000 --connect-timeout-seconds 30 > $savefile0 2>&1" &
- wait
- echo ===== P0 output
- docker exec -w /root/ramen ramen_p0 cat $savefile0
- docker exec -w /root/ramen ramen_p0 rm -f $savefile0
- echo ===== P1 output
- docker exec -w /root/ramen ramen_p1 cat $savefile1
- docker exec -w /root/ramen ramen_p1 rm -f $savefile1
- echo ===== P2 output
- docker exec -w /root/ramen ramen_p2 cat $savefile2
- docker exec -w /root/ramen ramen_p2 rm -f $savefile2
- date "+===== End %s %F %T"
|