X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/b98f040ef25bc692ad3864244eed620611f79048..e95538ca2c8fdecd66a112635aa30077419af685:/main.c diff --git a/main.c b/main.c index 086de305..8ba45a26 100644 --- 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", @@ -207,7 +227,7 @@ static void report(int f) **/ static void show_malloc_stats(void) { -#ifdef HAVE_MALLINFO +#if HAVE_MALLINFO struct mallinfo mi; mi = mallinfo(); @@ -596,7 +616,9 @@ static void do_server_recv(int f_in, int f_out, int argc,char *argv[]) io_start_buffering_in(); if (delete_mode && !delete_excluded) - recv_exclude_list(f_in); + recv_filter_list(f_in); + if (cvs_exclude) + add_cvs_excludes(); if (filesfrom_fd >= 0) { /* We need to send the files-from names to the sender at the @@ -650,7 +672,7 @@ void start_server(int f_in, int f_out, int argc, char *argv[]) if (am_sender) { keep_dirlinks = 0; /* Must be disabled on the sender. */ - recv_exclude_list(f_in); + recv_filter_list(f_in); if (cvs_exclude) add_cvs_excludes(); do_server_sender(f_in, f_out, argc, argv); @@ -701,7 +723,7 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[]) if (cvs_exclude) add_cvs_excludes(); if (delete_mode && !delete_excluded) - send_exclude_list(f_out); + send_filter_list(f_out); if (remote_filesfrom_file) filesfrom_fd = f_in; @@ -735,7 +757,9 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[]) list_only |= 1; if (!read_batch) - send_exclude_list(f_out); + send_filter_list(f_out); + if (cvs_exclude) + add_cvs_excludes(); if (filesfrom_fd >= 0) { io_set_filesfrom_fds(filesfrom_fd, f_out);