diff --git a/DRAMSys/simulator/resources/scripts/dramSylva/README b/DRAMSys/simulator/resources/scripts/dramSylva/README index 71a2c0ee..7dfaac4f 100644 --- a/DRAMSys/simulator/resources/scripts/dramSylva/README +++ b/DRAMSys/simulator/resources/scripts/dramSylva/README @@ -24,8 +24,11 @@ $ cd build/simulator $ vim output* $ ls *.tdb -Additionally, the almighty dramSylva executes a plot generator script (already -provided in DRAMSys' repository) for every database file created. +The almighty dramSylva executes a plot generator script (already provided in +DRAMSys' repository) for every database file created. + +Additionally, to top it all off, dramSylva creates a text output with the +metrics for each database file. ------------------------------------------------------------------------------ Why is it called dramSylva? diff --git a/DRAMSys/simulator/resources/scripts/dramSylva/dramSylva.sh b/DRAMSys/simulator/resources/scripts/dramSylva/dramSylva.sh index 05ac71fb..bfed34cb 100755 --- a/DRAMSys/simulator/resources/scripts/dramSylva/dramSylva.sh +++ b/DRAMSys/simulator/resources/scripts/dramSylva/dramSylva.sh @@ -30,7 +30,9 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# Author: Éder F. Zulian +# Authors: +# Éder F. Zulian +# Ana Mativi set -x @@ -52,6 +54,8 @@ clocks=" 1000 " +# Git user +git_user="$USER" # Regular DRAMSys text output is redirected to files which names are based on # the prefix and extension defined here. out_prefix="output" @@ -62,6 +66,8 @@ base_dir=$PWD db_ext="tdb" # Python script to generate plots plots_script="plots.py" +# Python script to generate metrics +metrics_script="metrics.py" # Python interpreter to use python_interpreter="python3" @@ -69,7 +75,15 @@ python_interpreter="python3" function systole { local current_time=$(date "+%Y.%m.%d-%H.%M.%S") root_dir="dram.vp.system_$current_time" - `git clone --recursive git@git.rhrk.uni-kl.de:EIT-Wehn/dram.vp.system.git $root_dir` + echo -e "Cloning. Please be patient...\n" + git clone --recursive git@git.rhrk.uni-kl.de:EIT-Wehn/dram.vp.system.git $root_dir --quiet + local success=$? + if [[ $success -eq 0 ]]; then + echo -e "Clone succeeded\n" + else + echo -e "Cloning failed. Trying with HTTPS...\n" + git clone --recursive https://$git_user@git.rhrk.uni-kl.de/EIT-Wehn/dram.vp.system.git $root_dir --quiet + fi cd $root_dir git checkout master git pull @@ -150,7 +164,16 @@ function ecg { local dbfiles=`ls *.${db_ext}` local pspath="$(dirname $(find $base_dir/$root_dir -depth -name $plots_script))" for f in $dbfiles; do - $python_interpreter $pspath/$plots_script $f + $python_interpreter $pspath/$plots_script $f + done +} + +# Create metrics +function metrics { + local dbfiles=`ls *.${db_ext}` + local mspath="$(dirname $(find $base_dir/$root_dir -depth -name $metrics_script))" + for f in $dbfiles; do + $python_interpreter $mspath/$metrics_script $f > ${f}_metrics.$out_ext done } @@ -158,3 +181,4 @@ systole heartbeat washup ecg +metrics diff --git a/README.md b/README.md index 6025bcc0..71d3680d 100644 --- a/README.md +++ b/README.md @@ -852,6 +852,18 @@ $ cd build/simulator/ $ ./dramSys > output ``` +#### Log Collector Script +Users can profit of running multiple simulations automatically with dramSylva. + +Example on how to run the script: + +``` bash +$ cd DRAMSys/simulator/resources/scripts/dramSylva +$ chmod u+x dramSylva.sh +$ ./dramSylva +``` +More detailed information is available in [dramSylva folder](DRAMSys/simulator/resources/scripts/dramSylva). + #### DRAMsys Diagrams - **Payload Extension information**