[Mplayer-cvslog] CVS: main/TOOLS/benchmark-gab README,NONE,1.1 benchmark,NONE,1.1 compile,NONE,1.1 start,NONE,1.1 variables,NONE,1.1

Winner of tha face compo gabucino at mplayerhq.hu
Fri Aug 30 23:17:22 CEST 2002


Update of /cvsroot/mplayer/main/TOOLS/benchmark-gab
In directory mail:/var/tmp.root/cvs-serv24226

Added Files:
	README benchmark compile start variables 
Log Message:
v0.9 of my compile+benchmark script, designed for my local boxes, shared on
NFS, etc..
Read README, and RTFS before using it.
Oh, and feel free to reverse/del, but al3x wanted it.


--- NEW FILE ---
===================================================
MPlayer benchmark scripts v0.9
By Gabucino 2002-08-30
License: for exclusive usage with MPlayer (wonder;)
         NO WARRANTY
         By using this software you agree not to
         blame the author or the MPlayer team
         for any mischief, backdoor, rm -rf /
         or else this script may or may not do.
===================================================

Preamble
========

             BEGINNERS MUST NOT TRY USING THESE SCRIPTS!!!

Installation
============
 - READ AND _U N D E R S T A N D_ WHAT THE SCRIPTS DO!
 - Copy the four shell scripts into an empty dir
 - Copy main.tar.gz to the same place (CVS checkout, compressed)
 - Copy ffmpeg.tar.gz to the same place (CVS checkout, compressed)
 - Create samples/ dir
 - Create samples to be used for benchmarking
 - (OPTIONAL) Create SAMPLE_FILE_NAME.opts file, containing
   standard MPlayer options - for usage with ONLY that file.
   Like:  samples/MPEG1			MPEG1 file
	  samples/MPEG1.opts		"-vc mpeg12"
	  samples/MPEG1_ffmpeg12	same MPEG1 file as MPEG1
	  samples/MPEG1_ffmpeg12.opts	"-vc ffmpeg12"
   etc...
 - 'touch xmga' if you have Matrox, and want to test mga_vid too
   (RTFS for these "touch" features)
 - if doing Xv and/or xmga tests, start an X server, and exec xhost +localhost
 - Push ./start
 - WAIT
 - (recover from backup;)))
 - See $BUILDDIR/log-2002-08-30 (today's date..) for the output.

Fuck. (TODO?;)

--- NEW FILE ---
#!/bin/sh

. ./variables

function benchsamples {
for i in `ls samples/* | grep -v -e '\.opts'`; do
  BENCHOPTS=`cat $i.opts 2> /dev/null`
  wrtlog Caching file...
  dd if=$i of=/dev/null bs=512k 2> /dev/null
  wrtlog Video decoding: `basename $i`, size: `ls -Ll $i | awk '{print $5}'`
  wrtlog Options for this run:
  wrtlog "$DEFAULTOPTS"
  wrtlog "Options for this file:"
  wrtlog "$BENCHOPTS"
  BENCH="`$BUILD/mplayer $DEFAULTOPTS $BENCHOPTS $i 2>&1 | grep BENCHMARKs`"
  VC=`echo $BENCH | awk '{print $3}'`
  SYS=`echo $BENCH | awk '{print $9}'`
  wrtlog VC: $VC \(Sys: $SYS\)

  BENCH="`$BUILD/mplayer $DEFAULTOPTS $BENCHOPTS $i 2>&1 | grep BENCHMARKs`"
  VC=`echo $BENCH | awk '{print $3}'`
  SYS=`echo $BENCH | awk '{print $9}'`
  wrtlog VC: $VC \(Sys: $SYS\)

  BENCH="`$BUILD/mplayer $DEFAULTOPTS $BENCHOPTS $i 2>&1 | grep BENCHMARKs`"
  VC=`echo $BENCH | awk '{print $3}'`
  SYS=`echo $BENCH | awk '{print $9}'`
  wrtlog VC: $VC \(Sys: $SYS\)
done
}

if [ ! -d samples ]; then
  wrtlog Samples subdirectory not present, exiting...
  exit 1
fi

wrtlog Starting benchmarks

if [ ! -e no_codec ]; then
  wrtlog Starting CODEC benchmark runs, with 3 tries...
  DEFAULTOPTS="-nosound -benchmark -vo null -vop disabled -autoq 0"
  benchsamples
fi

export DISPLAY=:0
export XAUTHORITY=$HOME/.Xauthority

if [ ! -e no_xv ]; then
  if [ ! -e no_xv_nodr ]; then
    wrtlog Starting XVideo \(no DR\) benchmark runs, with 3 tries...
    DEFAULTOPTS="-nosound -benchmark -vo xv -fs -nodr -slices -vop disabled -autoq 0"
    benchsamples
  fi

  if [ ! -e no_xv_nodr_noslices ]; then
    wrtlog Starting XVideo \(no DR\) \(no slices\) benchmark runs, with 3 tries...
    DEFAULTOPTS="-nosound -benchmark -vo xv -fs -nodr -noslices -vop disabled -autoq 0"
    benchsamples
  fi

  if [ ! -e no_xv_dr ]; then
    wrtlog Starting XVideo \(DR\) benchmark runs, with 3 tries...
    DEFAULTOPTS="-nosound -benchmark -vo xv -fs -dr -slices -vop disabled -autoq 0"
    benchsamples
  fi

  if [ ! -e no_xv_dr_noslices ]; then
    wrtlog Starting XVideo \(DR\) \(no slices\) benchmark runs, with 3 tries...
    DEFAULTOPTS="-nosound -benchmark -vo xv -fs -dr -noslices -vop disabled -autoq 0"
    benchsamples
  fi
fi

if [ -e xmga ]; then
  if [ ! -e xmga_nodr ]; then
    wrtlog Starting XMGA \(no DR\) benchmark runs, with 3 tries...
    DEFAULTOPTS="-nosound -benchmark -vo xmga -fs -dr -slices -vop disabled -autoq 0"
    benchsamples
  fi

  if [ ! -e xmga_nodr_noslices ]; then
    wrtlog Starting XMGA \(no DR\) \(no slices\) benchmark runs, with 3 tries...
    DEFAULTOPTS="-nosound -benchmark -vo xmga -fs -dr -noslices -vop disabled -autoq 0"
    benchsamples
  fi

  if [ ! -e xmga_dr ]; then
    wrtlog Starting XMGA \(DR\) benchmark runs, with 3 tries...
    DEFAULTOPTS="-nosound -benchmark -vo xmga -fs -dr -vop disabled -autoq 0"
    benchsamples
  fi

  if [ ! -e xmga_dr ]; then
    wrtlog Starting XMGA \(DR\) \(no slices\) benchmark runs, with 3 tries...
    DEFAULTOPTS="-nosound -benchmark -vo xmga -fs -dr -noslices -vop disabled -autoq 0"
    benchsamples
  fi
fi

wrtlog Benchmarks ready

--- NEW FILE ---
#!/bin/sh

. ./variables

wrtlog Starting compilation
wrtlog Options: $COMPILEOPTIONS

if [ ! -e main.tar.gz ]; then
  wrtlog MPlayer source main.tar.gz not present, exiting...
  exit 1
fi

if [ ! -e main.tar.gz ]; then
  wrtlog libavcodec source ffmpeg.tar.gz not present, exiting...
  exit 1
fi

if [ ! -d main ]; then
  wrtlog Unpacking source...
  tar xfzv main.tar.gz > /dev/null || (wrtlog Error; exit 1)
  wrtlog Unpacking done
  wrtlog Source total size: `du -hs main | awk '{print $1}'`
else
  wrtlog MPlayer source already there, not unpacking
fi

wrtlog Creating and entering separate build dir...
rm -rf $BUILD
mkdir $BUILD || (wrtlog Error; exit 1)
cd $BUILD
lndir ../main > /dev/null || (wrtlog Error; exit 1)
wrtlog Separate build dir created

wrtlog Unpacking libavcodec
rm -rf libavcodec
ln -s . ffmpeg || (wrtlog Error; exit 1)
tar xfzv ../ffmpeg.tar.gz ffmpeg/libavcodec > /dev/null || (wrtlog Error; exit 1)
rm -f ffmpeg
wrtlog Unpacking libavcodec done
wrtlog libavcodec total size: `du -hs libavcodec | awk '{print $1}'`

wrtlog Executing configure...
./configure $COMPILEOPTIONS > /dev/null || (wrtlog Error; exit 1)
wrtlog Configure done

wrtlog Executing main compile process...
unset CFLAGS CPPFLAGS CXXFLAGS
make > /dev/null 2> /dev/null || (wrtlog Error; exit 1)
wrtlog Compile ready
wrtlog Build dir size: `du -hs . | awk '{print $1}'`

wrtlog Unstripped mplayer  binary size: `ls -l mplayer | awk '{print $5}'`
wrtlog Unstripped mencoder binary size: `ls -l mencoder | awk '{print $5}'`

cd ..
rm -rf main

--- NEW FILE ---
#!/bin/sh

. ./variables

rm -f $LOGFILE

wrtlog Script version v0.9
wrtlog CPU: $VENDOR $MODEL $MHZ
wrtlog MEM: $MEMORY
wrtlog VGA: $VGA

if [ ! -e no_compile ]; then
  ./compile
else
  wrtlog Skipping compilation
fi

if [ ! -e no_benchmark ]; then
  ./benchmark
else
  wrtlog Skipping benchmark
fi

wrtlog Exiting.

--- NEW FILE ---
#!/bin/sh

VENDOR="`cat /proc/cpuinfo | grep vendor_id | cut -c 13-`"
MODEL="`cat /proc/cpuinfo | grep "model name" | cut -c 14-`"
MHZ="`cat /proc/cpuinfo  | grep MHz | cut -c 12-14` MHz"
MEMORY="`cat /proc/meminfo | grep MemTotal | awk '{print $2}'` Kb"
BUILD="`echo $VENDOR $MODEL $MHZ | tr [\ ] [_]`"
VGA="`lspci | grep VGA | cut -c 36-`"

export LOGFILE="`pwd`/$BUILD.logs/log-`date +\"%Y-%m-%d\"`"
export COMPILEOPTIONS="--enable-runtime-cpudetection"

mkdir $BUILD.logs 2> /dev/null

function wrtlog {
	echo "[ `date +\"%Y-%m-%d %T\"` ] $*" >> "$LOGFILE"
}




More information about the MPlayer-cvslog mailing list