class StatisticsController implements Constants {

    @RequestMapping(path = "/v1/cpu-utilization", method = RequestMethod.GET)
    
    public ResponseEntity<Object> getCPUUtilization(@RequestParam("ag") String assetGroup) {
        if (Strings.isNullOrEmpty(assetGroup)) {
            return ResponseUtils.buildFailureResponse(new Exception(StatsConstants.ERR_MSG_AG_MANDATORY));
        }
        ResponseVO response;
        try {
            response = new ResponseVO(statsService.getCPUUtilization(assetGroup));
        } catch (Exception e) {
            LOGGER.error("Error fetching CPU Utilisation", e);
            return ResponseUtils.buildFailureResponse(e);
        }
        return ResponseUtils.buildSucessResponse(response);

    }

}