fine-tune debug output, profile target
authordpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Sat, 20 Aug 2005 11:39:05 +0000 (11:39 +0000)
committerdpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Sat, 20 Aug 2005 11:39:05 +0000 (11:39 +0000)
git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@45 8392b6e1-25fa-0310-8288-cc32f8e212ea

Makefile
bin/BackupPC_updatedb

index 6071a9d..ca0e89a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,3 +28,8 @@ asa:
        svn export . $(tmp)
        rsync -rav $(tmp) 10.210.99.1:backuppc-svn/
        rm -Rf $(tmp)
+
+profile:
+       test -e tmon.out || touch tmon.out
+       sudo chown backuppc tmon.out
+       sudo -u backuppc perl -d:DProf /data/backuppc/bin/BackupPC_updatedb -v 2
index 8e63be5..d0f76f5 100755 (executable)
@@ -294,7 +294,7 @@ sub found_in_db {
        my @param = ($shareID,$path,$name,$date,$size);
        $sth->{file_in_db}->execute(@param);
        my ($rows) = $sth->{file_in_db}->fetchrow_array();
-#      print STDERR ( $rows ? '+' : '-' ), join(" ",@param), "\n";
+       print STDERR "## found_in_db ",( $rows ? '+' : '-' ), join(" ",@param), "\n" if ($debug >= 3);
        return $rows;
 }
 
@@ -313,6 +313,7 @@ sub recurseDir($$$$$$$$) {
        { # scope
                my @stack;
 
+               print STDERR "# dirAttrib($backupNum, $share, $dir)\n" if ($debug >= 2);
                my $filesInBackup = $files->dirAttrib($backupNum, $share, $dir);
 
                # first, add all the entries in current directory