Commit 8019fa29 authored by Jan Kiene's avatar Jan Kiene
Browse files

remove old scripts and use new one

parent 0b73ce8f
Loading
Loading
Loading
Loading
+0 −504
Original line number Diff line number Diff line
#!/bin/tcsh

# (C) 2022-2024 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
# contributors to this repository. All Rights Reserved.

# This software is protected by copyright law and by international treaties.
# The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB,
# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
# contributors to this repository retain full ownership rights in their respective contributions in
# the software. This notice grants no license of any kind, including but not limited to patent
# license, nor is any license granted by implication, estoppel or otherwise.

# Contributors are required to enter into the IVAS codec Public Collaboration agreement before making
# contributions.

# This software is provided "AS IS", without any express or implied warranties. The software is in the
# development stage. It is intended exclusively for experts who have experience with such software and
# solely for the purpose of inspection. All implied warranties of non-infringement, merchantability
# and fitness for a particular purpose are hereby disclaimed and excluded.

# Any dispute, controversy or claim arising under or in relation to providing this software shall be
# submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in
# accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
# the United Nations Convention on Contracts on the International Sales of Goods.

set maxValues = 40

if (${#argv} != 3) then
  echo usage: $0 \<input log\> \<output js file\> \<graph name\>
  exit
endif

set srcFile    = $1
set file_final = $2
set file       = ${file_final}_new_$$
set graphName  = $3


set tmpBase    = `basename $0`
set tmpFile    = /tmp/${tmpBase}_$$
rm -f ${tmpFile}
cat ${srcFile} | tail -n ${maxValues} > ${tmpFile}
set nLines = `cat ${tmpFile} | wc -l`
set maxNumWordsLine = 19

rm -f $file
touch $file

echo "var $graphName = {"                      >> $file
echo '  ram_worstcase: {'                      >> $file
echo '    description: "Worst Case RAM",'      >> $file
echo '    direction: -1,'                      >> $file
echo '    runs: ['                             >> $file

@ i = 0
foreach line ( "`cat ${tmpFile}`" )
  @ i++
  set separator = ","
  if ( $i == $nLines ) then
    set separator = "" 
  endif

  set tmp = ( $line )

  set numWords = `echo $tmp | wc -w`
  if ( $numWords < $maxNumWordsLine ) then
    continue
  endif

  set revision           = $tmp[1]
  set shortDate          = `echo $tmp[2] | sed -e "s/_/\ /g"`
  set fullDate           = `echo $tmp[3] | sed -e "s/_/\ /g"`
  set maxTotalRamEnc     = $tmp[5]
  set maxTotalRamDec     = $tmp[7]
  set maxStackEnc        = $tmp[10]
  set maxStackDec        = $tmp[12]
  set maxHeapEnc         = $tmp[15]
  set maxHeapDec         = $tmp[17]
  set logFile            = $tmp[19]

  echo '      {'                                            >> $file
  echo '        fullDate: "'${fullDate}'",'                 >> $file 
  echo '        shortDate: "'${shortDate}'",'               >> $file 
  echo '        revision: "'${revision}'",'                 >> $file 
  echo '        maxTotalRamEnc: "'${maxTotalRamEnc}'",'     >> $file 
  echo '        maxTotalRamDec: "'${maxTotalRamDec}'",'     >> $file
  echo '        maxStackEnc: "'${maxStackEnc}'",'           >> $file 
  echo '        maxStackDec: "'${maxStackDec}'",'           >> $file
  echo '        maxHeapEnc: "'${maxHeapEnc}'",'             >> $file 
  echo '        maxHeapDec: "'${maxHeapDec}'",'             >> $file
  echo '        logFile: "'${logFile}'"'                    >> $file 
  echo '      }'${separator}                                >> $file

end
echo '    ],'                                        >> $file

# begin displays
echo '    displays: ['                         >> $file

# requirement RAM	
echo '      {'                                 >> $file
echo '        lines: { show: false },'          >> $file
echo '        points: { show: false, fillColor: "#ffffff" },' >> $file
echo '        borderWidth: 1.5,'               >> $file
echo '        borderColor: "#BEBEBE",'         >> $file
echo '        markingsLineWidth: .75,'         >> $file
echo '        hoverable: true,'                >> $file
echo '        clickable: true,'                >> $file
echo '        shadowSize: 0,'                  >> $file
echo '        color: "#000000",'               >> $file
echo '        id: "requirementRam",'           >> $file
echo '        data: ['                         >> $file

@ i = 0
foreach line ( "`cat ${tmpFile}`" )
  set separator = ","
  if ( $i == $nLines - 1 ) then
    set separator = "" 
  endif

  set tmp = ( $line )

  set numWords = `echo $tmp | wc -w`
  if ( $numWords < $maxNumWordsLine ) then
    continue
  endif

  # TODO: add real requirement once decided on
  set score = 0

  echo '          ['"${i}, ${score}"']'${separator}  >> $file
  @ i++

end

echo '        ]'                               >> $file
echo '      },'                                >> $file
# requirement RAM

# maxTotalRamCodecScore		
echo '      {'                                 >> $file
echo '        lines: { show: true },'          >> $file
echo '        points: { show: true, fillColor: "#ffffff" },' >> $file
echo '        borderWidth: 1.5,'               >> $file
echo '        borderColor: "#BEBEBE",'         >> $file
echo '        markingsLineWidth: .75,'         >> $file
echo '        hoverable: true,'                >> $file
echo '        clickable: true,'                >> $file
echo '        shadowSize: 0,'                  >> $file
echo '        color: "#FF0000",'               >> $file
echo '        id: "maxTotalRamCodecScore",'    >> $file
echo '        data: ['                         >> $file

@ i = 0
foreach line ( "`cat ${tmpFile}`" )
  set separator = ","
  if ( $i == $nLines - 1 ) then
    set separator = "" 
  endif

  set tmp = ( $line )

  set numWords = `echo $tmp | wc -w`
  if ( $numWords < $maxNumWordsLine ) then
    continue
  endif

  set score = $tmp[4]

  echo '          ['"${i}, ${score}"']'${separator}  >> $file
  @ i++

end

echo '        ]'                               >> $file
echo '      },'                                >> $file
# maxTotalRamCodecScore

# maxTotalRamEncScore		
echo '      {'                                 >> $file
echo '        lines: { show: true },'          >> $file
echo '        points: { show: true, fillColor: "#ffffff" },' >> $file
echo '        borderWidth: 1.5,'               >> $file
echo '        borderColor: "#BEBEBE",'         >> $file
echo '        markingsLineWidth: .75,'         >> $file
echo '        hoverable: true,'                >> $file
echo '        clickable: true,'                >> $file
echo '        shadowSize: 0,'                  >> $file
echo '        color: "#FF8000",'               >> $file
echo '        id: "maxTotalRamEncScore",'      >> $file
echo '        data: ['                         >> $file

@ i = 0
foreach line ( "`cat ${tmpFile}`" )
  set separator = ","
  if ( $i == $nLines - 1 ) then
    set separator = "" 
  endif

  set tmp = ( $line )

  set numWords = `echo $tmp | wc -w`
  if ( $numWords < $maxNumWordsLine ) then
    continue
  endif

  set score = $tmp[6]

  echo '          ['"${i}, ${score}"']'${separator}  >> $file
  @ i++

end

echo '        ]'                               >> $file
echo '      },'                                >> $file
# maxTotalRamEncScore

# maxTotalRamDecScore		
echo '      {'                                 >> $file
echo '        lines: { show: true },'          >> $file
echo '        points: { show: true, fillColor: "#ffffff" },' >> $file
echo '        borderWidth: 1.5,'               >> $file
echo '        borderColor: "#BEBEBE",'         >> $file
echo '        markingsLineWidth: .75,'         >> $file
echo '        hoverable: true,'                >> $file
echo '        clickable: true,'                >> $file
echo '        shadowSize: 0,'                  >> $file
echo '        color: "#FFFF00",'               >> $file
echo '        id: "maxTotalRamDecScore",'      >> $file
echo '        data: ['                         >> $file

@ i = 0
foreach line ( "`cat ${tmpFile}`" )
  set separator = ","
  if ( $i == $nLines - 1 ) then
    set separator = "" 
  endif

  set tmp = ( $line )

  set numWords = `echo $tmp | wc -w`
  if ( $numWords < $maxNumWordsLine ) then
    continue
  endif

  set score = $tmp[8]

  echo '          ['"${i}, ${score}"']'${separator}  >> $file
  @ i++

end

echo '        ]'                               >> $file
echo '      },'                                >> $file
# maxTotalRamDecScore

# maxStackCodecScore		
echo '      {'                                 >> $file
echo '        lines: { show: true },'          >> $file
echo '        points: { show: true, fillColor: "#ffffff" },' >> $file
echo '        borderWidth: 1.5,'               >> $file
echo '        borderColor: "#BEBEBE",'         >> $file
echo '        markingsLineWidth: .75,'         >> $file
echo '        hoverable: true,'                >> $file
echo '        clickable: true,'                >> $file
echo '        shadowSize: 0,'                  >> $file
echo '        color: "#004000",'               >> $file
echo '        id: "maxStackCodecScore",'       >> $file
echo '        data: ['                         >> $file

@ i = 0
foreach line ( "`cat ${tmpFile}`" )
  set separator = ","
  if ( $i == $nLines - 1 ) then
    set separator = "" 
  endif

  set tmp = ( $line )

  set numWords = `echo $tmp | wc -w`
  if ( $numWords < $maxNumWordsLine ) then
    continue
  endif

  set score = $tmp[9]

  echo '          ['"${i}, ${score}"']'${separator}  >> $file
  @ i++

end

echo '        ]'                               >> $file
echo '      },'                                >> $file
# maxStackCodecScore


# maxStackEncScore		
echo '      {'                                 >> $file
echo '        lines: { show: true },'          >> $file
echo '        points: { show: true, fillColor: "#ffffff" },' >> $file
echo '        borderWidth: 1.5,'               >> $file
echo '        borderColor: "#BEBEBE",'         >> $file
echo '        markingsLineWidth: .75,'         >> $file
echo '        hoverable: true,'                >> $file
echo '        clickable: true,'                >> $file
echo '        shadowSize: 0,'                  >> $file
echo '        color: "#008000",'               >> $file
echo '        id: "maxStackEncScore",'         >> $file
echo '        data: ['                         >> $file

@ i = 0
foreach line ( "`cat ${tmpFile}`" )
  set separator = ","
  if ( $i == $nLines - 1 ) then
    set separator = "" 
  endif

  set tmp = ( $line )

  set numWords = `echo $tmp | wc -w`
  if ( $numWords < $maxNumWordsLine ) then
    continue
  endif

  set score = $tmp[11]

  echo '          ['"${i}, ${score}"']'${separator}  >> $file
  @ i++

end

echo '        ]'                               >> $file
echo '      },'                                >> $file
# maxStackEncScore

# maxStackDecScore		
echo '      {'                                 >> $file
echo '        lines: { show: true },'          >> $file
echo '        points: { show: true, fillColor: "#ffffff" },' >> $file
echo '        borderWidth: 1.5,'               >> $file
echo '        borderColor: "#BEBEBE",'         >> $file
echo '        markingsLineWidth: .75,'         >> $file
echo '        hoverable: true,'                >> $file
echo '        clickable: true,'                >> $file
echo '        shadowSize: 0,'                  >> $file
echo '        color: "#00FF00",'               >> $file
echo '        id: "maxStackDecScore",'         >> $file
echo '        data: ['                         >> $file

@ i = 0
foreach line ( "`cat ${tmpFile}`" )
  set separator = ","
  if ( $i == $nLines - 1 ) then
    set separator = "" 
  endif

  set tmp = ( $line )

  set numWords = `echo $tmp | wc -w`
  if ( $numWords < $maxNumWordsLine ) then
    continue
  endif

  set score = $tmp[13]

  echo '          ['"${i}, ${score}"']'${separator}  >> $file
  @ i++

end

echo '        ]'                               >> $file
echo '      },'                                >> $file
# maxStackDecScore

# maxHeapCodecScore		
echo '      {'                                 >> $file
echo '        lines: { show: true },'          >> $file
echo '        points: { show: true, fillColor: "#ffffff" },' >> $file
echo '        borderWidth: 1.5,'               >> $file
echo '        borderColor: "#BEBEBE",'         >> $file
echo '        markingsLineWidth: .75,'         >> $file
echo '        hoverable: true,'                >> $file
echo '        clickable: true,'                >> $file
echo '        shadowSize: 0,'                  >> $file
echo '        color: "#800080",'               >> $file
echo '        id: "maxHeapCodecScore",'   >> $file
echo '        data: ['                         >> $file

@ i = 0
foreach line ( "`cat ${tmpFile}`" )
  set separator = ","
  if ( $i == $nLines - 1 ) then
    set separator = "" 
  endif

  set tmp = ( $line )

  set numWords = `echo $tmp | wc -w`
  if ( $numWords < $maxNumWordsLine ) then
    continue
  endif

  set score = $tmp[14]

  echo '          ['"${i}, ${score}"']'${separator}  >> $file
  @ i++

end

echo '        ]'                               >> $file
echo '      },'                                >> $file
# maxHeapCodecScore

# maxHeapEncScore		
echo '      {'                                 >> $file
echo '        lines: { show: true },'          >> $file
echo '        points: { show: true, fillColor: "#ffffff" },' >> $file
echo '        borderWidth: 1.5,'               >> $file
echo '        borderColor: "#BEBEBE",'         >> $file
echo '        markingsLineWidth: .75,'         >> $file
echo '        hoverable: true,'                >> $file
echo '        clickable: true,'                >> $file
echo '        shadowSize: 0,'                  >> $file
echo '        color: "#0000FF",'               >> $file
echo '        id: "maxHeapEncScore",'     >> $file
echo '        data: ['                         >> $file

@ i = 0
foreach line ( "`cat ${tmpFile}`" )
  set separator = ","
  if ( $i == $nLines - 1 ) then
    set separator = "" 
  endif

  set tmp = ( $line )

  set numWords = `echo $tmp | wc -w`
  if ( $numWords < $maxNumWordsLine ) then
    continue
  endif

  set score = $tmp[16]

  echo '          ['"${i}, ${score}"']'${separator}  >> $file
  @ i++

end

echo '        ]'                               >> $file
echo '      },'                                >> $file
# maxHeapEncScore

# maxHeapDecScore		
echo '      {'                                 >> $file
echo '        lines: { show: true },'          >> $file
echo '        points: { show: true, fillColor: "#ffffff" },' >> $file
echo '        borderWidth: 1.5,'               >> $file
echo '        borderColor: "#BEBEBE",'         >> $file
echo '        markingsLineWidth: .75,'         >> $file
echo '        hoverable: true,'                >> $file
echo '        clickable: true,'                >> $file
echo '        shadowSize: 0,'                  >> $file
echo '        color: "#0080C0",'               >> $file
echo '        id: "maxHeapDecScore",'     >> $file
echo '        data: ['                         >> $file

@ i = 0
foreach line ( "`cat ${tmpFile}`" )
  set separator = ","
  if ( $i == $nLines - 1 ) then
    set separator = "" 
  endif

  set tmp = ( $line )

  set numWords = `echo $tmp | wc -w`
  if ( $numWords < $maxNumWordsLine ) then
    continue
  endif

  set score = $tmp[18]

  echo '          ['"${i}, ${score}"']'${separator}  >> $file
  @ i++

end

echo '        ]'                               >> $file
echo '      }'                                 >> $file
# maxHeapDecScore

echo '    ]'                                   >> $file 
# end displays
       
echo '  }'                                     >> $file
echo '};'                                      >> $file

mv -f $file $file_final
rm -f $tmpFile
+0 −535

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −500

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −503

File deleted.

Preview size limit exceeded, changes collapsed.

+2 −13
Original line number Diff line number Diff line
@@ -82,28 +82,17 @@ ret_val=$?
### WMOPS
${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

# 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

# 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

# generate java script from database
tcsh ${scriptDir}/genWebpageData_Rom.csh ${destDir}/wmops/log_rom_all.txt ${destDir}/wmops/graphs_rom_flc.js Graphs_ROM
# generate javascript code from log files
python3 ci/complexity_measurements/genWebpageData.py ${destDir}/wmops/log_wmops_all.txt ${wmopsFilenameFlc}_WMOPS.csv ${destDir}/wmops/log_ram_all.txt ${destDir}/wmops/log_rom_all.txt

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