Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option to print RSYNC performance stats in cf-net #5685

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

larsewi
Copy link
Contributor

@larsewi larsewi commented Jan 23, 2025

The performance stats are also logged unless the --stats
option is set. This way we can also study the performance through
cf-agent's debug logs.

The following is an example of running cf-net with the stats option:

$ sudo /var/cfengine/bin/cf-net --stats --host 192.168.56.10 get /var/cfengine/masterfiles/promises.cf
Send signature statistics:
  16970 bytes in (read from 'promises.cf')
  2424 bytes out (sent to server)
Receive delta statistics:
  9 bytes in (received from server)
  16970 bytes out (written to 'promises.cf.cfnew')

Build Status

Copy link
Contributor

@vpodzime vpodzime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me otherwise.

libcfnet/file_stream.c Show resolved Hide resolved
libcfnet/file_stream.c Outdated Show resolved Hide resolved
The truncation of the basis file caused the File Stream API to compute
the signature against an empty file, effectively removing all
performance benefits from the RSYNC algorithm.

Changelog: Title
Signed-off-by: Lars Erik Wik <[email protected]>
craigcomstock
craigcomstock previously approved these changes Jan 23, 2025
Copy link
Contributor

@craigcomstock craigcomstock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool.

cf-net/cf-net.c Outdated Show resolved Hide resolved
libcfnet/file_stream.c Outdated Show resolved Hide resolved
The performance stats are also logged. This way we can also study the
performance through `cf-agent`'s debug logs.

The following is an example of running cf-net with the `--stats` option:

```
$ sudo /var/cfengine/bin/cf-net --stats --host 192.168.56.10 get /var/cfengine/masterfiles/promises.cf
Send signature statistics:
  16970 bytes in (read from 'promises.cf')
  2424 bytes out (sent to server)
Receive delta statistics:
  9 bytes in (received from server)
  16970 bytes out (written to 'promises.cf.cfnew')
```

Changelog: Title
Signed-off-by: Lars Erik Wik <[email protected]>
Copy link
Contributor

@craigcomstock craigcomstock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right on!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants