public class NettyRequestMetrics extends Object
Modifier and Type | Method and Description |
---|---|
static void |
ifMetricsAreEnabled(MetricCollector metrics,
Consumer<MetricCollector> metricsConsumer) |
static void |
measureTimeTaken(io.netty.util.concurrent.Future<?> future,
Consumer<Duration> onDone)
Measure the time taken for a
Future to complete. |
static boolean |
metricsAreEnabled(MetricCollector metricCollector)
Determine whether metrics are enabled, based on the provided metric collector.
|
static void |
publishHttp2StreamMetrics(MetricCollector metricCollector,
io.netty.channel.Channel channel)
Publish stream metrics for the provided stream channel to the provided collector.
|
public static boolean metricsAreEnabled(MetricCollector metricCollector)
public static void ifMetricsAreEnabled(MetricCollector metrics, Consumer<MetricCollector> metricsConsumer)
public static void publishHttp2StreamMetrics(MetricCollector metricCollector, io.netty.channel.Channel channel)
Copyright © 2023. All rights reserved.