Skip to content

Commit

Permalink
fix: fix client blocking latency
Browse files Browse the repository at this point in the history
  • Loading branch information
mutianf committed Sep 19, 2024
1 parent 377437f commit 2dcb94e
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,13 @@
*/
class BigtableGrpcStreamTracer extends ClientStreamTracer {

private final Stopwatch stopwatch = Stopwatch.createUnstarted();
private final Stopwatch stopwatch = Stopwatch.createStarted();
private final BigtableTracer tracer;

public BigtableGrpcStreamTracer(BigtableTracer tracer) {
this.tracer = tracer;
}

@Override
public void streamCreated(Attributes transportAttrs, Metadata headers) {
stopwatch.start();
}

@Override
public void outboundMessageSent(int seqNo, long optionalWireSize, long optionalUncompressedSize) {
tracer.grpcChannelQueuedLatencies(stopwatch.elapsed(TimeUnit.NANOSECONDS));
Expand Down

0 comments on commit 2dcb94e

Please sign in to comment.