Adding metrics calculator method.