Report average latency in synbench
[bluesky.git] / microbench / run-synread.sh
1 #!/bin/bash
2
3 BASEDIR=$(dirname $(which $0))
4 . $BASEDIR/run-common.sh
5
6 BLUESKY_TARGET=s3:mvrable-readbench-west
7 BLUESKY_EXTRA_OPTS="BLUESKY_OPT_NO_CRYPTO=1"
8
9 sizes="1048576"
10 #sizes="1048576 131072 32768"
11
12 run_synbench() {
13     basename=$(date +%Y%m%d)-$1
14     BLUESKY_RUN_NAME=$basename
15
16     run_cmd $PROXY cleanup-proxy
17     run_cmd $PROXY run-proxy >$BLUESKY_RUN_NAME.proxy 2>&1 &
18     proxy_pid=$!
19     sleep 10
20
21     SYNREAD_SIZE=1048576
22     run_cmd $BENCHER warmup-synread
23     for s in $sizes; do
24         SYNREAD_SIZE=$s
25         BLUESKY_RUN_NAME=$basename-$s
26         run_cmd $BENCHER run-synread
27     done
28
29     run_cmd $PROXY stop-proxy
30     echo "Waiting for proxy to stop..."
31     wait $proxy_pid
32 }
33
34 for BLUESKY_CACHE_SIZE in $((256 * 1024)) $((8192 * 1024 * 1024)); do
35     echo
36 done
37
38 BLUESKY_CACHE_SIZE=$((256 * 1024))
39 run_synbench syntest