Added trends metrics computation to Metrics class API.