def GetGauge(self, request, context):
     if request.name != GAUGE_NAME:
         raise Exception('Gauge {} does not exist'.format(request.name))
     qps = self._get_qps()
     return metrics_pb2.GaugeResponse(name=GAUGE_NAME, long_value=qps)
 def GetAllGauges(self, request, context):
     qps = self._get_qps()
     return [metrics_pb2.GaugeResponse(name=GAUGE_NAME, long_value=qps)]