File: memory_usage.rb

package info (click to toggle)
ruby-did-you-mean 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 412 kB
  • sloc: ruby: 1,755; makefile: 7
file content (12 lines) | stat: -rw-r--r-- 248 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen-string-literal: true

require 'memory_profiler'
require 'did_you_mean/levenshtein'

report = MemoryProfiler.report do
  1000.times do
    DidYouMean::Levenshtein.distance "user_signed_in?", "user_logged_in?"
  end
end

report.pretty_print