lib/prometheus/client/mmaped_dict.rb in prometheus-client-mmap-0.7.0.beta19 vs lib/prometheus/client/mmaped_dict.rb in prometheus-client-mmap-0.7.0.beta20
- old
+ new
@@ -13,10 +13,9 @@
# Then 4 bytes of padding.
# There's then a number of entries, consisting of a 4 byte int which is the
# size of the next field, a utf-8 encoded string key, padding to an 8 byte
# alignment, and then a 8 byte float which is the value.
class MmapedDict
- MINIMUM_SIZE = 8
attr_reader :m, :used, :positions
def self.read_all_values(f)
Helper::PlainFile.new(f).entries.map do |data, encoded_len, value_offset, _|
encoded, value = data.unpack(format('@4A%d@%dd', encoded_len, value_offset))