Added additional entry to server ping for network speed

This commit is contained in:
Amos Ng 2020-06-14 04:40:23 +08:00
parent 74d21b123d
commit d640072b4d
No known key found for this signature in database
GPG key ID: 89086414F634D123
2 changed files with 2 additions and 0 deletions

View file

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [2020-06-13] Added X-Cache header to image responses by [@lflare]. - [2020-06-13] Added X-Cache header to image responses by [@lflare].
- [2020-06-13] Added .gitattributes to help sort out CHANGELOG.md merge conflicts by [@lflare]. - [2020-06-13] Added .gitattributes to help sort out CHANGELOG.md merge conflicts by [@lflare].
- [2020-06-13] Added rudimentary web-ui by [@carbotaniuman & @RedMatriz]. - [2020-06-13] Added rudimentary web-ui by [@carbotaniuman & @RedMatriz].
- [2020-06-13] Added additional entry to server ping for network speed by [@lflare].
### Changed ### Changed
- [2020-06-13] Modified AsyncAppender queue size to 1024 by [@lflare]. - [2020-06-13] Modified AsyncAppender queue size to 1024 by [@lflare].

View file

@ -42,6 +42,7 @@ public class ServerHandler {
params.put("secret", settings.getClientSecret()); params.put("secret", settings.getClientSecret());
params.put("port", settings.getClientPort()); params.put("port", settings.getClientPort());
params.put("disk_space", settings.getMaxCacheSizeMib() * 1024 * 1024 /* MiB to bytes */); params.put("disk_space", settings.getMaxCacheSizeMib() * 1024 * 1024 /* MiB to bytes */);
params.put("network_speed", settings.getMaxBurstRateKibPerSecond() * 1024 /*KiB to bytes */);
params.put("build_version", Constants.CLIENT_BUILD); params.put("build_version", Constants.CLIENT_BUILD);
HttpResponse<ServerSettings> response = Unirest.post(SERVER_ADDRESS + "ping") HttpResponse<ServerSettings> response = Unirest.post(SERVER_ADDRESS + "ping")