CHips L MINI SHELL

CHips L pro

Current Path : /opt/puppetlabs/puppet/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/benchmark/
Upload File :
Current File : //opt/puppetlabs/puppet/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/benchmark/memory_usage.rb

# frozen-string-literal: true

require 'memory_profiler'
require 'did_you_mean'

# public def foo; end
# error      = (self.fooo rescue $!)
# executable = -> { error.to_s }

METHODS    = ''.methods
INPUT      = 'start_with?'
collection = DidYouMean::SpellChecker.new(dictionary: METHODS)
executable = proc { collection.correct(INPUT) }

GC.disable
MemoryProfiler.report { 100.times(&executable) }.pretty_print

Copyright 2K16 - 2K18 Indonesian Hacker Rulez