public final class MetricUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
collectHttpMetrics(MetricCollector metricCollector,
SdkHttpFullResponse httpResponse) |
static MetricCollector |
createAttemptMetricsCollector(RequestExecutionContext context) |
static MetricCollector |
createHttpMetricsCollector(RequestExecutionContext context) |
static <T> <any> |
measureDuration(Supplier<T> c)
Measure the duration of the given callable.
|
static <T> <any> |
measureDurationUnsafe(Callable<T> c)
Measure the duration of the given callable.
|
public static <T> <any> measureDuration(Supplier<T> c)
c - The callable to measure.Pair containing the result of c and the duration.public static <T> <any> measureDurationUnsafe(Callable<T> c) throws Exception
c - The callable to measure.Pair containing the result of c and the duration.Exceptionpublic static void collectHttpMetrics(MetricCollector metricCollector,
SdkHttpFullResponse httpResponse)
public static MetricCollector createAttemptMetricsCollector(RequestExecutionContext context)
public static MetricCollector createHttpMetricsCollector(RequestExecutionContext context)
Copyright © 2021. All rights reserved.