The attached diff causes rsync to show how much time it spends
on building and sending its filelist.  I'd appreciate if you
could consider this change for inclusion in a future release.
diff -ru rsync-2.6.3pre1/flist.c rsync-2.6.3pre1+tykhe/flist.c
--- rsync-2.6.3pre1/flist.c     2004-08-12 14:20:07.000000000 -0400
+++ rsync-2.6.3pre1+tykhe/flist.c       2004-09-03 10:17:31.259895000 -0400
@@ -1056,6 +1056,7 @@
                start_filelist_progress("building file list");
 
        start_write = stats.total_written;
+        stats.flist_buildtime = time(NULL);
 
        flist = flist_new(f == -1 ? WITHOUT_HLINK : WITH_HLINK,
            "send_file_list");
@@ -1202,6 +1203,9 @@
                }
        }
 
+        stats.flist_buildtime = time(NULL) - stats.flist_buildtime;
+        stats.flist_xfertime = time(NULL);
+
        if (f != -1) {
                send_file_entry(NULL, f, 0);
 
@@ -1209,6 +1213,8 @@
                        finish_filelist_progress(flist);
        }
 
+        stats.flist_xfertime = time(NULL) - stats.flist_xfertime;
+
        if (flist->hlink_pool) {
                pool_destroy(flist->hlink_pool);
                flist->hlink_pool = NULL;
--- rsync-2.6.3pre1/main.c      2004-08-05 14:17:44.000000000 -0400
+++ rsync-2.6.3pre1+tykhe/main.c        2004-09-03 10:18:46.869429000 -0400
@@ -178,6 +178,10 @@
                rprintf(FINFO,"Matched data: %.0f bytes\n",
                        (double)stats.matched_data);
                rprintf(FINFO,"File list size: %d\n", stats.flist_size);
+               rprintf(FINFO,"File list generation: %lu seconds\n",
+                        stats.flist_buildtime);
+               rprintf(FINFO,"File list transfer time: %lu seconds\n",
+                        stats.flist_xfertime);
                rprintf(FINFO,"Total bytes sent: %.0f\n",
                        (double)total_written);
                rprintf(FINFO,"Total bytes received: %.0f\n",
diff -ru rsync-2.6.3pre1/rsync.h rsync-2.6.3pre1+tykhe/rsync.h
--- rsync-2.6.3pre1/rsync.h     2004-08-03 11:41:17.000000000 -0400
+++ rsync-2.6.3pre1+tykhe/rsync.h       2004-09-03 10:05:12.904277000 -0400
@@ -1,4 +1,5 @@
-/* 
+/* -*- c-file-style: "linux" -*-
+
    Copyright (C) by Andrew Tridgell 1996, 2000
    Copyright (C) Paul Mackerras 1996
    Copyright (C) 2001, 2002 by Martin Pool <[EMAIL PROTECTED]>
@@ -520,6 +521,8 @@
        int64 literal_data;
        int64 matched_data;
        int flist_size;
+        time_t flist_buildtime;
+        time_t flist_xfertime;
        int num_files;
        int num_transferred_files;
        int current_file_index;
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to