<commit_before>#!/bin/bash

DIR=$(readlink -f $(dirname $0))

usage() {
echo <<-EOF

  $0 [options]

  -d driver name (mysql or postgresql)
  -n number of runs
  -r number of records to create
  -h this message

EOF
}

DRIVER='postgresql'
ITER=5
ROWS=500

while getopts "d:n:r:h" OPTION
do
  case $OPTION in
    d) DRIVER=$OPTARG;;
    n) ITER=$OPTARG;;
    r) ROWS=$OPTARG;;
    h) usage; exit 0;;
    *) usage; exit 1;;
  esac
done

echo ""
echo "-- driver: $DRIVER rows: $ROWS runs: $ITER --"
echo ""

$DIR/dm.rb    $DRIVER $ROWS $ITER
$DIR/ar.rb    $DRIVER $ROWS $ITER
$DIR/swift.rb $DRIVER $ROWS $ITER<commit_msg>sleep a little between script runs<commit_after>#!/bin/bash

DIR=$(readlink -f $(dirname $0))

usage() {
cat <<-EOF

  $0 [options]

  -d driver name (mysql or postgresql)
  -n number of runs
  -r number of records to create
  -h this message

EOF
}

DRIVER='postgresql'
ITER=5
ROWS=500

while getopts "d:n:r:h" OPTION
do
  case $OPTION in
    d) DRIVER=$OPTARG;;
    n) ITER=$OPTARG;;
    r) ROWS=$OPTARG;;
    h) usage; exit 0;;
    *) usage; exit 1;;
  esac
done

echo ""
echo "-- driver: $DRIVER rows: $ROWS runs: $ITER --"
echo ""

$DIR/dm.rb    $DRIVER $ROWS $ITER
sleep 2
$DIR/ar.rb    $DRIVER $ROWS $ITER
sleep 2
$DIR/swift.rb $DRIVER $ROWS $ITER
{'fraction_non_alphanumeric': 0.15880503144654087, 'fraction_numerical': 0.014150943396226415, 'mean_word_length': 3.106451612903226, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '2716254', 'n_tokens_mistral': 538, 'n_tokens_neox': 517, 'n_words': 162}