12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #!/bin/bash
- # Get the IP addresses
- p0addr=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' floram_p0)
- p1addr=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' floram_p1)
- # The Floram mode and size
- # mode is read, write, readwrite, or init
- mode=read
- size=20
- iters=128
- port=3000
- if [ "$1" != "" ]; then
- mode="$1"
- fi
- if [ "$2" != "" ]; then
- size="$2"
- fi
- if [ "$3" != "" ]; then
- iters="$3"
- fi
- if [ "$4" != "" ]; then
- port="$4"
- fi
- items=$((1<<size))
- echo ===== Running floram $mode $size $iters
- date "+===== Start %s %F %T"
- # Run, saving the output
- savefilep0=$$.p0.out
- savefilep1=$$.p1.out
- if [ "$mode" = "bs" ]; then
- docker exec -w /root/floram-floram-release/build/tests floram_p0 bash -c "$FLORAM_NUMA_P0 stdbuf -o 0 ./bench_$mode -p $port -s $iters -o fssl_cprg -e $items -i 1 > $savefilep0 2>&1" &
- else
- docker exec -w /root/floram-floram-release/build/tests floram_p0 bash -c "$FLORAM_NUMA_P0 stdbuf -o 0 ./bench_oram_$mode -p $port -s 8 -o fssl_cprg -e $items -i $iters > $savefilep0 2>&1" &
- fi
- sleep 2
- if [ "$mode" = "bs" ]; then
- docker exec -w /root/floram-floram-release/build/tests floram_p1 bash -c "$FLORAM_NUMA_P1 stdbuf -o 0 ./bench_$mode -c $p0addr -p $port -s $iters -o fssl_cprg -e $items -i 1 > $savefilep1 2>&1" &
- else
- docker exec -w /root/floram-floram-release/build/tests floram_p1 bash -c "$FLORAM_NUMA_P1 stdbuf -o 0 ./bench_oram_$mode -c $p0addr -p $port -s 8 -o fssl_cprg -e $items -i $iters > $savefilep1 2>&1"
- fi
- wait
- echo ===== P0 output
- docker exec -w /root/floram-floram-release/build/tests floram_p0 cat $savefilep0
- docker exec -w /root/floram-floram-release/build/tests floram_p0 rm -f $savefilep0
- echo ===== P1 output
- docker exec -w /root/floram-floram-release/build/tests floram_p1 cat $savefilep1
- docker exec -w /root/floram-floram-release/build/tests floram_p1 rm -f $savefilep1
- date "+===== End %s %F %T"
|