Sha256: 33c2a635e2e2c72608b0b7f5c9df7ee2330df319f11339fb042d9aec2024d308
Contents?: true
Size: 389 Bytes
Versions: 115
Compression:
Stored size: 389 Bytes
Contents
require 'open3' module Prometheus module Client module PageSize def self.page_size(fallback_page_size: 4096) stdout, status = Open3.capture2('getconf PAGESIZE') return fallback_page_size if status.nil? || !status.success? page_size = stdout.chomp.to_i return fallback_page_size if page_size <= 0 page_size end end end end
Version data entries
115 entries across 115 versions & 2 rubygems