X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/217cc3b0459e0c4d3a01c2d6808750b94cba5a17..25ff04417e4b4fa0aeb44e0b1576a01021aa1650:/flist.c diff --git a/flist.c b/flist.c index c513e5a2..bc247a88 100644 --- a/flist.c +++ b/flist.c @@ -925,7 +925,7 @@ skip_filters: memcpy(bp, basename, basename_len); bp += basename_len; -#ifdef HAVE_STRUCT_STAT_ST_RDEV +#if HAVE_STRUCT_STAT_ST_RDEV if (preserve_devices && IS_DEVICE(st.st_mode)) file->u.rdev = st.st_rdev; #endif @@ -1078,6 +1078,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) char lastpath[MAXPATHLEN] = ""; struct file_list *flist; BOOL need_first_push = True; + struct timeval start_tv, end_tv; int64 start_write; int use_ff_fd = 0; @@ -1085,6 +1086,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) start_filelist_progress("building file list"); start_write = stats.total_written; + gettimeofday(&start_tv, NULL); flist = flist_new(f == -1 ? WITHOUT_HLINK : WITH_HLINK, "send_file_list"); @@ -1250,10 +1252,23 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) } if (f != -1) { + gettimeofday(&end_tv, NULL); + stats.flist_buildtime = + (int64)(end_tv.tv_sec - start_tv.tv_sec) * 1000 + + (end_tv.tv_usec - start_tv.tv_usec) / 1000; + if (stats.flist_buildtime == 0) + stats.flist_buildtime = 1; + start_tv = end_tv; + send_file_entry(NULL, f, 0); if (show_filelist_p()) finish_filelist_progress(flist); + + gettimeofday(&end_tv, NULL); + stats.flist_xfertime = + (int64)(end_tv.tv_sec - start_tv.tv_sec) * 1000 + + (end_tv.tv_usec - start_tv.tv_usec) / 1000; } if (flist->hlink_pool) {