From 6e74c84d93c0aad089a1114d9eefb228601f5627 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 6 Nov 2024 13:25:34 +0100 Subject: [PATCH] add arg for BASOP and adjust naming of logfiles --- ci/complexity_measurements/getWmops.sh | 58 +++++++++++++++----------- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/ci/complexity_measurements/getWmops.sh b/ci/complexity_measurements/getWmops.sh index 3e2bcefc24..8781c860bd 100755 --- a/ci/complexity_measurements/getWmops.sh +++ b/ci/complexity_measurements/getWmops.sh @@ -29,31 +29,40 @@ # the United Nations Convention on Contracts on the International Sales of Goods. function usage { - echo "Usage: $0 \"ivas-format(s)\" \"output-format(s)\" \"mode{full(default)|mem_only}\"" + echo "Usage: $0 \"ivas-format(s)\" \"output-format(s)\" \"mode{full(default)|mem_only}\" \"repo{float(default)|basop}\" " exit 1 } -if [ $# -ne 2 ] && [ $# -ne 3 ]; then - usage +if [ $# -ne 2 ] && [ $# -ne 3 ] && [ $# -ne 4 ]; then + usage fi ivas_format=$1 output_format="$2" mode_arg_script="" -if [ $# -eq 3 ]; then - if [ "$3" = "mem_only" ]; then - mode_arg_script="--wmc_tool_mem_only" - elif [ "$3" != "full" ]; then - usage - fi +if [ $# -ge 3 ]; then + if [ "$3" = "mem_only" ]; then + mode_arg_script="--wmc_tool_mem_only" + elif [ "$3" != "full" ]; then + usage + fi fi -date=`date +%Y%m%d` # used for log-file file ending -shortDate=`date "+%b %d" | sed -e "s/\ /_/g"` # stored in the log-file -fullDate=`date "+%c" | sed -e "s/\ /_/g"` # stored in the log-file - -commit_sha=`git rev-parse --short HEAD` +repo_arg_script="" +if [ $# -eq 4 ]; then + if [ "$4" = "basop" ]; then + repo_arg_script="--basop" + elif [ "$4" != "float"]; then + usage + fi +fi + +date=$(date +%Y%m%d) # used for log-file file ending +shortDate=$(date "+%b %d" | sed -e "s/\ /_/g") # stored in the log-file +fullDate=$(date "+%c" | sed -e "s/\ /_/g") # stored in the log-file + +commit_sha=$(git rev-parse --short HEAD) destDir="." scriptDir="ci/complexity_measurements" @@ -62,7 +71,7 @@ ep="${scriptDir}/ep_10pct_fer.g192" config_file="scripts/config/ci_linux_ltv.json" # get wmops newsletter -wmopsFilenameFlcLast=wmops_newsletter_stereo__${commit_sha}_${date} +wmopsFilenameFlcLast=wmops_newsletter_${ivas_format}_to_${output_format}__${commit_sha}_${date} wmopsFilenameFlc=${destDir}/wmops/logs/${wmopsFilenameFlcLast} ret_val=0 @@ -70,17 +79,17 @@ ret_val=0 mode_arg="" # for OSBA, there are just too many modes... -> only select HOA3 ones if [ "$ivas_format" == "OSBA" ]; then - osba_hoa3_modes=$(./scripts/runIvasCodec.py -C OSBA -l | grep "HOA3") - mode_arg="-m $osba_hoa3_modes" + osba_hoa3_modes=$(./scripts/runIvasCodec.py -C OSBA -l | grep "HOA3") + mode_arg="-m $osba_hoa3_modes" fi # instrument and build -./scripts/IvasBuildAndRunChecks.py $mode_arg_script -p $config_file --checks COMPLEXITY --create_complexity_tables ${wmopsFilenameFlc} -C $ivas_format $mode_arg -f ${ep} --oc $output_format +./scripts/IvasBuildAndRunChecks.py $mode_arg_script $repo_arg_script -p $config_file --checks COMPLEXITY --create_complexity_tables ${wmopsFilenameFlc} -C $ivas_format $mode_arg -f ${ep} --oc $output_format ret_val=$? # get the info on worst-case operating point: WMOPS number, enc-operating mode, dec-operating mode ### WMOPS -${scriptDir}/parseNewsletterWmops.py ${wmopsFilenameFlc}_WMOPS.csv ${wmopsFilenameFlcLast}_WMOPS.csv ${commit_sha} ${shortDate} ${fullDate} >> ${destDir}/wmops/log_wmops_all.txt +${scriptDir}/parseNewsletterWmops.py ${wmopsFilenameFlc}_WMOPS.csv ${wmopsFilenameFlcLast}_WMOPS.csv ${commit_sha} ${shortDate} ${fullDate} >>${destDir}/wmops/log_wmops_all.txt # now update the webpage tcsh ${scriptDir}/genWebpageData_WMOPS.csh ${destDir}/wmops/log_wmops_all.txt ${destDir}/wmops/graphs_wmops_flc.js Graphs_WMOPS @@ -88,26 +97,25 @@ tcsh ${scriptDir}/genWebpageData_WMOPS.csh ${destDir}/wmops/log_wmops_all.txt ${ # per mode graph tcsh ${scriptDir}/genWebpageData_WmopPerOperatingpoint.csh ${wmopsFilenameFlc}_WMOPS.csv ${destDir}/wmops/graphs_wmops_flc_perOP.js Graphs_WMOPS_perOP - # get memory info for webpage ### RAM -${scriptDir}/mergeNewsletterRam.py ${wmopsFilenameFlc}_HEAP.csv ${wmopsFilenameFlc}_STACK.csv > ${wmopsFilenameFlc}_RAM.csv -${scriptDir}/parseNewsletterRam.py ${wmopsFilenameFlc}_HEAP.csv ${wmopsFilenameFlc}_STACK.csv ${wmopsFilenameFlcLast}_RAM.csv ${commit_sha} ${shortDate} ${fullDate} >> ${destDir}/wmops/log_ram_all.txt +${scriptDir}/mergeNewsletterRam.py ${wmopsFilenameFlc}_HEAP.csv ${wmopsFilenameFlc}_STACK.csv >${wmopsFilenameFlc}_RAM.csv +${scriptDir}/parseNewsletterRam.py ${wmopsFilenameFlc}_HEAP.csv ${wmopsFilenameFlc}_STACK.csv ${wmopsFilenameFlcLast}_RAM.csv ${commit_sha} ${shortDate} ${fullDate} >>${destDir}/wmops/log_ram_all.txt # generate java script from database tcsh ${scriptDir}/genWebpageData_Ram.csh ${destDir}/wmops/log_ram_all.txt ${destDir}/wmops/graphs_ram_flc.js Graphs_RAM ### ROM -${scriptDir}/mergeNewsletterRom.py ${wmopsFilenameFlc}_PROM.csv ${wmopsFilenameFlc}_TROM.csv > ${wmopsFilenameFlc}_ROM.csv -${scriptDir}/parseNewsletterRom.py ${wmopsFilenameFlc}_PROM.csv ${wmopsFilenameFlc}_TROM.csv ${wmopsFilenameFlcLast}_ROM.csv ${commit_sha} ${shortDate} ${fullDate} >> ${destDir}/wmops/log_rom_all.txt +${scriptDir}/mergeNewsletterRom.py ${wmopsFilenameFlc}_PROM.csv ${wmopsFilenameFlc}_TROM.csv >${wmopsFilenameFlc}_ROM.csv +${scriptDir}/parseNewsletterRom.py ${wmopsFilenameFlc}_PROM.csv ${wmopsFilenameFlc}_TROM.csv ${wmopsFilenameFlcLast}_ROM.csv ${commit_sha} ${shortDate} ${fullDate} >>${destDir}/wmops/log_rom_all.txt # generate java script from database tcsh ${scriptDir}/genWebpageData_Rom.csh ${destDir}/wmops/log_rom_all.txt ${destDir}/wmops/graphs_rom_flc.js Graphs_ROM python3 ${scriptDir}/check_for_changes.py ${destDir}/wmops/log_wmops_all.txt ${destDir}/wmops/log_ram_all.txt ${destDir}/wmops/log_rom_all.txt if [ "$?" != "0" ]; then - ret_val=1 + ret_val=1 fi exit $ret_val -- GitLab