Skip to content

Commit

Permalink
feat(s3stream): set explicit boundaries for network queue time hist (#…
Browse files Browse the repository at this point in the history
…852)

Signed-off-by: Shichao Nie <[email protected]>
  • Loading branch information
SCNieh authored Dec 25, 2023
1 parent 16f0ad2 commit 272f864
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class S3StreamMetricsConstant {
"64MB",
"128MB",
"inf"};
public static final List<Long> OPERATION_LATENCY_BOUNDARIES = List.of(
public static final List<Long> LATENCY_BOUNDARIES = List.of(
TimeUnit.MICROSECONDS.toNanos(1),
TimeUnit.MICROSECONDS.toNanos(10),
TimeUnit.MICROSECONDS.toNanos(100),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static void initMetrics(Meter meter, String prefix) {
.setDescription("Operations latency")
.setUnit("nanoseconds")
.ofLongs()
.setExplicitBucketBoundariesAdvice(S3StreamMetricsConstant.OPERATION_LATENCY_BOUNDARIES)
.setExplicitBucketBoundariesAdvice(S3StreamMetricsConstant.LATENCY_BOUNDARIES)
.build();
objectNumInTotal = meter.counterBuilder(prefix + S3StreamMetricsConstant.OBJECT_COUNT_METRIC_NAME)
.setDescription("Objects count")
Expand All @@ -104,7 +104,7 @@ public static void initMetrics(Meter meter, String prefix) {
.setDescription("Objects stage cost")
.setUnit("nanoseconds")
.ofLongs()
.setExplicitBucketBoundariesAdvice(S3StreamMetricsConstant.OPERATION_LATENCY_BOUNDARIES)
.setExplicitBucketBoundariesAdvice(S3StreamMetricsConstant.LATENCY_BOUNDARIES)
.build();
objectUploadSize = meter.histogramBuilder(prefix + S3StreamMetricsConstant.OBJECT_UPLOAD_SIZE_METRIC_NAME)
.setDescription("Objects upload size")
Expand Down Expand Up @@ -146,11 +146,13 @@ public static void initMetrics(Meter meter, String prefix) {
.setDescription("Network inbound limiter queue time")
.setUnit("nanoseconds")
.ofLongs()
.setExplicitBucketBoundariesAdvice(S3StreamMetricsConstant.LATENCY_BOUNDARIES)
.build();
networkOutboundLimiterQueueTime = meter.histogramBuilder(prefix + S3StreamMetricsConstant.NETWORK_OUTBOUND_LIMITER_QUEUE_TIME_METRIC_NAME)
.setDescription("Network outbound limiter queue time")
.setUnit("nanoseconds")
.ofLongs()
.setExplicitBucketBoundariesAdvice(S3StreamMetricsConstant.LATENCY_BOUNDARIES)
.build();
allocateByteBufSize = meter.histogramBuilder(prefix + S3StreamMetricsConstant.ALLOCATE_BYTE_BUF_SIZE_METRIC_NAME)
.setDescription("Allocate byte buf size")
Expand Down

0 comments on commit 272f864

Please sign in to comment.