Commit 3e2b8392 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #1032

Add benchmark script to run a few common benchmarks

git-svn-id: file:///svn/toku/tokudb.1032b@8252 c7de825b-a66e-492c-adef-691d508d4ae1
parent a52be1bd
...@@ -279,6 +279,7 @@ static int print_usage (const char *argv0) { ...@@ -279,6 +279,7 @@ static int print_usage (const char *argv0) {
fprintf(stderr, " --compressibility C creates data that should compress by about a factor C. Default C is large. C is an float.\n"); fprintf(stderr, " --compressibility C creates data that should compress by about a factor C. Default C is large. C is an float.\n");
fprintf(stderr, " --xcount N how many insertions per transaction (default=%d)\n", DEFAULT_ITEMS_PER_TRANSACTION); fprintf(stderr, " --xcount N how many insertions per transaction (default=%d)\n", DEFAULT_ITEMS_PER_TRANSACTION);
fprintf(stderr, " --singlex Run the whole job as a single transaction. (Default don't run as a single transaction.)\n"); fprintf(stderr, " --singlex Run the whole job as a single transaction. (Default don't run as a single transaction.)\n");
fprintf(stderr, " --abort Abort the singlex after the transaction is over. (Requires --singlex.)\n");
fprintf(stderr, " --periter N how many insertions per iteration (default=%d)\n", DEFAULT_ITEMS_TO_INSERT_PER_ITERATION); fprintf(stderr, " --periter N how many insertions per iteration (default=%d)\n", DEFAULT_ITEMS_TO_INSERT_PER_ITERATION);
fprintf(stderr, " --DB_INIT_TXN (1|0) turn on or off the DB_INIT_TXN env_open_flag\n"); fprintf(stderr, " --DB_INIT_TXN (1|0) turn on or off the DB_INIT_TXN env_open_flag\n");
fprintf(stderr, " --DB_INIT_LOG (1|0) turn on or off the DB_INIT_LOG env_open_flag\n"); fprintf(stderr, " --DB_INIT_LOG (1|0) turn on or off the DB_INIT_LOG env_open_flag\n");
......
#!/bin/bash
#Export BINSUF before running
make clean
make db-benchmark-test-tokudb$BINSUF
make scanscan-tokudb$BINSUF
alias db='./db-benchmark-test-tokudb$BINSUF' # standard db-benchmark test
alias dbtxn='db -x --singlex' # db-benchmark test with single transaction
alias dbabort='dbtxn --abort' # db-benchmark test with single transaction (AND ABORT) at end
alias scan='./scanscan-tokudb$BINSUF --lwc --prelock --prelockflag --cachesize 536870912' # scanscan default, cache large enough to scan properly.
alias flatteneddb='db && scan'
alias flattenedtxndb='dbtxn && scan'
alias flatteningscan='(db 2>&1 >/dev/null) && scan'
alias flatteningtxnscan='(dbtxn 2>&1 >/dev/null) && scan'
(flatteningscan)2>&1 >/dev/null # Cache binaries/etc.
#echo db-benchmark-test no transactions
#db
#echo Time for 5 runs:
#time for (( i = 0; i < 5; i++ )); do (db) 2>&1 >/dev/null; done
#echo
#echo ============================
#echo db-benchmark-test single transactions
#dbtxn
#echo Time for 5 runs:
#time for (( i = 0; i < 5; i++ )); do (dbtxn) 2>&1 >/dev/null; done
#echo
#echo ============================
#echo db-benchmark-test single transactions ABORT at end
#dbabort
#echo Time for 5 runs:
#time for (( i = 0; i < 5; i++ )); do (dbabort) 2>&1 >/dev/null; done
#echo
#echo ============================
#echo flattening scanscan
#flatteningscan
#echo Time for 5 runs:
#time for (( i = 0; i < 5; i++ )); do (flatteningscan) 2>&1 >/dev/null; done
#echo
#echo ============================
#echo flattening scanscan on txn db
#flatteningtxnscan
#echo Time for 5 runs:
#time for (( i = 0; i < 5; i++ )); do (flatteningtxnscan) 2>&1 >/dev/null; done
#echo
#echo ============================
#echo pre-flattened scanscan
#(flatteneddb) 2>&1 >/dev/null
#scan
#echo Time for 5 runs:
#time for (( i = 0; i < 5; i++ )); do (scan) 2>&1 >/dev/null; done
#echo
#echo ============================
echo pre-flattened scanscan on txn db
(flattenedtxndb) 2>&1 >/dev/null
scan
echo Time for 5 runs:
time for (( i = 0; i < 5; i++ )); do (scan) 2>&1 >/dev/null; done
echo
echo ============================
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment