ABadRoot - 2015-03-13

This patch use bc command

@@ -699,6 +699,9 @@ process_dbs() {

   fi

+  # 20150313 - Execution time
+  DUMP_START=$(date +%s.%N)
+
   if [[ "x$CONFIG_mysql_dump_differential" = "xyes" ]] && [[ "x${CONFIG_encrypt}" != "xyes" ]] && (( $activate_differential_backup )) && ((! ($filename_flags & $filename_flag_encrypted) )); then

          # the master file is encrypted ... well this just shouldn't happen ^^ not going to decrypt or stuff like that ...at least not today :)
@@ -793,7 +796,11 @@ process_dbs() {
          fi

   fi
-  
+
+  # 20150313 - Execution time
+  DUMP_END=$(date +%s.%N)
+  DUMP_TIME=$(echo "DUMP_$END - $DUMP_START" | bc)
+  echo "Database dump duration (sec): $DUMP_TIME"

   if (( $ret == 0 )); then
          echo "Rotating $(( ${rotation}/${rotation_divisor} )) ${rotation_string} backups for ${name}"
@@ -1000,7 +1007,7 @@ cleanup_latest ()  {
 check_dependencies () {
     echo
     echo "# Testing for installed programs"
-    dependencies=( 'mysql' 'mysqldump' )
+    dependencies=( 'mysql' 'mysqldump' 'bc' )

        if [[ "x$CONFIG_multicore" = 'xyes' ]]; then