#! /bin/bash # # Simple test to gather data on where gnome-terminal spends # time This is compilicated by the terminal server model of # gnome-terminal. Time taken for benchmark written to cattime. # # When optional --profile on commandline, oprofile used to get an # overall view of what is happening on the system. PROFILING is only # going to work with kernel that have oprofile support (Red Hat SMP # kernels). # # Will Cohen # 5/27/2004 # BENCHMARK="cattest" VERSION=0.0 OPCONTROL=/usr/bin/opcontrol OPREPORT=/usr/bin/opreport RM=/bin/rm RESULTS_FILE=cattime if test "$1" = "--profile"; then PROFILING=yes else PROFILING=no fi # Setup default oprofile. if test "$PROFILING" = "yes"; then $OPCONTROL --deinit $OPCONTROL --reset # FIXME Command below may use previous event settings for oprofile. $OPCONTROL --setup --no-vmlinux --separate=library $OPCONTROL --start fi # Run the actual experiment $RM -rf $RESULTS_FILE echo "Benchmark: " $BENCHMARK " Version: " $VERSION >> $RESULTS_FILE date >> $RESULTS_FILE # The actual benchmark being timed is below. /usr/bin/time /bin/cat `pwd`/jarg422.txt 2>> $RESULTS_FILE # Shutdown oprofile. if test "$PROFILING" = "yes"; then $OPCONTROL --dump $OPCONTROL --shutdown # If PROFILING, need to do analysis with oprerport after running the test. # May need more details than what is provided by command below. $OPREPORT --threshold 2 --long-filenames >> $RESULTS_FILE fi