update metric calculate