Save metrics in db after being computed.