From 917377c1fcec5833bbd67795bd5e08ca471a15c5 Mon Sep 17 00:00:00 2001 From: Abhishek Kona Date: Mon, 14 Jan 2013 20:58:51 -0800 Subject: [PATCH] Bash script to run db_bench with options and send data to ods. Summary: Basic Regression test. Plan to run this every-night and record qps in ods. Test Plan: ran locally and checked Reviewers: dhruba Reviewed By: dhruba CC: leveldb Differential Revision: https://reviews.facebook.net/D7929 --- regression_build_test.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 regression_build_test.sh diff --git a/regression_build_test.sh b/regression_build_test.sh new file mode 100755 index 000000000..6e72b85a9 --- /dev/null +++ b/regression_build_test.sh @@ -0,0 +1,31 @@ +#!/bin/bash -e +make clean +make db_bench -j12 + +function send_to_ods { + key="$1" + value="$2" + curl -s "https://www.intern.facebook.com/intern/agent/ods_set.php?entity=rocksdb_build&key=$key&value=$value" +} + +NUM=100000000 + +DATA_DIR="$1" +if [ -z "$DATA_DIR" ] +then + DATA_DIR="/data/users/abhishekk/test_ldb" +fi +STAT_FILE="/tmp/leveldb_test_stats" + +./db_bench --benchmarks=fillseq --db="$DATA_DIR" --use_existing_db=0 --bloom_bits=10 --num=$NUM --writes=$NUM --cache_size=6442450944 --cache_numshardbits=6 --open_files=55000 --statistics=1 --histogram=1 --disable_data_sync=1 --disable_wal=1 --sync=0 > "$STAT_FILE.fillseq" + +./db_bench --benchmarks=overwrite --db=$DATA_DIR --use_existing_db=1 --bloom_bits=10 --num=$NUM --writes=$((NUM / 2)) --cache_size=6442450944 --cache_numshardbits=6 --open_files=55000 --statistics=1 --histogram=1 --disable_data_sync=1 --disable_wal=1 --sync=0 --threads=8 > "$STAT_FILE.overwrite" + +./db_bench --benchmarks=readrandom --db=$DATA_DIR --use_existing_db=1 --bloom_bits=10 --num=$NUM --reads=$((NUM / 100)) --cache_size=6442450944 --cache_numshardbits=6 --open_files=55000 --statistics=1 --histogram=1 --disable_data_sync=1 --disable_wal=1 --sync=0 --threads=128 > "$STAT_FILE.readrandom" + +OVERWRITE_OPS=$(grep overwrite "$STAT_FILE.overwrite" |cut -d"/" -f2 |cut -d" " -f2) +FILLSEQ_OPS=$(grep fillseq a.out |cut -d"/" -f2 |cut -d" " -f2) +READRANDOM_OPS=$(grep readrandom a.out |cut -d"/" -f2 |cut -d" " -f2) +send_to_ods rocksdb.build.overwrite.qps $OVERWRITE_OPS +send_to_ods rocksdb.build.fillseq.qps $FILLSEQ_OPS +send_to_ods rocksdb.build.readrandom.qps $READRANDOM_OPS