Skip to content
Snippets Groups Projects
Commit 07882902 authored by Johannes Mey's avatar Johannes Mey
Browse files

Merge branch 'artifact-evaluation' of...

Merge branch 'artifact-evaluation' of git-st.inf.tu-dresden.de:stgroup/trainbenchmark into artifact-evaluation
parents 265160ce f7a65674
No related branches found
No related tags found
No related merge requests found
.gitlab-ci
Dockerfile
.dockerignore
models
.git
......@@ -22,21 +22,20 @@ RUN apt-get update -y && apt-get install -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY trainbenchmark-reporting/install.R /trainbenchmark/trainbenchmark-reporting/install.R
COPY trainbenchmark/trainbenchmark-reporting/install.R /trainbenchmark/trainbenchmark-reporting/install.R
RUN Rscript /trainbenchmark/trainbenchmark-reporting/install.R
#USER user
WORKDIR /trainbenchmark
COPY --chown=user:user . .
COPY --chown=user:user trainbenchmark/ /trainbenchmark/
COPY --chown=user:user docker /trainbenchmark/docker
COPY docker/bashrc /home/user/.bashrc
RUN ./gradlew --no-daemon preprocess
RUN ./gradlew --no-daemon build shadowJar -x test
RUN ./gradlew --no-daemon initScripts
# when benchmarking run:
# RUN ./gradlew --no-daemon generate
# RUN ./gradlew --no-daemon individualInjectBenchmark
......
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 32 20 3"
alias doc_motd="bash /trainbenchmark/docs/motd"
alias doc_basic="bash /trainbenchmark/docs/basic"
alias doc_advanced="bash /trainbenchmark/docs/advanced"
alias frogsay="/usr/games/cowsay -f /trainbenchmark/docker/frog.cow"
alias frogsay_tip="shuf -n 1 /trainbenchmark/docker/tips | frogsay"
doc_motd
$the_cow =<<"EOC"
$thoughts
___ _--_
/ - / \\
( OOO \\ ( @@ )
| OOO _;\\-/| @@@_|
\\___/######\\___/\\
/##############\\
/ ###### ## #|
/ ##@##@## |
/ ###### ## \\
<______-------___\\ . //_
| ____ | | //# \\__~__
\\ $tongue \\ //### \\ \\
| /\' ## ## ##\\ __--~--_
\\_________- /\\ ) ^ ##|--########\\
/--~-_\\________/_ | #@##|#######Y##|
| \\ ` /| /O/ ( ### \') ##/######/###/
\\ \\ | | -- | ### /LLLLL--###/
\\_ \\/ | \\_ \\ ) /####_____--
___ / \\ / | _-####\\
(___/ -\\_________/ / -- |#####@@@@@@\'_
(__\\_ __,) (.___ ,/ /##### `@@
| -\\\\- //-// @@ @@@@@.
| | \\\\_ _// // @\' \'@@.
(.) \\_) / / // @@@
(_) (_\'
EOC
Did you know? You can use "doc_motd" to display the login message
Use "doc_basic" to display the basic commands to run the benchmark
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/sh
docker build -t trainbenchmark .
docker run -it trainbenchmark
#!/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"
echo -e "When you are finished, run:"
echo -e "* ./gradlew initScripts"
echo -e "* ./gradlew generate"
echo -e ""
echo -e "\033[1;91mBenchmarking"
echo -e "\033[0mCan be configured inside:"
echo -e "* trainbenchmark-scripts/src-template/IndividualBenchmarkInjectScript.groovy"
echo -e "* trainbenchmark-scripts/src-template/IndividualBenchmarkRepairScript.groovy"
echo -e "When you are finished, run:"
echo -e "* ./gradlew initScripts"
echo -e "* ./gradlew individualInjectBenchmark"
echo -e "* ./gradlew individualRepairBenchmark"
#!/bin/bash
echo -e "\033[1;96mQuick Start"
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 ""
echo -e "\033[1;96mReading the Benchmark results"
echo -e "\033[0mResults of individualInjectBenchmark and individualRepairBenchmark are stored inside:"
echo -e "* XXXX for graphs"
echo -e "* XXXX for csv - use command: csv_viewer data.csv"
#!/bin/bash
# echo -e " "
# echo -e " * ) ) ) ) "
# echo -e " ) /( ( ) ( ( /( ( ( /( ) ) ( ( /( "
# echo -e " ( )(_)))( ( /( )\ ( )\()) ))\ ( ( )\()) ( ( /( )( )\()) "
# echo -e "(_(_())(()\ )(_))((_) )\ ) ((_)\ /((_) )\ ) )\ ((_)\ )\ ' )(_))(()\ ((_)\ "
# echo -e "|_ _| ((_)((_)_ (_) _(_/( | |(_)(_)) _(_/( ((_)| |(_) _((_)) ((_)_ ((_)| |(_) "
# echo -e " | | | '_|/ _' | | || ' \))| '_ \/ -_)| ' \))/ _| | ' \ | ' \()/ _' || '_|| / / "
# echo -e " |_| |_| \__,_| |_||_||_| |_.__/\___||_||_| \__| |_||_||_|_|_| \__,_||_| |_\_\ "
# echo -e " "
echo "Welcome to the Trainbenchmark! I'll be your guide.. just type frogsay_tip" | /usr/games/cowsay -f /trainbenchmark/docker/frog.cow
#DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
#bash $DIR/basic
echo -e ""
echo -e "\033[1;96mDocumentation"
echo -e "\033[0mRun the following commands"
echo -e "* doc_motd # displays this message"
echo -e "* doc_basic # displays the basic guide"
echo -e "* doc_advanced # displays the advanced guide"
echo -e ""
# bash $DIR/advanced
#!/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 "Configuring the source with:"
echo "minSize: $MINSIZE"
echo "maxSize: $MAXSIZE"
echo "timeout: $TIMEOUT"
echo "runs: $RUNS"
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 " but beware: 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