[Commits] Rev 62: Eliminated white space difference for easier comparison. in file:///Users/hakan/work/monty_program/mariadb-tools/

Hakan Kuecuekyilmaz hakan.kuecuekyilmaz at t-online.de
Tue Nov 2 13:18:27 EET 2010


At file:///Users/hakan/work/monty_program/mariadb-tools/

------------------------------------------------------------
revno: 62
revision-id: hakan at askmonty.org-20101102111826-e6ewunkgsbhnd7cn
parent: hakan at askmonty.org-20101102105850-684i4acm010hlamr
committer: Hakan Kuecuekyilmaz <hakan at askmonty.org>
branch nick: mariadb-tools
timestamp: Tue 2010-11-02 12:18:26 +0100
message:
  Eliminated white space difference for easier comparison.
-------------- next part --------------
=== modified file 'sysbench/run-sysbench-myisam.sh'
--- a/sysbench/run-sysbench-myisam.sh	2010-11-02 10:58:50 +0000
+++ b/sysbench/run-sysbench-myisam.sh	2010-11-02 11:18:26 +0000
@@ -37,7 +37,7 @@
 if [ x"root" = x"$RUN_BY" ];then
    echo '[ERROR]: Do not run this script as root!'
    echo '  Exiting.'
-   
+
    exit 1
 fi
 
@@ -45,7 +45,7 @@
     echo '[ERROR]: Please provide exactly three options.'
     echo "  Example: $0 [pull | no-pull] [/path/to/bzr/repo] [name]"
     echo "  $0 pull ${HOME}/work/monty_program/maria-local-master MariaDB"
-    
+
     exit 1
 else
     PULL="$1"
@@ -59,7 +59,7 @@
 if [ ! -f conf/${HOSTNAME}.inc ]; then
     echo "[ERROR]: Could not find config file: conf/${HOSTNAME}.inc."
     echo "  Please create one."
-    
+
     exit 1
 else
     source conf/${HOSTNAME}.inc
@@ -151,7 +151,7 @@
 if [ $AVAILABLE -lt $SPACE_LIMIT ]; then
     echo "[ERROR]: We need at least $SPACE_LIMIT space in $WORK_DIR."
     echo 'Exiting.'
-    
+
     exit 1
 fi
 
@@ -234,7 +234,7 @@
 if [ ! -d $RESULT_DIR ]; then
     echo "[NOTE]: $RESULT_DIR did not exist."
     echo "  We are creating it for you!"
-    
+
     mkdir $RESULT_DIR
 fi
 
@@ -259,19 +259,19 @@
         $MYSQLADMIN $MYSQLADMIN_OPTIONS ping > /dev/null 2>&1
         if [ $? = 0 ]; then
             STARTED=0
-            
+
             break
         fi
-        
+
         sleep 1
         j=$(($j + 1))
     done
-    
+
     if [ $STARTED != 0 ]; then
         echo '[ERROR]: Start of mysqld failed.'
         echo '  Please check your error log.'
         echo '  Exiting.'
-    
+
         exit 1
     fi
 }
@@ -299,13 +299,14 @@
     do
     # Get rid of any options of given SysBench test.
     SYSBENCH_TEST=$(echo "${SYSBENCH_TESTS[$i]}" | awk '{ print $1 }')
+
     # If we run the same SysBench test with different options,
     # then we have to take care not to overwrite our previous results.
     m=0
     DIR_CREATED=-1
     MKDIR_RETRY=512
     DIR_TO_CREATE="${RESULT_DIR}/${TODAY}/${PRODUCT}/${SYSBENCH_TEST}"
-    
+
     if [ ! -d $DIR_TO_CREATE ]; then
         mkdir $DIR_TO_CREATE
         CURRENT_RESULT_DIR="$DIR_TO_CREATE"
@@ -316,18 +317,18 @@
                 mkdir ${DIR_TO_CREATE}-${m}
                 CURRENT_RESULT_DIR="${DIR_TO_CREATE}-${m}"
                 DIR_CREATED=1
-                
+
                 break
             fi
-            
+
             m=$(($m + 1))
         done
-        
+
         if [ $DIR_CREATED = -1 ]; then
             echo "[ERROR]: Could not create result dir after $MKDIR_RETRY times."
             echo '  Please check your configuration and file system.'
             echo '  Refusing to overwrite existing results. Exiting!'
-            
+
             exit 1
         fi
     fi
@@ -345,12 +346,12 @@
     echo "[$(date "+%Y-%m-%d %H:%M:%S")] Preparing and loading data for ${SYSBENCH_TESTS[$i]}."
     SYSBENCH_OPTIONS="${SYSBENCH_OPTIONS} --test=${TEST_DIR}/${SYSBENCH_TESTS[$i]}"
     $SYSBENCH $SYSBENCH_OPTIONS --max-time=$RUN_TIME prepare
-    
+
     $MYSQLADMIN $MYSQLADMIN_OPTIONS shutdown
     sync
     rm -rf ${SYSBENCH_DB_BACKUP}
     mkdir ${SYSBENCH_DB_BACKUP}
-    
+
     echo "[$(date "+%Y-%m-%d %H:%M:%S")] Copying $DATA_DIR of ${SYSBENCH_TESTS[$i]} for later usage."
     cp -a ${DATA_DIR}/* ${SYSBENCH_DB_BACKUP}/
 
@@ -381,7 +382,7 @@
             echo "[$(date "+%Y-%m-%d %H:%M:%S")] Killing mysqld and copying back $DATA_DIR for ${SYSBENCH_TESTS[$i]}."
             kill_mysqld
             cp -a ${SYSBENCH_DB_BACKUP}/* ${DATA_DIR}
-            
+
             # Clear file system cache. This works only with Linux >= 2.6.16.
             # On Mac OS X we can use sync; purge.
             sync
@@ -399,13 +400,13 @@
             echo "[$(date "+%Y-%m-%d %H:%M:%S")] Finnished warm up."
 
             echo "[$(date "+%Y-%m-%d %H:%M:%S")] Starting actual SysBench run."
-            
+
             $IOSTAT -d -k $IOSTAT_DEVICE $MONITOR_INTERVAL > ${THIS_RESULT_DIR}/iostat${k}.txt 2>&1 &
             IOSTAT_PID=$!
 
             $MPSTAT -u $MONITOR_INTERVAL > ${THIS_RESULT_DIR}/cpustat${k}.txt 2>&1 &
             MPSTAT_PID=$!
-            
+
             $MYSQLADMIN $MYSQLADMIN_OPTIONS --sleep $MONITOR_INTERVAL status > ${THIS_RESULT_DIR}/server_status${k}.txt 2>&1 &
             SERVER_STATUS_PID=$!
 
@@ -416,7 +417,7 @@
                     echo "[WARNING]: Could not start oprofile daemonl."
                     echo "  Please check your OProfile installation."
                 fi
-                
+
                 $SUDO opcontrol --start
                 echo "[$(date "+%Y-%m-%d %H:%M:%S")] This is an OProfile'd SysBench run."
             fi
@@ -437,7 +438,7 @@
             # Copy mysqld error log for future reference.
             # TODO: add chrash detection.
             cp ${DATA_DIR}/${HOSTNAME}.err ${THIS_RESULT_DIR}/${HOSTNAME}${k}.err
-            
+
             sync; sync; sync
             sleep 1
 
@@ -451,7 +452,7 @@
 
             k=$(($k + 1))
         done
-        
+
         echo '' >> ${THIS_RESULT_DIR}/results.txt
         echo "[$(date "+%Y-%m-%d %H:%M:%S")] Finnished ${SYSBENCH_TESTS[$i]} with $THREADS threads and $LOOP_COUNT iterations for $PRODUCT" | tee -a ${THIS_RESULT_DIR}/results.txt
     done

=== modified file 'sysbench/run-sysbench.sh'
--- a/sysbench/run-sysbench.sh	2010-11-02 10:58:50 +0000
+++ b/sysbench/run-sysbench.sh	2010-11-02 11:18:26 +0000
@@ -25,7 +25,7 @@
 if [ x"root" = x"$RUN_BY" ];then
    echo '[ERROR]: Do not run this script as root!'
    echo '  Exiting.'
-   
+
    exit 1
 fi
 
@@ -33,7 +33,7 @@
     echo '[ERROR]: Please provide exactly three options.'
     echo "  Example: $0 [pull | no-pull] [/path/to/bzr/repo] [name]"
     echo "  $0 pull ${HOME}/work/monty_program/maria-local-master MariaDB"
-    
+
     exit 1
 else
     PULL="$1"
@@ -47,7 +47,7 @@
 if [ ! -f conf/${HOSTNAME}.inc ]; then
     echo "[ERROR]: Could not find config file: conf/${HOSTNAME}.inc."
     echo "  Please create one."
-    
+
     exit 1
 else
     source conf/${HOSTNAME}.inc
@@ -143,7 +143,7 @@
 if [ $AVAILABLE -lt $SPACE_LIMIT ]; then
     echo "[ERROR]: We need at least $SPACE_LIMIT space in $WORK_DIR."
     echo 'Exiting.'
-    
+
     exit 1
 fi
 
@@ -226,7 +226,7 @@
 if [ ! -d $RESULT_DIR ]; then
     echo "[NOTE]: $RESULT_DIR did not exist."
     echo "  We are creating it for you!"
-    
+
     mkdir $RESULT_DIR
 fi
 
@@ -251,19 +251,19 @@
         $MYSQLADMIN $MYSQLADMIN_OPTIONS ping > /dev/null 2>&1
         if [ $? = 0 ]; then
             STARTED=0
-            
+
             break
         fi
-        
+
         sleep 1
         j=$(($j + 1))
     done
-    
+
     if [ $STARTED != 0 ]; then
         echo '[ERROR]: Start of mysqld failed.'
         echo '  Please check your error log.'
         echo '  Exiting.'
-    
+
         exit 1
     fi
 }
@@ -293,12 +293,12 @@
     SYSBENCH_TEST=$(echo "${SYSBENCH_TESTS[$i]}" | awk '{ print $1 }')
 
     # If we run the same SysBench test with different options,
-    # then we have to care not to overwrite our previous results.
+    # then we have to take care not to overwrite our previous results.
     m=0
     DIR_CREATED=-1
     MKDIR_RETRY=512
     DIR_TO_CREATE="${RESULT_DIR}/${TODAY}/${PRODUCT}/${SYSBENCH_TEST}"
-    
+
     if [ ! -d $DIR_TO_CREATE ]; then
         mkdir $DIR_TO_CREATE
         CURRENT_RESULT_DIR="$DIR_TO_CREATE"
@@ -309,18 +309,18 @@
                 mkdir ${DIR_TO_CREATE}-${m}
                 CURRENT_RESULT_DIR="${DIR_TO_CREATE}-${m}"
                 DIR_CREATED=1
-                
+
                 break
             fi
-            
+
             m=$(($m + 1))
         done
-        
+
         if [ $DIR_CREATED = -1 ]; then
             echo "[ERROR]: Could not create result dir after $MKDIR_RETRY times."
             echo '  Please check your configuration and file system.'
             echo '  Refusing to overwrite existing results. Exiting!'
-            
+
             exit 1
         fi
     fi
@@ -338,12 +338,12 @@
     echo "[$(date "+%Y-%m-%d %H:%M:%S")] Preparing and loading data for ${SYSBENCH_TESTS[$i]}."
     SYSBENCH_OPTIONS="${SYSBENCH_OPTIONS} --test=${TEST_DIR}/${SYSBENCH_TESTS[$i]}"
     $SYSBENCH $SYSBENCH_OPTIONS --max-time=$RUN_TIME prepare
-    
+
     $MYSQLADMIN $MYSQLADMIN_OPTIONS shutdown
     sync
     rm -rf ${SYSBENCH_DB_BACKUP}
     mkdir ${SYSBENCH_DB_BACKUP}
-    
+
     echo "[$(date "+%Y-%m-%d %H:%M:%S")] Copying $DATA_DIR of ${SYSBENCH_TESTS[$i]} for later usage."
     cp -a ${DATA_DIR}/* ${SYSBENCH_DB_BACKUP}/
 
@@ -374,7 +374,7 @@
             echo "[$(date "+%Y-%m-%d %H:%M:%S")] Killing mysqld and copying back $DATA_DIR for ${SYSBENCH_TESTS[$i]}."
             kill_mysqld
             cp -a ${SYSBENCH_DB_BACKUP}/* ${DATA_DIR}
-            
+
             # Clear file system cache. This works only with Linux >= 2.6.16.
             # On Mac OS X we can use sync; purge.
             sync
@@ -397,10 +397,10 @@
 
             $MPSTAT -u $MONITOR_INTERVAL > ${THIS_RESULT_DIR}/cpustat${k}.txt 2>&1 &
             MPSTAT_PID=$!
-            
+
             $MYSQLADMIN $MYSQLADMIN_OPTIONS --sleep $MONITOR_INTERVAL status > ${THIS_RESULT_DIR}/server_status${k}.txt 2>&1 &
             SERVER_STATUS_PID=$!
-            
+
             if [ $PROFILE_IT -eq 1 ]; then
                 $SUDO opcontrol --setup --no-vmlinux --separate=lib,kernel,thread
                 $SUDO opcontrol --start-daemon
@@ -408,11 +408,11 @@
                     echo "[WARNING]: Could not start oprofile daemonl."
                     echo "  Please check your OProfile installation."
                 fi
-                
+
                 $SUDO opcontrol --start
                 echo "[$(date "+%Y-%m-%d %H:%M:%S")] This is an OProfile'd SysBench run."
             fi
-            
+
             $SYSBENCH $SYSBENCH_OPTIONS_RUN run > ${THIS_RESULT_DIR}/result${k}.txt 2>&1
 
             if [ $PROFILE_IT -eq 1 ]; then
@@ -429,7 +429,7 @@
             # Copy mysqld error log for future reference.
             # TODO: add chrash detection.
             cp ${DATA_DIR}/${HOSTNAME}.err ${THIS_RESULT_DIR}/${HOSTNAME}${k}.err
-            
+
             sync; sync; sync
             sleep 1
 
@@ -441,7 +441,7 @@
 
             k=$(($k + 1))
         done
-        
+
         echo '' >> ${THIS_RESULT_DIR}/results.txt
         echo "[$(date "+%Y-%m-%d %H:%M:%S")] Finnished ${SYSBENCH_TESTS[$i]} with $THREADS threads and $LOOP_COUNT iterations for $PRODUCT" | tee -a ${THIS_RESULT_DIR}/results.txt
     done



More information about the commits mailing list