Skip to content
Snippets Groups Projects
Commit ab6f2f8d authored by Carl Mai's avatar Carl Mai
Browse files

add a simple configuration script to set min/max/timeout/runs

parent 5de9a30d
No related branches found
No related tags found
No related merge requests found
function csv_viewer {
column -t -s, -n "$@" | less -F -S -X -K
}
alias configure_default="/trainbenchmark/scripts/configure.sh 1 1024 900 10"
alias configure_medium="/trainbenchmark/scripts/configure.sh 8 256 60 5"
alias configure_small="/trainbenchmark/scripts/configure.sh 1 128 20 2"
alias doc_motd="bash /trainbenchmark/docs/motd"
alias doc_basic="bash /trainbenchmark/docs/basic"
alias doc_advanced="bash /trainbenchmark/docs/advanced"
......
......@@ -4,3 +4,4 @@ Use "doc_advanced" to see advanced configuration
Use "csv_view" to get a nicely formatted output of csv files
I am the Fog Frog
What the Fog?
Use "./scripts/configure.sh" to change problem sizes. Some defaults are also inside the commands "configure_default", "configure_medium", "configure_small"
#!/bin/bash
echo -e "\033[1;91mAdvanced Configuration:"
echo -e ""
echo -e "\033[1;91mCoarse Configuration"
echo -e "\033[0mUse the ./scripts/configure.sh command or configure_small or configure_medium or configure_default"
echo -e ""
echo -e "\033[1;91mGeneration of test-models"
echo -e "\033[0mFor example to change the maxSize option. Can be configured inside:"
echo -e "* trainbenchmark-scripts/src-template/GeneratorScript.groovy"
......
#!/bin/bash
echo -e "\033[1;96mQuick Start"
echo -e "\033[0m* ./gradlew generate # will generate the test-models in default settings takes ~40gb"
echo -e "\033[0m* configure_small"
echo -e "* ./gradlew generate # will generate the test-models in default settings takes ~40gb"
echo -e "* ./gradlew individualInjectBenchmark"
echo -e "* ./gradlew individualRepairBenchmark"
echo -e ""
......
#!/bin/bash
cd "$( cd "$( dirname "$0" )" && pwd )/../"||exit 1
MINSIZE="$1"
MAXSIZE="$2"
TIMEOUT="$3"
RUNS="$4"
if [ -z "$RUNS" ]
then
echo "Usage: ./scripts/configure.sh min max timeout runs"
echo "Will configure the generateor and benchmark to use problems between sizes min and max"
echo "The benchmark receives a timeout in seconds and the amount of runs"
echo "Default is: ./scripts/configure.sh 1 1024 900 10"
exit 1
fi
echo -e "\\033[1;96mRemember that this only configures and initializes. Further steps:"
echo -e "\\033[1;91mGenerate:"
echo -e "\\033[0m if not yet done run ./gradlew generate"
echo " maxSize 1024 -> ~40GB of data"
echo -e "\\033[1;91mBenchmark:"
echo -e "\\033[0m ./gradlew individualInjectBenchmark"
echo " ./gradlew individualRepairBenchmark"
sed -i "s/^def minSize =.*/def minSize = $MINSIZE/" ./trainbenchmark-scripts/src-template/GeneratorScript.groovy
sed -i "s/^def maxSize =.*/def maxSize = $MAXSIZE/" ./trainbenchmark-scripts/src-template/GeneratorScript.groovy
sed -i "s/^def minSize =.*/def minSize = $MINSIZE/" ./trainbenchmark-scripts/src-template/IndividualBenchmarkInjectScript.groovy
sed -i "s/^def maxSize =.*/def maxSize = $MAXSIZE/" ./trainbenchmark-scripts/src-template/IndividualBenchmarkInjectScript.groovy
sed -i "s/^def timeout =.*/def timeout = $TIMEOUT/" ./trainbenchmark-scripts/src-template/IndividualBenchmarkInjectScript.groovy
sed -i "s/^def runs =.*/def runs = $RUNS/" ./trainbenchmark-scripts/src-template/IndividualBenchmarkInjectScript.groovy
sed -i "s/^def minSize =.*/def minSize = $MINSIZE/" ./trainbenchmark-scripts/src-template/IndividualBenchmarkRepairScript.groovy
sed -i "s/^def maxSize =.*/def maxSize = $MAXSIZE/" ./trainbenchmark-scripts/src-template/IndividualBenchmarkRepairScript.groovy
sed -i "s/^def timeout =.*/def timeout = $TIMEOUT/" ./trainbenchmark-scripts/src-template/IndividualBenchmarkRepairScript.groovy
sed -i "s/^def runs =.*/def runs = $RUNS/" ./trainbenchmark-scripts/src-template/IndividualBenchmarkRepairScript.groovy
./gradlew --no-daemon initScripts
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment