/** * Indicate that we just downloaded a block and record its latency. * @param latency The latency in milliseconds. */ public void blockDownloaded(long latency) { currentBlockDownloadLatency.addPoint(latency); }
/** * Get the current rolling average of the download latency. * @return rolling average of download latency in milliseconds. */ public long getBlockDownloadLatency() { return currentBlockDownloadLatency.getCurrentAverage(); }
@Override public void close() { if (bandwidthGaugeUpdater != null) { bandwidthGaugeUpdater.close(); bandwidthGaugeUpdater = null; } }
private void assertNoErrors() { assertEquals(0, AzureMetricsTestUtil.getLongCounterValue(getInstrumentation(), WASB_CLIENT_ERRORS)); assertEquals(0, AzureMetricsTestUtil.getLongCounterValue(getInstrumentation(), WASB_SERVER_ERRORS)); }
/** * Gets the current value of the wasb_web_responses counter. */ private long getCurrentWebResponses() { return AzureMetricsTestUtil.getCurrentWebResponses(getInstrumentation()); }
/** * Gets the current value of the wasb_web_responses counter. */ private long getCurrentWebResponses() { return AzureMetricsTestUtil.getCurrentWebResponses(getInstrumentation()); }
/** * Gets the current value of the wasb_bytes_read_last_second counter. */ public static long getCurrentBytesRead(AzureFileSystemInstrumentation instrumentation) { return getLongGaugeValue(instrumentation, WASB_BYTES_READ); }
/** * Gets the current value of the wasb_raw_bytes_uploaded counter. */ public static long getCurrentTotalBytesWritten( AzureFileSystemInstrumentation instrumentation) { return getLongCounterValue(instrumentation, WASB_RAW_BYTES_UPLOADED); }
/** * Gets (and asserts) the value of the wasb_web_responses counter just * after the creation of the file system object. */ private long getBaseWebResponses() { // The number of requests should start at 0 return assertWebResponsesEquals(0, 0); }
/** * Indicate that we just uploaded a block and record its latency. * @param latency The latency in milliseconds. */ public void blockUploaded(long latency) { currentBlockUploadLatency.addPoint(latency); }
/** * Get the current rolling average of the upload latency. * @return rolling average of upload latency in milliseconds. */ public long getBlockUploadLatency() { return currentBlockUploadLatency.getCurrentAverage(); }
@Override public void close() { if(bandwidthGaugeUpdater != null) { bandwidthGaugeUpdater.close(); bandwidthGaugeUpdater = null; } }
/** * Gets the current value of the wasb_bytes_written_last_second counter. */ public static long getCurrentBytesWritten(AzureFileSystemInstrumentation instrumentation) { return getLongGaugeValue(instrumentation, WASB_BYTES_WRITTEN); }
/** * Gets the current value of the wasb_raw_bytes_downloaded counter. */ public static long getCurrentTotalBytesRead( AzureFileSystemInstrumentation instrumentation) { return getLongCounterValue(instrumentation, WASB_RAW_BYTES_DOWNLOADED); }
/** * Indicate that we just uploaded a block and record its latency. * @param latency The latency in milliseconds. */ public void blockUploaded(long latency) { currentBlockUploadLatency.addPoint(latency); }
/** * Get the current rolling average of the download latency. * @return rolling average of download latency in milliseconds. */ public long getBlockDownloadLatency() { return currentBlockDownloadLatency.getCurrentAverage(); }
/** * Gets the current value of the wasb_bytes_read_last_second counter. */ public static long getCurrentBytesRead(AzureFileSystemInstrumentation instrumentation) { return getLongGaugeValue(instrumentation, WASB_BYTES_READ); }
/** * Gets the current value of the wasb_raw_bytes_downloaded counter. */ public static long getCurrentTotalBytesRead( AzureFileSystemInstrumentation instrumentation) { return getLongCounterValue(instrumentation, WASB_RAW_BYTES_DOWNLOADED); }
/** * Gets the current value of the wasb_bytes_written_last_second counter. */ public static long getCurrentBytesWritten(AzureFileSystemInstrumentation instrumentation) { return getLongGaugeValue(instrumentation, WASB_BYTES_WRITTEN); }
/** * Gets the current value of the wasb_raw_bytes_uploaded counter. */ public static long getCurrentTotalBytesWritten( AzureFileSystemInstrumentation instrumentation) { return getLongCounterValue(instrumentation, WASB_RAW_BYTES_UPLOADED); }