code: def metrics(self):
          
          masterThrp, backupThrp = self.getThroughputs(self.instances.masterId)
          r = self.instance_throughput_ratio(self.instances.masterId)
          m = [
              ("{} Monitor metrics:".format(self), None),
              ("Delta", self.Delta),
              ("Lambda", self.Lambda),
              ("Omega", self.Omega),
              ("instances started", self.instances.started),
              ("ordered request counts",
               {i: r[0] for i, r in self.numOrderedRequests.items()}),
              ("ordered request durations",
               {i: r[1] for i, r in self.numOrderedRequests.items()}),
              ("master request latencies", self.masterReqLatencies),
              ("client avg request latencies", {i: self.getLatency(i)
                                                for i in self.instances.ids}),
              ("throughput", {i: self.getThroughput(i)
                              for i in self.instances.ids}),
              ("master throughput", masterThrp),
              ("total requests", self.totalRequests),
              ("avg backup throughput", backupThrp),
              ("master throughput ratio", r)]
          return m
docs: Calculate and return the metrics.