Return the approximate size of the queue.
3415
def qsize(self, qname):
        """"""
        if qname in self._queues:
            return self._queues[qname].qsize()
        else:
            raise ValueError(_("queue %s is not defined"), qname)
913210
def get_size_in_bytes(self, handle):
        """"""
        fpath = self._fpath_from_handle(handle)
        return os.stat(fpath).st_size
1239520
def _get_cache_size(replace=False):
    """"""

    if not replace:
        size = _cached_search_compile.cache_info().currsize
    else:
        size = _cached_replace_compile.cache_info().currsize
    return size
790128
def size(self):
    
    if self._size is None:
      self._size = bq.Query('SELECT COUNT(*) FROM %s' %
                            self._get_source()).execute().result()[0].values()[0]
    return self._size
1366671
private static void doWork() {
    derivedLongGauge.createTimeSeries(
        labelValues,
        blockingQueue,
        new ToLongFunction<LinkedBlockingQueue>() {
          @Override
          public long applyAsLong(LinkedBlockingQueue queue) {
            return queue.size();
          }
        });

    // Your code here.
  }
666353
@Override
  public long getQueuedFlowSize() {
    long size = 0L;
    try {
      size = this.executorLoader.fetchQueuedFlows().size();
    } catch (final ExecutorManagerException e) {
      this.logger.error("Failed to get queued flow size.", e);
    }
    return size;
  }
409220
def size(self):
        """"""
        initial_count = self.count()
        count_with_skip = max(0, initial_count - self._skip)
        size = min(count_with_skip, self._limit)
        return size
1219387
def list_length(queue, backend='sqlite'):
    '''
    
    '''
    queue_funcs = salt.loader.queues(__opts__)
    cmd = '{0}.list_length'.format(backend)
    if cmd not in queue_funcs:
        raise SaltInvocationError('Function "{0}" is not available'.format(cmd))
    ret = queue_funcs[cmd](queue=queue)
    return ret
10709
def estimate_size(self):
        
        # if there are no outs use 1 (because the change will be an out)
        outs = len(self.outs) or 1
        return outs * 34 + 148 * len(self.ins) + 10
1259503
@Override
	public int remainingCapacity() {
		if (sizeLimit > 0){
			int remaining = sizeLimit - size();
			return remaining < 0 ? 0 : remaining;
		}else{
			return queue.remainingCapacity();
		}
	}
605304
def queue_size(self):
        """"""
        response = self.contentDirectory.Browse([
            ('ObjectID', 'Q:0'),
            ('BrowseFlag', 'BrowseMetadata'),
            ('Filter', '*'),
            ('StartingIndex', 0),
            ('RequestedCount', 1),
            ('SortCriteria', '')
        ])
        dom = XML.fromstring(really_utf8(response['Result']))

        queue_size = None
        container = dom.find(
            '{urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/}container')
        if container is not None:
            child_count = container.get('childCount')
            if child_count is not None:
                queue_size = int(child_count)

        return queue_size
1269109
def size(self):
        
        return self._size_full_intension \
                    - len(self.exclude)\
                    + len(self.include)
426106
public function size($queue)
    {
        return $this->getClient()->llen($this->getKey(self::QUEUE_KEY . $queue));
    }
1279631
def _get_queue_batch_size(self, queue):
        """"""

        # Fetch one item unless this is a batch queue.
        # XXX: It would be more efficient to loop in reverse order and break.
        batch_queues = self.config['BATCH_QUEUES']
        batch_size = 1
        for part in dotted_parts(queue):
            if part in batch_queues:
                batch_size = batch_queues[part]

        return batch_size
713833
def size(default_chunk_size, response_time_max, response_time_actual):
    """"""
    if response_time_actual == 0:
        response_time_actual = 1
    scale = 1 / (response_time_actual / response_time_max)
    size = int(default_chunk_size * scale)
    return min(max(size, 1), default_chunk_size)
788713
private long size(final Jedis jedis, final String queueName) {
        final String key = key(QUEUE, queueName);
        final long size;
        if (JedisUtils.isDelayedQueue(jedis, key)) { // If delayed queue, use ZCARD
            size = jedis.zcard(key);
        } else { // Else, use LLEN
            size = jedis.llen(key);
        }
        return size;
    }
712082
def get_size(self):
        """"""
        attr = self._get_console_info()
        cols = attr['window']['right'] - attr['window']['left'] + 1
        lines = attr['window']['bottom'] - attr['window']['top'] + 1
        return cols, lines