final String metricName = operation.require(NAME).asString();
final String webContext = endpointId.substring(0, endpointId.indexOf(":"));
final String endpointName = endpointId.substring(endpointId.indexOf(":") + 1);
ServiceName endpointServiceName = WSServices.ENDPOINT_SERVICE.append("context="+webContext).append(endpointName);
ServiceController<Endpoint> service = (ServiceController<Endpoint>) currentServiceContainer().getService(endpointServiceName);
ServerConfigService serverConfigService = (ServerConfigService)currentServiceContainer().getService(WSServices.CONFIG_SERVICE).getService();
Endpoint endpoint= service.getValue();
final ModelNode result = new ModelNode();
if (endpoint != null && serverConfigService.getValue().isStatisticsEnabled()) {
final EndpointMetrics endpointMetrics = endpoint.getEndpointMetrics();
if (MIN_PROCESSING_TIME.getName().equals(metricName)) {
result.set(String.valueOf(endpointMetrics.getMinProcessingTime()));
} else if (MAX_PROCESSING_TIME.getName().equals(metricName)) {
result.set(String.valueOf(endpointMetrics.getMaxProcessingTime()));