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

Make traffic stats accurate #246

Closed
wants to merge 1 commit into from
Closed

Make traffic stats accurate #246

wants to merge 1 commit into from

Conversation

yan12125
Copy link
Contributor

@yan12125 yan12125 commented Jul 7, 2019

Qt's QJson can't handle large integers [1]. As a result traffic statistics is inaccurate when tens of gigabytes are transferred. On the other hand, jsoncpp can handle 64-bit integers, which are sufficient as syncthing uses 64-bit integers, too [2].

To see the effects of inaccurate statistics, trasnfer 10GB of data within syncthing and then transfer some tiny files (e.g., a few KB). You will see the tray icon rotates for a long time.

Not sure if it's a good idea or not to add one more dependency. jsoncpp is a dependency of cmake, so it should already be there if one can build QSyncthingTray. I can also try to make jsoncpp optional and fallback to QJson if you wish.

[1] https://bugreports.qt.io/browse/QTBUG-28560
[2] https://github.com/syncthing/syncthing/blob/v1.1.4/lib/protocol/protocol.go#L905-L909

Qt's QJson can't handle large integers [1]. As a result traffic
statistics is inaccurate when tens of gigabytes are transferred.
On the other hand, jsoncpp can handle 64-bit integers, which are
sufficient as syncthing uses 64-bit integers, too [2].

Enabled testing on macOS only as XXX_LINK_LIBRARIES requires a quite new
CMake (3.12).

[1] https://bugreports.qt.io/browse/QTBUG-28560
[2] https://github.com/syncthing/syncthing/blob/v1.1.4/lib/protocol/protocol.go#L905-L909
@yan12125
Copy link
Contributor Author

Enabling JSONCPP on ancient Ubuntu appears very difficult. I made jsoncpp optional and test it on macOS only.

@yan12125
Copy link
Contributor Author

This project appears abandoned (#247), and I've switched to https://github.com/Martchus/syncthingtray, so closing.

@yan12125 yan12125 closed this Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant