littlebat wrote:
> Hi,
> 
> I try to measure SBU when installing every package with command 
> "time {}" and consider post my measure into
> " http://www.linuxfromscratch.org/~sbu ". 
> 
> 
> 1, If only those packages marked "SBU testsuite included" should include
> the time spent on test into SBU measure? 
> 
> 2, Or, don't include the test time in SBU measure of any package? 
> 
> 3, Or, include every steps from the configuration, up to and including
> the first install just like the description in page
> "http://www.linuxfromscratch.org/lfs/view/stable/chapter05/binutils-pass1.html";?
> 
> If I measure the SBU of "
> http://www.linuxfromscratch.org/lfs/view/stable/chapter05/tcl.html ",
> using: 
> 
> The first method: 
> time { ./configure --prefix=/tools && make && make install; }
> 
> The second:
> time { ./configure --prefix=/tools && make && make install; }
> 
> The third:
> time { ./configure --prefix=/tools && make && TZ=UTC make test && make \
> install; }
> 
> Which method should I use?

I don't see a difference between 1 and 2.  In any case, I recommend 
using times without tests in Chapert 5 and with tests in Chapter 6. 
Note that the SBU site has not been updated in several years and the set 
of packages on the site and in the book do not match up exactly any more.

The TZ is not needed in any case.  My BLFS scripts look something like 
the following, but I use jhalfs for LFS times.

   -- Bruce


#!/bin/bash

source /usr/src/stats

#######################
# Installing program

DIR=`pwd`
PROGRAM=<program>
LOG=$DIR/$PROGRAM.log
TITLE=$PROGRAM
TIMEFORMAT="$TIMEFMT $TITLE"

BUILDDIR=/tmp/<program-base>
DEST=$BUILDDIR/install
rm -rf $BUILDDIR
mkdir $BUILDDIR
cd $BUILDDIR

before=`df -k / | grep / | sed -e "s/ \{2,\}/ /g" | cut -d' ' -f3`


tar -xf $DIR/$PROGRAM.tar.?z* || exit 1

cd $PROGRAM
{ time \
   {
     echo Making $TITLE
     date

     ./configure --prefix=/usr &&
     make &&
     make DESTDIR=$DEST install

   }
} 2>&1 | tee -a $LOG

if [ $PIPESTATUS -ne 0 ]; then exit 1; fi;

stats $LOG $DIR/$PROGRAM.tar.?z* $before

exit 0

---------file stats
function stats()
{
   log=$1
   tarball=$2
   b4=$3

   free_now=`df -k / | grep / | sed -e "s/ \{2,\}/ /g" | cut -d" " -f3`

   buildtime=`tail -n1 $log|cut -f1 -d" "`
   sbu=`echo "scale=3; $buildtime / 132.5" | bc`

   psizeK=`du -k $tarball | cut -f1`
   psizeM=`echo "scale=3; $psizeK / 1024"   | bc`

   bsizeK=`echo "$free_now - $b4"           | bc`
   bsizeM=`echo "scale=3; $bsizeK / 1024"   | bc`

   echo "SBU=$sbu"                                  | tee -a $log
   echo "$psizeK $tarball size ($psizeM MB)"        | tee -a $log
   echo "$bsizeK kilobytes build size ($bsizeM MB)" | tee -a $log
   (echo -n "md5sum : "; md5sum $tarball)           | tee -a $log
   (echo -n "sha1sum: "; sha1sum $tarball)          | tee -a $log

   echo "`date` $tarball" >> /usr/src/packages.log
}

TIMEFMT='%1R Elapsed Time - '

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to