more fixes for profile target
authordpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Sat, 20 Aug 2005 12:40:24 +0000 (12:40 +0000)
committerdpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Sat, 20 Aug 2005 12:40:24 +0000 (12:40 +0000)
git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@46 8392b6e1-25fa-0310-8288-cc32f8e212ea

Makefile

index ca0e89a..648865d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
 tmp=/tmp/backuppc-svn/
 target=/data/backuppc/
+profile_opt=-d
+profile_file=profile
 
 all:
        @echo "make install to install BackupPC using sudo"
@@ -32,4 +34,13 @@ asa:
 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
+       date > $(profile_file)
+       echo "## NORMAL RUN" >> $(profile_file)
+       sudo -u backuppc /data/backuppc/bin/BackupPC_updatedb $(profile_opt) | tee -a $(profile_file)
+       echo "## DProf RUN" >> $(profile_file)
+       sudo -u backuppc perl -d:DProf /data/backuppc/bin/BackupPC_updatedb $(profile_opt)
+       dprofpp 2>&1 | tee -a $(profile_file)
+       echo "## DBI_PROFILE RUN" >> $(profile_file)
+       DBI_PROFILE=2 sudo -u backuppc /data/backuppc/bin/BackupPC_updatedb $(profile_opt) 2>&1 | tee -a $(profile_file)
+       mv $(profile_file) profile.`perl -e 'my @p = glob("profile.[0-9]*"); print scalar @p + 1'`
+