search for: rprint_progress

Displaying 6 results from an estimated 6 matches for "rprint_progress".

2001 Nov 29
1
patch from faith@alephnull to add rate indicator to --progress
...st_ofs; +static struct timeval print_time; +static struct timeval start_time; +static OFF_T start_ofs; + +static unsigned long msdiff(struct timeval *t1, struct timeval *t2) +{ + return (t2->tv_sec - t1->tv_sec) * 1000 + + (t2->tv_usec - t1->tv_usec) / 1000; +} + +static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now) +{ + int pct = (int)((100.0*ofs)/size); + unsigned long diff = msdiff(&start_time, now); + double rate = diff ? ((ofs-start_ofs) / diff) * 1000.0/1024.0 : 0; + + if (ofs == size) pct = 100; + + rprintf(FINFO,"...
2023 Feb 17
1
[feature request?]: Show progress only for big files
Hi, I've read through the rsync manpage, this mailing list, asked Google and studied lots of posts on stackexchange.com (stackoverflow, superuser...), askubuntu.com and some others, concerning rsync's capabilities of showing progress information. But all I've found was what I already knew: --progress (or -P) shows a progress information for *every* file transmitted, --info=progress2
2004 Feb 27
2
patch: better progress meter
Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part Url : http://lists.samba.org/archive/rsync/attachments/20040227/923b87ee/PGP.bin
2004 Jan 13
3
Progress reporting: N more to check
...pen(void) --- progress.c 13 Jan 2004 05:13:57 -0000 1.5 +++ progress.c 13 Jan 2004 05:00:29 -0000 @@ -21,6 +21,7 @@ #include "rsync.h" +extern struct stats stats; extern int am_server; static OFF_T last_ofs; @@ -45,6 +46,7 @@ static unsigned long msdiff(struct timev static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now, int is_last) { + char eol[256]; int pct = (ofs == size) ? 100 : (int)((100.0*ofs)/size); unsigned long diff = msdiff(&start_time, now); double rate = diff ? (double) (ofs-start_ofs) * 1000.0 / diff / 1024.0 : 0; @@ -72,10 +74,16 @@ stat...
2008 Oct 22
1
[PATCH] Make progress output show "done" instead of "to-chk".
...n rsync-patches@mattmccutchen.net because others might want to express opinions on it. Matt progress.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/progress.c b/progress.c index 25be374..7309a5d 100644 --- a/progress.c +++ b/progress.c @@ -72,9 +72,9 @@ static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now, if (is_last) { int len = snprintf(eol, sizeof eol, - " (xfr#%d, to-chk=%d/%d)\n", + " (xfr#%d, done=%d/%d)\n", stats.xferred_files, - stats.num_files - current_file_index - 1, + current_file_index, stats.num_file...
2002 Apr 20
0
14676 100% 0.00kB/s 0:00:00
...if (!start_time.tv_sec && !start_time.tv_usec) { start_time.tv_sec = now.tv_sec; start_time.tv_usec = now.tv_usec; start_ofs = ofs; } if((msdiff(&print_time, &now) > 250){ rprint_progress(ofs, size, &now, False); last_ofs = ofs; print_time.tv_sec = now.tv_sec; print_time.tv_usec = now.tv_usec; } } } Disclaimer: I've not tested these modifications yet. -- __Pascal_Bourguignon__ (o_ Sof...