Returns the estimated # of bytes per record.
487076
long recordSize() {
        return Math.max(LongMath.divide(_bytesAdded, Math.max(_adds, 1), RoundingMode.CEILING), 1);
    }
1177150
def size_on_disk(self):
        
        return int(self.connection.query(
            """
            SELECT SUM(data_length + index_length)
            FROM information_schema.tables WHERE table_schema='{db}'
            """.format(db=self.database)).fetchone()[0])
249652
def mft_record_size(self):
        
        if self.extended_bpb.clusters_per_mft < 0:
            return 2 ** abs(self.extended_bpb.clusters_per_mft)
        else:
            return self.clusters_per_mft * self.sectors_per_cluster * \
                self.bytes_per_sector
1205614
def get_len(self, key):
        """"""
        data = self.model.get_data()
        return len(data[key])
691259
private void computeStatistics(Record record) {
    computeStatistics(record.tip, record.host, record.inputBytes);
  }
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
482147
def MemoryExceeded(self):
    """"""
    rss_size = self.proc.memory_info().rss
    return rss_size // 1024 // 1024 > config.CONFIG["Client.rss_max"]
228789
def GetByteSize(self):
    
    if self._byte_size is None and self.members:
      self._byte_size = 0
      for member_definition in self.members:
        byte_size = member_definition.GetByteSize()
        if byte_size is None:
          self._byte_size = None
          break

        self._byte_size = max(self._byte_size, byte_size)

    return self._byte_size
380353
def _num_bytes_to_human_readable(num_bytes):
  """"""
  if num_bytes < (2 ** 10):
    return "%d B" % num_bytes
  elif num_bytes < (2 ** 20):
    return "%.3f KB" % (float(num_bytes) / (2 ** 10))
  elif num_bytes < (2 ** 30):
    return "%.3f MB" % (float(num_bytes) / (2 ** 20))
  else:
    return "%.3f GB" % (float(num_bytes) / (2 ** 30))
1033315
int getTotalCount() {
    int ret = 0; 
    for (RaidMissingBlocksPerCodec queue : queues.values()) {
      ret += queue.getTotalCount();
    }
    return ret;
  }
1046286
def get_file_size(fileobj):
    
    currpos = fileobj.tell()
    fileobj.seek(0, 2)
    total_size = fileobj.tell()
    fileobj.seek(currpos)
    return total_size
1317440
def num_in_memory(self):
    """"""
    n = len(self._data) - 1
    while n >= 0:
      if isinstance(self._data[n], _TensorValueDiscarded):
        break
      n -= 1
    return len(self._data) - 1 - n
1077673
def nbytes_stored(self):
        """"""
        m = getsize(self._store, self._path)
        if self._chunk_store is None:
            return m
        else:
            n = getsize(self._chunk_store, self._path)
            if m < 0 or n < 0:
                return -1
            else:
                return m + n
1343000
public int getRecordSize(final long iPosition) throws IOException {
    acquireSharedLock();
    try {

      final long[] pos = getRelativePosition(iPosition);
      final OFile file = files[(int) pos[0]];

      return file.readInt(pos[1]);

    } finally {
      releaseSharedLock();
    }
  }
1178665
def calculate_size(name, count):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += INT_SIZE_IN_BYTES
    return data_size
325331
def __recordFmt(self):
        """"""
        if not self.numRecords:
            self.__dbfHeader()
        fmt = ''.join(['%ds' % fieldinfo[2] for fieldinfo in self.fields])
        fmtSize = calcsize(fmt)
        return (fmt, fmtSize)
1268493
def bytes(self, count):
        """"""

        if count < 0:
            raise ValueError

        # fast path
        if self._bits == 0:
            data = self._fileobj.read(count)
            if len(data) != count:
                raise BitReaderError("not enough data")
            return data

        return bytes(bytearray(self.bits(8) for _ in xrange(count)))