From ddbcfce611a811aa4af82dd519292e1a406b0d60 Mon Sep 17 00:00:00 2001 From: Mattie Fu Date: Thu, 12 Dec 2024 19:16:42 -0500 Subject: [PATCH] update --- .../bigtable/data/v2/stub/metrics/BigtableExporterUtils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableExporterUtils.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableExporterUtils.java index 821c2295e..f6a8ba67f 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableExporterUtils.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableExporterUtils.java @@ -41,6 +41,7 @@ import com.google.cloud.opentelemetry.detection.GCPPlatformDetector; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; +import com.google.common.base.Stopwatch; import com.google.common.collect.ImmutableSet; import com.google.monitoring.v3.Point; import com.google.monitoring.v3.TimeInterval; @@ -158,7 +159,9 @@ static List convertToApplicationResourceTimeSeries( @Nullable static MonitoredResource detectResource() { GCPPlatformDetector detector = GCPPlatformDetector.DEFAULT_INSTANCE; + Stopwatch stopwatch = Stopwatch.createStarted(); DetectedPlatform detectedPlatform = detector.detectPlatform(); + System.out.println("detect took" + stopwatch.elapsed()); MonitoredResource monitoredResource = null; try { switch (detectedPlatform.getSupportedPlatform()) {