Skip to content

Commit db124f2

Browse files
committed
remove unary application latency streaming tag
1 parent b8b642c commit db124f2

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,13 @@ private void recordOperationCompletion(@Nullable Throwable status) {
221221
applicationLatencyTimer.stop();
222222
totalApplicationLatency.addAndGet(applicationLatencyTimer.elapsed(TimeUnit.MILLISECONDS));
223223
}
224-
recorder.recordApplicationLatency(totalApplicationLatency.get(), tableId, zone, cluster);
225224

226225
recorder.recordOperationLatencies(operationTimer.elapsed(TimeUnit.MILLISECONDS));
227226

228227
if (operationType == ApiTracerFactory.OperationType.ServerStreaming
229228
&& spanName.getMethodName().equals("ReadRows")) {
230229
recorder.recordFirstResponseLatency(firstResponsePerOpTimer.elapsed(TimeUnit.MILLISECONDS));
230+
recorder.recordApplicationLatency(totalApplicationLatency.get(), tableId, zone, cluster);
231231
}
232232

233233
recorder.recordOperationLevelWithoutStreaming(

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -308,23 +308,6 @@ public void onComplete() {
308308
assertThat(longValue.getValue()).isLessThan(applicationLatency * (counter.get() + 1));
309309
}
310310

311-
@Test
312-
public void testMutateRowApplicationLatency() {
313-
// Unary callable application latency is the delay between retries
314-
stub.mutateRowCallable()
315-
.call(RowMutation.create(TABLE_ID, "random-row").setCell("cf", "q", "value"));
316-
317-
verify(builtinMetricsRecorder)
318-
.recordApplicationLatency(
319-
longValue.capture(), tableId.capture(), zone.capture(), cluster.capture());
320-
321-
// Application latency should be slightly less than the total delay between 2 requests observed
322-
// from the server side. To make
323-
// the test less flaky comparing with half of the server side delay here.
324-
assertThat(longValue.getValue()).isAtLeast(serverTotalRetryDelay.get() / 2);
325-
assertThat(longValue.getValue()).isAtMost(serverTotalRetryDelay.get());
326-
}
327-
328311
@Test
329312
public void testRetryCount() {
330313
stub.mutateRowCallable()

0 commit comments

Comments
 (0)