<commit_before>#!/usr/bin/env bash

function usage() {
    echo "run db-benchmark-test"
    echo "[--tokudb=$tokudb"
    echo "[--revision=$revision]"
    echo "[--branch=$branch]"
    echo "[--suffix=$suffix]"
    echo "[--commit=$commit]"
    echo "[--cc=$cc]"
    echo "[--n=$n]"
}

function retry() {
    local cmd
    local retries
    local exitcode
    cmd=$*
    let retries=0
    while [ $retries -le 10 ] ; do
        echo `date` $cmd
        bash -c "$cmd"
        exitcode=$?
        echo `date` $cmd $exitcode $retries
        let retries=retries+1
        if [ $exitcode -eq 0 ] ; then break; fi
        sleep 10
    done
    test $exitcode = 0
}

n=100
cc=gcc44
brtloader=cilk
branch=toku
revision=0
tokudb=tokudb
suffix=.
commit=0
svnserver=https://svn.tokutek.com/tokudb
basedir=$HOME/svn.build
builddir=$basedir/tokudb.build
system=`uname -s | tr [:upper:] [:lower:]`
arch=`uname -m | tr [:upper:] [:lower:]`
hostname=`hostname`
instancetype=""

# parse the command line
while [ $# -gt 0 ] ; do
    arg=$1; shift
    if [[ $arg =~ --(.*)=(.*) ]] ; then
        eval ${BASH_REMATCH[1]}=${BASH_REMATCH[2]}
    else
        usage; exit 1
    fi
done
<commit_msg>#3904 add icc to the db-benchmark-test script closes[t:3904]<commit_after>#!/usr/bin/env bash

function usage() {
    echo "run db-benchmark-test"
    echo "[--tokudb=$tokudb"
    echo "[--revision=$revision]"
    echo "[--branch=$branch]"
    echo "[--suffix=$suffix]"
    echo "[--commit=$commit]"
    echo "[--cc=$cc]"
    echo "[--n=$n]"
}

function retry() {
    local cmd
    local retries
    local exitcode
    cmd=$*
    let retries=0
    while [ $retries -le 10 ] ; do
        echo `date` $cmd
        bash -c "$cmd"
        exitcode=$?
        echo `date` $cmd $exitcode $retries
        let retries=retries+1
        if [ $exitcode -eq 0 ] ; then break; fi
        sleep 10
    done
    test $exitcode = 0
}

n=100
cc=gcc44
brtloader=cilk
branch=toku
revision=0
tokudb=tokudb
suffix=.
commit=0
svnserver=https://svn.tokutek.com/tokudb
basedir=$HOME/svn.build
builddir=$basedir/tokudb.build
system=`uname -s | tr [:upper:] [:lower:]`
arch=`uname -m | tr [:upper:] [:lower:]`
hostname=`hostname`
instancetype=""

# parse the command line
while [ $# -gt 0 ] ; do
    arg=$1; shift
    if [[ $arg =~ --(.*)=(.*) ]] ; then
        eval ${BASH_REMATCH[1]}=${BASH_REMATCH[2]}
    else
        usage; exit 1
    fi
done

if [ $cc = icc ] ; then
    d=/opt/intel/bin
    if [ -d $d ] ; then
	export PATH=$d:$PATH
	. $d/compilervars.sh intel64
    fi
    d=/opt/intel/cilkutil/bin
    if [ -d $d ] ; then
	export PATH=$d:$PATH
    fi
fi

{'fraction_non_alphanumeric': 0.1735474006116208, 'fraction_numerical': 0.0191131498470948, 'mean_word_length': 2.5557065217391304, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5880943', 'n_tokens_mistral': 1073, 'n_tokens_neox': 994, 'n_words': 246}