Skip to content

Commit

Permalink
Log segments upload details
Browse files Browse the repository at this point in the history
  • Loading branch information
ashking94 committed Jun 29, 2023
1 parent 8a61ca8 commit b0e4326
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,12 @@ private void updateFinalUploadStatusInSegmentTracker(boolean uploadStatus, long
long bytesUploaded = segmentTracker.getUploadBytesSucceeded() - bytesBeforeUpload;
long timeTakenInMS = (System.nanoTime() - startTimeInNS) / 1_000_000L;

long uploadBytesPerSec = (bytesUploaded * 1_000L) / timeTakenInMS;
segmentTracker.incrementTotalUploadsSucceeded();
segmentTracker.addUploadBytes(bytesUploaded);
segmentTracker.addUploadBytesPerSec((bytesUploaded * 1_000L) / timeTakenInMS);
segmentTracker.addUploadBytesPerSec(uploadBytesPerSec);
segmentTracker.addUploadTimeMs(timeTakenInMS);
logger.info("uploadBytes={} uploadBytesPerSec={} uploadTime={}", bytesUploaded, uploadBytesPerSec, timeTakenInMS);
} else {
segmentTracker.incrementTotalUploadsFailed();
}
Expand Down

0 comments on commit b0e4326

Please sign in to comment.