diff --git a/lib/prometheus/client/data_stores/direct_file_store.rb b/lib/prometheus/client/data_stores/direct_file_store.rb index 717d8d5c..7bb5c1f4 100644 --- a/lib/prometheus/client/data_stores/direct_file_store.rb +++ b/lib/prometheus/client/data_stores/direct_file_store.rb @@ -257,8 +257,7 @@ def all_values with_file_lock do @positions.map do |key, pos| @f.seek(pos) - value = @f.read(8).unpack('d')[0] - timestamp = @f.read(8).unpack('d')[0] + value, timestamp = @f.read(16).unpack('dd') [key, value, timestamp] end end