Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
e19452a9
Commit
e19452a9
authored
Feb 10, 1999
by
David Dykstra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow --stats to work without -v.
parent
9ef53907
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
22 deletions
+32
-22
main.c
main.c
+31
-20
rsync.yo
rsync.yo
+1
-2
No files found.
main.c
View file @
e19452a9
...
...
@@ -40,23 +40,32 @@ static void report(int f)
if
(
f
==
-
1
||
!
am_sender
)
return
;
}
if
(
!
verbose
)
return
;
if
(
am_server
&&
!
am_sender
)
return
;
if
(
am_server
&&
am_sender
)
{
write_longint
(
f
,
stats
.
total_read
);
write_longint
(
f
,
stats
.
total_written
);
write_longint
(
f
,
stats
.
total_size
);
if
(
am_server
)
{
if
(
verbose
&&
am_sender
)
{
write_longint
(
f
,
stats
.
total_read
);
write_longint
(
f
,
stats
.
total_written
);
write_longint
(
f
,
stats
.
total_size
);
}
return
;
}
if
(
!
am_sender
)
{
int64
r
;
/* this is the client */
if
(
!
am_sender
&&
verbose
)
{
/* note that if (!verbose && do_stats) then these values will
be taken from the receiver side's copy. The total size
is identical but the bytes read and written are slightly
different. It's done this way to avoid modifying the
protocol to support --stats without -v. */
stats
.
total_written
=
read_longint
(
f
);
r
=
read_longint
(
f
);
stats
.
total_read
=
read_longint
(
f
);
stats
.
total_size
=
read_longint
(
f
);
stats
.
total_read
=
r
;
/* when the total_read was set above just now it would not
have included the last two longints, but the last
read_longint would have compensated for one of them.
Compensate for the other one too by adding 8. */
stats
.
total_read
+=
sizeof
(
int64
);
}
if
(
do_stats
)
{
...
...
@@ -78,13 +87,15 @@ static void report(int f)
(
double
)
stats
.
total_read
);
}
rprintf
(
FINFO
,
"wrote %.0f bytes read %.0f bytes %.2f bytes/sec
\n
"
,
(
double
)
stats
.
total_written
,
(
double
)
stats
.
total_read
,
(
stats
.
total_written
+
stats
.
total_read
)
/
(
0
.
5
+
(
t
-
starttime
)));
rprintf
(
FINFO
,
"total size is %.0f speedup is %.2f
\n
"
,
(
double
)
stats
.
total_size
,
(
1
.
0
*
stats
.
total_size
)
/
(
stats
.
total_written
+
stats
.
total_read
));
if
(
verbose
||
do_stats
)
{
rprintf
(
FINFO
,
"wrote %.0f bytes read %.0f bytes %.2f bytes/sec
\n
"
,
(
double
)
stats
.
total_written
,
(
double
)
stats
.
total_read
,
(
stats
.
total_written
+
stats
.
total_read
)
/
(
0
.
5
+
(
t
-
starttime
)));
rprintf
(
FINFO
,
"total size is %.0f speedup is %.2f
\n
"
,
(
double
)
stats
.
total_size
,
(
1
.
0
*
stats
.
total_size
)
/
(
stats
.
total_written
+
stats
.
total_read
));
}
fflush
(
stdout
);
fflush
(
stderr
);
...
...
rsync.yo
View file @
e19452a9
...
...
@@ -586,8 +586,7 @@ rsyncd.conf.
dit(bf(--stats)) This tells rsync to print a verbose set of statistics
on the file transfer, allowing you to tell how effective the rsync
algorithm is for your data. This option only works in conjunction with
the -v (verbose) option.
algorithm is for your data.
dit(bf(--progress)) This option tells rsync to print information
showing the progress of the transfer. This gives a bored user
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment