public class HttpMetrics extends Object implements Metrics, DTOMetrics
Metrics.NoopMetrics| Constructor and Description |
|---|
HttpMetrics(org.apache.http.impl.client.CloseableHttpClient client,
URI uri) |
| Modifier and Type | Method and Description |
|---|---|
void |
count(Counter dto) |
void |
count(String counter,
long delta)
Adjusts the specified counter by a given delta.
|
static HttpMetrics |
create(org.apache.http.impl.client.CloseableHttpClient client,
URI root) |
void |
time(Latency dto) |
void |
time(String operation,
long timeInMs)
Records an execution time in milliseconds for the specified named operation.
|
public HttpMetrics(org.apache.http.impl.client.CloseableHttpClient client,
URI uri)
public static HttpMetrics create(org.apache.http.impl.client.CloseableHttpClient client, URI root) throws URISyntaxException
URISyntaxExceptionpublic void time(Latency dto)
time in interface DTOMetricspublic void count(Counter dto)
count in interface DTOMetricspublic void count(String counter, long delta)
MetricsThis method is is non-blocking and is guaranteed not to throw an exception.
Copyright © 2018. All rights reserved.