%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/cpanel/ea-ruby24/root/usr/share/gems/gems/did_you_mean-1.1.0/benchmark/
Upload File :
Create Path :
Current File : //opt/cpanel/ea-ruby24/root/usr/share/gems/gems/did_you_mean-1.1.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

Zerion Mini Shell 1.0