<commit_before>#!/bin/bash

# This script is to benchmark the some examples simulations that can be found
# in examples/msg/ folder.
# The benchmark is done with both Constant and Precise mode, using
# different sizes and number of threads (which can be modified).
# This script also generate a table with all the times gathered, that can ease
# the plotting, compatible with gnuplot/R.

###############################################################################
# MODIFIABLE PARAMETERS: SGPATH, SGHASH, sizes, threads, log_folder, file_table
# host_info, timefmt, cp_cmd, dest, example.

# Change this for the example of examples/msg/ you want to try (tested with
# Pastry, Chord, Kademlia).
example="chord"

# Path to installation folder needed to recompile the example
# If it is not set, assume that the path is '/usr/local'
if [ -z "$1" ]
then
    SGPATH='/usr/local'
else
    SGPATH=$1
fi

# Save the revision of SimGrid used for the experiment
SGHASH=$(git rev-parse --short HEAD)

# List of sizes to test. Modify this to add different sizes.
sizes=(1000 10000 25000 50000 75000)

# Number of threads to test. 
threads=(1 2 4 8 16 24)

# Path where to store logs, and filenames of times table, host info
log_folder="log/"
if [ ! -d "$log_folder" ]; then
    echo "Creating $log_folder folder"
    mkdir -p $log_folder
fi

file_table="timings_$SGHASH.csv"
host_info="host_info.org"
rm -rf $host_info

# The las %U is just to ease the parsing for table
timefmt="clock:%e user:%U sys:%S telapsed:%e swapped:%W exitval:%x max:%Mk avg:%Kk %U"

# Copy command. This way one can use cp, scp and a local folder or a folder in <commit_msg>small change in testall<commit_after>#!/bin/bash

# This script is to benchmark the some examples simulations that can be found
# in examples/msg/ folder.
# The benchmark is done with both Constant and Precise mode, using
# different sizes and number of threads (which can be modified).
# This script also generate a table with all the times gathered, that can ease
# the plotting, compatible with gnuplot/R.

###############################################################################
# MODIFIABLE PARAMETERS: SGPATH, SGHASH, sizes, threads, log_folder, file_table
# host_info, timefmt, cp_cmd, dest, example.

# Change this for the example of examples/msg/ you want to try (tested with
# Pastry, Chord, Kademlia).
example="chord"

# Path to installation folder needed to recompile the example
# If it is not set, assume that the path is '/usr/local'
if [ -z "$1" ]
then
    SGPATH='/usr/local'
else
    SGPATH=$1
fi

# Save the revision of SimGrid used for the experiment
SGHASH=$(git rev-parse --short HEAD)

# List of sizes to test. Modify this to add different sizes.
sizes=(1000 10000 25000 50000 75000)

# Number of threads to test. 
threads=(1 2 4 8 16 24)

# Path where to store logs, and filenames of times table, host info
log_folder="log/"
if [ ! -d "$log_folder" ]; then
    echo "Creating $log_folder folder"
    mkdir -p $log_folder
fi

file_table="timings_$SGHASH.csv"
host_info="host_info.org"
rm -rf $host_info

# The las %U is just to ease the parsing for table
timefmt="clock:%e user:%U sys:%S telapsed:%e swapped:%W exitval:%x max:%Mk avg:%Kk %e"

# Copy command. This way one can use cp, scp and a local folder or a folder in 
{'fraction_non_alphanumeric': 0.13539769277474195, 'fraction_numerical': 0.020643594414086218, 'mean_word_length': 4.383986928104576, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5660423', 'n_tokens_mistral': 1082, 'n_tokens_neox': 1005, 'n_words': 447}