Sha256: 40f84ccd4559caa1f83b11a52e059bc81642470eeb0d54ba7dd6d35fbaa97208
Contents?: true
Size: 800 Bytes
Versions: 23
Compression:
Stored size: 800 Bytes
Contents
module Picky # Helper methods for measuring, benchmarking, logging. # module Helpers module Indexing include Measuring # Runs the block and logs a few infos regarding the time it took. # def timed_indexing scheduler, &block Picky.logger.info "Picky is indexing using #{scheduler.fork? ? 'multiple processes' : 'a single process'}: " Picky.logger.info " Done in #{timed(&block).round}s.\n" end # Indexing works the same way, always: # * Prepare the scheduler. # * Cache the scheduler. # def index scheduler = Scheduler.new timed_indexing scheduler do prepare scheduler scheduler.finish cache scheduler scheduler.finish end end end end end
Version data entries
23 entries across 23 versions & 1 rubygems
Version | Path |
---|---|
picky-4.22.0 | lib/picky/helpers/indexing.rb |
picky-4.21.2 | lib/picky/helpers/indexing.rb |
picky-4.21.1 | lib/picky/helpers/indexing.rb |