Added a getMetricByName method