ClientRequestMetrics: pass the url similiar to LatencyMetrics

In LatencyMetrics the URL is passed without the ending slash, this
patch use the same notation in ClientRequestMetrics.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This commit is contained in:
Amnon Heiman 2015-10-25 13:36:10 +02:00
parent 392765fa2e
commit ae26226339
2 changed files with 7 additions and 7 deletions

View File

@ -59,10 +59,10 @@ public class ClientRequestMetrics extends LatencyMetrics {
public ClientRequestMetrics(String url, String scope) {
super(url, "ClientRequest", scope);
timeouts = APIMetrics.newMeter(url + "timeouts",
timeouts = APIMetrics.newMeter(url + "/timeouts",
factory.createMetricName("Timeouts"), "timeouts",
TimeUnit.SECONDS);
unavailables = APIMetrics.newMeter(url + "unavailables",
unavailables = APIMetrics.newMeter(url + "/unavailables",
factory.createMetricName("Unavailables"), "unavailables",
TimeUnit.SECONDS);
}

View File

@ -55,15 +55,15 @@ public class StorageProxy implements StorageProxyMBean {
public static final String UNREACHABLE = "UNREACHABLE";
private static final ClientRequestMetrics readMetrics = new ClientRequestMetrics(
"storage_proxy/metrics/read/", "Read");
"storage_proxy/metrics/read", "Read");
private static final ClientRequestMetrics rangeMetrics = new ClientRequestMetrics(
"storage_proxy/metrics/range/", "RangeSlice");
"storage_proxy/metrics/range", "RangeSlice");
private static final ClientRequestMetrics writeMetrics = new ClientRequestMetrics(
"storage_proxy/metrics/write/", "Write");
"storage_proxy/metrics/write", "Write");
private static final CASClientRequestMetrics casWriteMetrics = new CASClientRequestMetrics(
"storage_proxy/metrics/cas_write/", "CASWrite");
"storage_proxy/metrics/cas_write", "CASWrite");
private static final CASClientRequestMetrics casReadMetrics = new CASClientRequestMetrics(
"storage_proxy/metrics/cas_read/", "CASRead");
"storage_proxy/metrics/cas_read", "CASRead");
private static final double CONCURRENT_SUBREQUESTS_MARGIN = 0.10;