<commit_before>#!/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 ============================<commit_msg>Addresses #1032 Modified benchmark script<commit_after>#!/bin/bash
#Export BINSUF before running
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 ============================
{'fraction_non_alphanumeric': 0.18202047174009792, 'fraction_numerical': 0.02403204272363151, 'mean_word_length': 4.808785529715762, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5430379', 'n_tokens_mistral': 833, 'n_tokens_neox': 790, 'n_words': 242}