Merge branch 'fix/download_stats' into 'master'
Fix: fix transfer stats receiving seconds instead of ms to work with See merge request sheepitrenderfarm/client!232
This commit is contained in:
@@ -536,7 +536,7 @@ public class Server extends Thread {
|
||||
gui_.displayTransferStats(dlStats, ulStats);
|
||||
gui_.status(status_, 100, size);
|
||||
|
||||
this.log.debug(String.format("File downloaded at %s/s, written %d bytes", new TransferStats(size, duration.getSeconds() + 1).getAverageSessionSpeed(), written));
|
||||
this.log.debug(String.format("File downloaded at %s/s, written %d bytes", new TransferStats(size, duration.toMillis() + 1).getAverageSessionSpeed(), written));
|
||||
|
||||
this.lastRequestTime = new Date().getTime();
|
||||
return Error.Type.OK;
|
||||
@@ -613,7 +613,7 @@ public class Server extends Thread {
|
||||
this.ulStats.calc(fileHandler.length(), ((duration.getSeconds() * 1000) + (duration.getNano() / 1000000)));
|
||||
gui.displayTransferStats(dlStats, ulStats);
|
||||
|
||||
this.log.debug(String.format("File uploaded at %s/s, uploaded %d bytes", new TransferStats(fileHandler.length(), duration.getSeconds() + 1).getAverageSessionSpeed(), fileHandler.length()));
|
||||
this.log.debug(String.format("File uploaded at %s/s, uploaded %d bytes", new TransferStats(fileHandler.length(), duration.toMillis() + 1).getAverageSessionSpeed(), fileHandler.length()));
|
||||
|
||||
int r = response.code();
|
||||
String contentType = response.body().contentType().toString();
|
||||
|
||||
@@ -4,8 +4,8 @@ import lombok.AllArgsConstructor;
|
||||
|
||||
/****************
|
||||
* Holds the session traffic statistics. The constructor accepts two parameters:
|
||||
* @long bytes - bytes transferred in the session
|
||||
* @Job seconds - seconds spent transferring the data
|
||||
* long bytes - bytes transferred in the session
|
||||
* long millis - milliseconds spent transferring the data
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
public class TransferStats {
|
||||
|
||||
Reference in New Issue
Block a user