<commit_before>#!/bin/bash
# Script for doing an automatic nightly run of the benchmarks
warmups=2
rounds=6
log_dir="./logs"
timestamp="$(date "+%Y_%m_%d__%k_%M_%S")"

cd `dirname $0`
mkdir -p "$log_dir"

function run_benchmarks {
    echo "# This run has timestamp: $timestamp"

    echo "# Pulling in changes from git"
    git pull

    echo "# Rebuilding repg"
    (cd .. ; touch src/KMC/Program/Backends/C.hs ; cabal build)

    echo "# Compiling all Kleenex programs"
    ./compiletime.sh -l "$timestamp" -f

    echo "# Building all other programs"
    make build-benchmark-programs

    echo "# Benchmarking all programs ($warmups warmups; $rounds rounds)"
    ./runningtime.sh -w 2 -r 6 -l "$timestamp" -f

    echo "# Generating all plots"
    ./mkplots.py -l "$timestamp" -f
}

run_benchmarks > "$log_dir/nightly_$timestamp.log"
<commit_msg>Lower nightly to 1 warmup, 5 rounds<commit_after>#!/bin/bash
# Script for doing an automatic nightly run of the benchmarks
warmups=1
rounds=5
log_dir="./logs"
timestamp="$(date "+%Y_%m_%d__%k_%M_%S")"

cd `dirname $0`
mkdir -p "$log_dir"

function run_benchmarks {
    echo "# This run has timestamp: $timestamp"

    echo "# Pulling in changes from git"
    git pull

    echo "# Rebuilding repg"
    (cd .. ; touch src/KMC/Program/Backends/C.hs ; cabal build)

    echo "# Compiling all Kleenex programs"
    ./compiletime.sh -l "$timestamp" -f

    echo "# Building all other programs"
    make build-benchmark-programs

    echo "# Benchmarking all programs ($warmups warmups; $rounds rounds)"
    ./runningtime.sh -w 2 -r 6 -l "$timestamp" -f

    echo "# Generating all plots"
    ./mkplots.py -l "$timestamp" -f
}

run_benchmarks > "$log_dir/nightly_$timestamp.log"

{'fraction_non_alphanumeric': 0.1316705336426914, 'fraction_numerical': 0.0069605568445475635, 'mean_word_length': 3.3233082706766917, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4775937', 'n_tokens_mistral': 620, 'n_tokens_neox': 575, 'n_words': 182}