1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #!/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
- 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" &
- sleep 2
- 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" &
- 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"
|