Update Metrics.java

Update the code to new ver of Metrics.