Ejemplo n.º 1
0
  def sendQueued(self):
    while (not self.paused) and self.factory.hasQueuedDatapoints():
      datapoints = self.factory.takeSomeFromQueue()
      self._sendDatapoints(datapoints)

      queueSize = self.factory.queueSize
      if (self.factory.queueFull.called and queueSize < SEND_QUEUE_LOW_WATERMARK):
        self.factory.queueHasSpace.callback(queueSize)

        if (settings.USE_FLOW_CONTROL and state.metricReceiversPaused):
          log.clients('%s resuming paused clients' % self)
          events.resumeReceivingMetrics()
Ejemplo n.º 2
0
  def sendQueued(self):
    while (not self.paused) and self.factory.hasQueuedDatapoints():
      datapoints = self.factory.takeSomeFromQueue()
      self.sendString( pickle.dumps(datapoints, protocol=-1) )
      self.factory.checkQueue()
      instrumentation.increment(self.sent, len(datapoints))

    if (settings.USE_FLOW_CONTROL and
        state.metricReceiversPaused and
        self.factory.queueSize < SEND_QUEUE_LOW_WATERMARK):
      log.clients('send queue has space available, resuming paused clients')
      events.resumeReceivingMetrics()
Ejemplo n.º 3
0
    def sendQueued(self):
        while (not self.paused) and self.factory.hasQueuedDatapoints():
            datapoints = self.factory.takeSomeFromQueue()
            self.sendString(pickle.dumps(datapoints, protocol=-1))
            self.factory.checkQueue()
            instrumentation.increment(self.sent, len(datapoints))

        if (settings.USE_FLOW_CONTROL and state.metricReceiversPaused
                and self.factory.queueSize < SEND_QUEUE_LOW_WATERMARK):
            log.clients(
                'send queue has space available, resuming paused clients')
            events.resumeReceivingMetrics()
Ejemplo n.º 4
0
    def sendQueued(self):
        while (not self.paused) and self.factory.hasQueuedDatapoints():
            datapoints = self.factory.takeSomeFromQueue()
            self._sendDatapoints(datapoints)

            queueSize = self.factory.queueSize
            if (self.factory.queueFull.called
                    and queueSize < SEND_QUEUE_LOW_WATERMARK):
                self.factory.queueHasSpace.callback(queueSize)

                if (settings.USE_FLOW_CONTROL and state.metricReceiversPaused):
                    log.clients('%s resuming paused clients' % self)
                    events.resumeReceivingMetrics()