Sha256: 1e7b8d3a77e2eb67d74aa658a5a48fbcbf6fd38cb896dee24ca8131f1d9e02cc
Contents?: true
Size: 448 Bytes
Versions: 7
Compression:
Stored size: 448 Bytes
Contents
# frozen_string_literal: true require 'benchmark' module Facter module Framework module Benchmarking class Timer class << self def measure(fact_name) if Options[:timing] time = Benchmark.measure { yield } puts "fact `#{fact_name}`, took: #{time.format('%r')} seconds" else yield end end end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems