Changeset b217a30


Ignore:
Timestamp:
06/11/2020 01:59:59 PM (4 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
ablfs-more, legacy, trunk
Children:
b33c6ee
Parents:
22bb166
Message:

Fix sbu-du calculations for the new numbering

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/create-sbu_du-report.sh

    r22bb166 rb217a30  
    5151
    5252# Parse only that logs that have time data
    53 BUILDLOGS="`grep -l "^Totalseconds:" ${LOGSDIR}/*`"
     53pushd ${LOGSDIR}
     54BUILDLOGS="`grep -l "^Totalseconds:" * | sort -n`"
    5455
    5556# Match the first timed log to extract the SBU unit value from it
    56 FIRSTLOG=`grep -l "^Totalseconds:" $LOGSDIR/* | head -n1`
    57 BASELOG=`grep -l "^Totalseconds:" $LOGSDIR/???-binutils* | head -n1`
     57FIRSTLOG=`grep -l "^Totalseconds:" * | sort -n | head -n1`
     58BASELOG=`grep -l "^Totalseconds:" ???-binutils* | head -n1`
    5859echo -e "\nUsing ${BASELOG#*[[:digit:]]-} to obtain the SBU unit value."
    5960SBU_UNIT=`sed -n 's/^Totalseconds:\s\([[:digit:]]*\)$/\1/p' $BASELOG`
     61popd
    6062echo -e "\nThe SBU unit value is equal to $SBU_UNIT seconds.\n"
    6163echo -e "\n\n$LINE\n\nThe SBU unit value is equal to $SBU_UNIT seconds.\n" >> "$REPORT"
     
    7476# Start SBU calculation
    7577# Build time
    76   TIME=`sed -n 's/^Totalseconds:\s\([[:digit:]]*\)$/\1/p' $log`
     78  TIME=`sed -n 's/^Totalseconds:\s\([[:digit:]]*\)$/\1/p' ${LOGSDIR}/$log`
    7779  SECS=`perl -e 'print ('$TIME' % '60')';`
    7880  MINUTES=`perl -e 'printf "%.0f" , (('$TIME' - '$SECS') / '60')';`
     
    8486# Start disk usage calculation
    8587# Disk usage before unpacking the package
    86   DU1=`grep "^KB: " $log | head -n1 | cut -f1 | sed -e 's/KB: //'`
     88  DU1=`grep "^KB: " ${LOGSDIR}/$log | head -n1 | cut -f1 | sed -e 's/KB: //'`
    8789  DU1MB=`perl -e 'printf "%.3f" , ('$DU1' / '1024')';`
    8890# Disk usage before deleting the source and build dirs
    89   DU2=`grep "^KB: " $log | tail -n1 | cut -f1 | sed -e 's/KB: //'`
     91  DU2=`grep "^KB: " ${LOGSDIR}/$log | tail -n1 | cut -f1 | sed -e 's/KB: //'`
    9092  DU2MB=`perl -e 'printf "%.3f" , ('$DU2' / '1024')';`
    9193# Calculate disk space required to do the build
Note: See TracChangeset for help on using the changeset viewer.