/** * Update the metrics source gauge for how many bytes were transferred * during the last time window. * @param updateWrite If true, update the write (upload) counter. * Otherwise update the read (download) counter. * @param bytes The number of bytes transferred. */ private void updateBytesTransferred(boolean updateWrite, long bytes) { if (updateWrite) { instrumentation.updateBytesWrittenInLastSecond(bytes); } else { instrumentation.updateBytesReadInLastSecond(bytes); } }
/** * Update the metrics source gauge for how many bytes were transferred * during the last time window. * @param updateWrite If true, update the write (upload) counter. * Otherwise update the read (download) counter. * @param bytes The number of bytes transferred. */ private void updateBytesTransferred(boolean updateWrite, long bytes) { if (updateWrite) { instrumentation.updateBytesWrittenInLastSecond(bytes); } else { instrumentation.updateBytesReadInLastSecond(bytes); } }