- Output the new flist time stats (when available).
authorWayne Davison <wayned@samba.org>
Thu, 27 Jan 2005 22:23:30 +0000 (22:23 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 27 Jan 2005 22:23:30 +0000 (22:23 +0000)
- For protocol 29 and above, send the flist time stats to the
  client side (as needed).

main.c

diff --git a/main.c b/main.c
index 72b5529..545c894 100644 (file)
--- a/main.c
+++ b/main.c
@@ -148,6 +148,10 @@ static void report(int f)
                        write_longint(f, total_read);
                        write_longint(f, total_written);
                        write_longint(f, stats.total_size);
+                       if (protocol_version >= 29) {
+                               write_longint(f, stats.flist_buildtime);
+                               write_longint(f, stats.flist_xfertime);
+                       }
                }
                return;
        }
@@ -160,12 +164,20 @@ static void report(int f)
                total_written = read_longint(f);
                total_read = read_longint(f);
                stats.total_size = read_longint(f);
+               if (protocol_version >= 29) {
+                       stats.flist_buildtime = read_longint(f);
+                       stats.flist_xfertime = read_longint(f);
+               }
        } else if (write_batch) {
                /* The --read-batch process is going to be a client
                 * receiver, so we need to give it the stats. */
                write_longint(batch_fd, total_read);
                write_longint(batch_fd, total_written);
                write_longint(batch_fd, stats.total_size);
+               if (protocol_version >= 29) {
+                       write_longint(batch_fd, stats.flist_buildtime);
+                       write_longint(batch_fd, stats.flist_xfertime);
+               }
        }
 
        if (do_stats) {
@@ -181,6 +193,14 @@ static void report(int f)
                rprintf(FINFO,"Matched data: %.0f bytes\n",
                        (double)stats.matched_data);
                rprintf(FINFO,"File list size: %d\n", stats.flist_size);
+               if (stats.flist_buildtime) {
+                       rprintf(FINFO,
+                               "File list generation time: %.3f seconds\n",
+                               (double)stats.flist_buildtime / 1000);
+                       rprintf(FINFO,
+                               "File list transfer time: %.3f seconds\n",
+                               (double)stats.flist_xfertime / 1000);
+               }
                rprintf(FINFO,"Total bytes sent: %.0f\n",
                        (double)total_written);
                rprintf(FINFO,"Total bytes received: %.0f\n",