ユニファ開発者ブログ

ユニファ株式会社プロダクトデベロップメント本部メンバーによるブログです。

MemoryProfilerでメモリについて調べてみる

こんにちはサーバーサイドエンジニアの乙です。

コードを書いているときに「このオブジェクトはどれだけのメモリを使用しているんだろう?」と考えるとことはありませんか?まずはインストール不要で使える組み込みライブラリのObjectSpaceを使ってみましょう。

docs.ruby-lang.org

ObjectSpace#memsize_ofを使ってみる

require 'objspace'

arr = Array.new
ObjectSpace.memsize_of(arr)
=> 40

40が返されました。色々試してみて小さなオブジェクトだと40バイトと返されることが多いようです。ChatGPTに質問してみました。

はい、ObjectSpace.memsize_of が返す値はバイト単位で、Rubyオブジェクトのヘッダーサイズを含んだオブジェクトのメモリサイズを表します。このヘッダーサイズは64bitの環境では40バイトで、固定のため一部の小さいオブジェクト(例えば一部の数値、シンボル、特定の小さいクラスのインスタンスなど)では40と表示されることがあります。

また#memsize_ofを使う上で以下のことを覚えておいたほうが良さそうです。

ObjectSpace.memsize_of が返す値はオブジェクトのヘッダーサイズを含みますが、そのオブジェクトが参照している他のオブジェクトのメモリサイズは含まれません。また、一部の種類のオブジェクト(例えば文字列や配列など)は内部的に追加のメモリを確保する場合があり、その追加のメモリも ObjectSpace.memsize_of の返す値に含まれます。 なお、オブジェクトによってはメモリ使用量がオブジェクトの内容に依存するため、40バイト以上の値を返すこともあります。たとえば、文字列オブジェクトの場合、文字列の長さによってメモリ使用量が増加します。

MemoryProfilerのインストール

次はMemoryProfiler を使ってみます。今回は適当なUserをたくさん作りたかったのでfakerも一緒にインストールします。

github.com

gem install mamory_profiler faker

1000個のUserクラスのインスタンスを作成するmain.rbを作成し、コマンドラインから出力させてみます。

# main.rb
require 'faker'
  
class User  
  def initialize(id:, name:, email:)
    @id = id
    @name = name
    @email = email
  end
end 
  
users = []  
  
1_000.times do |i|
  users << User.new(
    id: i,  
    name: Faker::Name.name,
    email: Faker::Internet.email,
  ) 
end
ruby-memory-profiler main.rb -o output.txt --retained-strings=5 --allocated-strings=5

すると output.txt に次のように出力されるはずです。(ruby-memory-profiler -hでオプションを教えてもらえます)

Total allocated: 145658782 bytes (1844451 objects)
Total retained:  15949395 bytes (280320 objects)

allocated memory by gem
-----------------------------------
  79628066  psych
  33668501  faker-3.2.0
  24389922  i18n-1.13.0
   6347932  rubygems
    832928  other
    297633  openssl
    277059  arm64-darwin21
     59360  cgi
     56669  json
     36425  forwardable
     12884  ostruct
     12808  concurrent-ruby-1.2.2
     10150  memory_profiler-1.0.1
      7660  set
      6489  ipaddr
      5184  3.1.0
      4928  random
      1296  securerandom
      1072  date
       928  socket
       848  digest
        40  yaml

allocated memory by file
-----------------------------------
  38661944  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/tree_builder.rb
  26161264  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb
  21675207  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb
  19340048  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/simple.rb
  14978068  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb
   6442861  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb
   5173539  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>
   3945748  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n.rb
   3476068  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes/node.rb
    844704  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/utils.rb
    798404  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems.rb
    703353  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/helpers/char.rb
    579840  (eval)
    321480  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/class_loader.rb
    228287  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb
    224470  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/base.rb
    220704  main.rb
    168746  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb
    167584  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb
    158575  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/openssl.bundle
    105168  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/scalar_scanner.rb
     94176  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes.rb
     75552  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/version.rb
     52903  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/specification.rb
     52402  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/handlers/document_stream.rb
     51055  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/socket.bundle
     50917  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/json/common.rb
     42712  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/cgi/cookie.rb
     34392  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/requirement.rb
     32304  <internal:dir>
     30037  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/psych.bundle
     29762  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/basic_specification.rb
     26908  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/forwardable/impl.rb
     21585  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/yaml_tree.rb
     21113  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/music/grateful_dead.rb
     19116  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/x509.rb
     15976  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/digest.rb
     13704  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/cgi/core.rb
     13696  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/json/ext/generator.bundle
     12884  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/ostruct.rb
     12271  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/json_tree.rb
     12114  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/json/tree_builder.rb
     11993  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/syntax_error.rb
     11282  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/exceptions.rb
     11166  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/pkey.rb
     10296  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/transliterator.rb
     10150  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/memory_profiler-1.0.1/lib/memory_profiler/cli.rb
      9824  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/cipher.rb
      9517  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/forwardable.rb
      8960  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/date_core.bundle

allocated memory by location
-----------------------------------
  38548560  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/tree_builder.rb:97
  19325280  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/simple.rb:51
  18826416  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:455
  11061085  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:395
   7398552  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:154
   6289088  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:126
   5666976  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:157
   5215752  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:101
   5073626  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85
   3935400  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n.rb:336
   3404512  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes/node.rb:34
   3151368  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:337
   2609376  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:648
   1376000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:597
   1376000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:598
   1000000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:599
    843208  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/utils.rb:19
    795524  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems.rb:783
    744000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:600
    658376  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:602
    600000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:596
    579840  (eval):3
    496337  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/helpers/char.rb:8
    427080  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:137
    427080  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:146
    425120  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167
    329184  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:149
    318080  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:53
    286304  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/class_loader.rb:22
    208000  main.rb:14
    199520  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/helpers/char.rb:12
    187186  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:272
    158575  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/openssl.bundle:0
    119881  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:370
    102151  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:608
     89360  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/scalar_scanner.rb:103
     82374  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/base.rb:231
     80000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:132
     79200  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb:118
     79040  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:129
     73040  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343
     72000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:595
     64064  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/base.rb:254
     61486  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:3
     60768  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/tree_builder.rb:23
     59562  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:5
     57859  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:21
     51909  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:160
     51760  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:454
     51744  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:649

allocated memory by class
-----------------------------------
  42032729  String
  38548560  Psych::Nodes::Scalar
  38328256  Array
  15240560  Hash
   6080192  File
   3645024  MatchData
    569240  Class
    375320  Psych::Nodes::Sequence
    204520  Psych::Nodes::Mapping
    191334  Regexp
     77912  Module
     61040  Symbol
     40000  User
     36080  Proc
     32048  Psych::Handlers::DocumentStream
     32048  Psych::Visitors::ToRuby
     24640  Psych::Nodes::Document
     22184  Psych::Nodes::Stream
     19712  Psych::Parser
     12320  Psych::ClassLoader
     12320  Psych::ScalarScanner
     11776  Gem::StubSpecification
     11504  Concurrent::Hash
     10840  Range
      8096  Gem::StubSpecification::StubLine
      7696  RubyVM::InstructionSequence
      5440  Enumerator
      5424  Thread::Backtrace
      2400  Gem::Requirement
      2240  Gem::Dependency
      2088  Gem::Version
      1320  Gem::Specification
       541  JSON::Ext::Generator::State
       480  Integer
       288  NameError
       288  Thread::Mutex
       264  Binding
       258  Time
       240  Psych::Nodes::Alias
       224  SyntaxError
       216  Thread::Backtrace::Location
       200  Float
       192  NameError::message
        88  LoadError
        88  OpenSSL::X509::Store
        80  Concurrent::Map
        80  Object
        80  Rational
        72  UnboundMethod
        40  #<Class:0x0000000104acaaf8>::Config

allocated objects by gem
-----------------------------------
    935374  psych
    444823  faker-3.2.0
    398210  i18n-1.13.0
     50767  rubygems
      7820  other
      2889  openssl
      2075  arm64-darwin21
      1029  json
       637  cgi
       395  forwardable
       126  ostruct
        90  3.1.0
        68  random
        62  concurrent-ruby-1.2.2
        39  memory_profiler-1.0.1
        20  ipaddr
         9  socket
         7  set
         4  digest
         3  date
         3  securerandom
         1  yaml

allocated objects by file
-----------------------------------
    375131  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/simple.rb
    324941  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb
    322182  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/tree_builder.rb
    315447  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb
    275183  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb
    114044  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb
     45658  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>
     19836  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n.rb
     14051  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/helpers/char.rb
      6359  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes/node.rb
      5177  (eval)
      2776  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/base.rb
      2567  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/scalar_scanner.rb
      2448  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb
      2086  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb
      2003  main.rb
      1801  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb
      1219  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/openssl.bundle
       999  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/json/common.rb
       946  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/version.rb
       663  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/specification.rb
       638  <internal:dir>
       626  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/handlers/document_stream.rb
       567  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes.rb
       531  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/class_loader.rb
       487  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/socket.bundle
       487  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/requirement.rb
       469  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/cgi/cookie.rb
       312  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/basic_specification.rb
       310  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/forwardable/impl.rb
       286  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/utils.rb
       253  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems.rb
       217  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/music/grateful_dead.rb
       196  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/yaml_tree.rb
       184  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/util.rb
       165  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/cgi/core.rb
       126  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/ostruct.rb
       112  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/date_core.bundle
       102  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/x509.rb
       101  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/psych.bundle
        99  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/ssl.rb
        96  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/digest.rb
        87  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/exceptions.rb
        85  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/forwardable.rb
        82  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/dependency.rb
        74  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/json/ext/generator.bundle
        74  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/cipher.rb
        68  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/random/formatter.rb
        64  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_gem.rb
        64  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/config.rb

allocated objects by location
-----------------------------------
    375063  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/simple.rb:51
    322739  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:455
    321238  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/tree_builder.rb:97
    263038  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:395
     79313  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:126
     78708  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:157
     59031  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:101
     59031  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:154
     44338  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85
     27000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:597
     27000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:598
     21000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:599
     19677  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n.rb:336
     12635  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:602
     11000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:596
     10677  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:137
     10677  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:146
      9515  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/helpers/char.rb:8
      8000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:149
      7952  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:53
      5793  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes/node.rb:34
      5177  (eval):3
      4380  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/helpers/char.rb:12
      3395  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:272
      3351  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:337
      2968  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:370
      2234  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/scalar_scanner.rb:103
      2000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:132
      2000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:608
      2000  main.rb:14
      1976  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:129
      1826  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167
      1826  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:343
      1232  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/base.rb:231
      1219  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/openssl.bundle:0
      1000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:102
      1000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:130
      1000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:134
      1000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:240
      1000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:244
      1000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:595
      1000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:600
      1000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:604
       894  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/json/common.rb:67
       836  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:5
       781  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb:118
       780  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:21
       736  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:3
       669  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb:36
       629  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:20

allocated objects by class
-----------------------------------
    848975  String
    557164  Array
    321238  Psych::Nodes::Scalar
     84211  Hash
     19912  MatchData
      3351  Psych::Nodes::Sequence
      1826  Psych::Nodes::Mapping
      1526  Symbol
      1000  User
       762  Class
       724  File
       451  Proc
       325  Regexp
       308  Psych::ClassLoader
       308  Psych::Handlers::DocumentStream
       308  Psych::Nodes::Document
       308  Psych::Nodes::Stream
       308  Psych::Parser
       308  Psych::ScalarScanner
       308  Psych::Visitors::ToRuby
       271  Range
        92  Gem::StubSpecification
        92  Gem::StubSpecification::StubLine
        75  Module
        60  Gem::Requirement
        59  Concurrent::Hash
        40  Enumerator
        29  Gem::Version
        28  Gem::Dependency
        12  Integer
        11  RubyVM::InstructionSequence
        10  Thread::Backtrace
         5  Float
         4  Thread::Mutex
         3  Binding
         3  Gem::Specification
         3  JSON::Ext::Generator::State
         3  NameError
         3  NameError::message
         3  Psych::Nodes::Alias
         3  SyntaxError
         3  Thread::Backtrace::Location
         3  Time
         2  Concurrent::Map
         2  Object
         2  Rational
         1  #<Class:0x0000000104acaaf8>::Config
         1  I18n::Backend::Simple
         1  I18n::Config
         1  LoadError

retained memory by gem
-----------------------------------
  14649090  psych
    435000  rubygems
    344425  faker-3.2.0
    255904  arm64-darwin21
    107862  i18n-1.13.0
     62662  openssl
     23284  cgi
     13224  other
     12797  json
     11808  concurrent-ruby-1.2.2
      7450  set
      6105  ipaddr
      5538  ostruct
      3824  forwardable
      3224  random
      2984  3.1.0
      1256  securerandom
      1032  date
       768  digest
       728  socket
       430  memory_profiler-1.0.1

retained memory by file
-----------------------------------
  14544836  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb
    353411  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>
    151295  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/openssl.bundle
     50855  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/socket.bundle
     46982  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/base.rb
     30357  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb
     29538  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes/node.rb
     22930  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb
     19154  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb
     19060  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems.rb
     19046  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/psych.bundle
     14942  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/specification.rb
     14648  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/simple.rb
     13336  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/digest.rb
     13104  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/utils.rb
     12320  <internal:dir>
     12100  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/cgi/cookie.rb
     11692  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/json/ext/generator.bundle
     10919  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/x509.rb
     10176  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/transliterator.rb
      9682  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/exceptions.rb
      8920  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/date_core.bundle
      8264  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/cipher.rb
      8240  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/cgi/core.rb
      8141  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/json/common.rb
      7576  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb
      7450  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/set.rb
      6392  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/version.rb
      6105  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/ipaddr.rb
      5792  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/helpers/base58.rb
      5538  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/ostruct.rb
      5237  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb
      4968  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb
      4880  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/ssl.rb
      4200  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/stringio.bundle
      4176  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/strscan.bundle
      4064  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/digest.bundle
      3800  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/config.rb
      3750  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/interpolate/ruby.rb
      3680  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/util.rb
      3520  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/vehicle.rb
      3480  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/requirement.rb
      3358  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/basic_specification.rb
      3320  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/types.rb
      3224  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/random/formatter.rb
      3136  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n.rb
      3048  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb
      2864  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes/scalar.rb
      2848  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/tv_shows/aqua_teen_hunger_force.rb
      2808  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/games/clash_of_clans.rb

retained memory by location
-----------------------------------
  11000891  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:395
   3151168  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:337
    336837  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85
    272744  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167
    151295  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/openssl.bundle:0
    119361  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:370
     50855  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/socket.bundle:0
     45414  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/base.rb:231
     25218  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes/node.rb:4
     19060  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems.rb:783
     19046  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/psych.bundle:0
     16574  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:160
     14734  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:3
     12320  <internal:dir>:129
     11692  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/json/ext/generator.bundle:0
     11648  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/utils.rb:19
     10368  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/digest.rb:34
      9744  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/simple.rb:76
      9604  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/cgi/cookie.rb:2
      8960  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb:60
      8920  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/date_core.bundle:0
      8096  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb:124
      7350  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:21
      7264  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/transliterator.rb:43
      7104  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/specification.rb:812
      7018  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:5
      6704  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:20
      4600  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/helpers/base58.rb:3
      4352  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/cipher.rb:18
      4200  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/stringio.bundle:0
      4176  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/strscan.bundle:0
      4064  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/digest.bundle:0
      3912  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/set.rb:222
      3760  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/ipaddr.rb:42
      3720  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/config.rb:165
      3680  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb:36
      3680  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb:46
      3680  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/util.rb:101
      3672  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/ostruct.rb:109
      3424  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/set.rb:246
      3248  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/version.rb:208
      3224  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/random/formatter.rb:198
      3208  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb:612
      3055  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/specification.rb:1123
      2880  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/cgi/core.rb:437
      2816  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/json/common.rb:6
      2816  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb:64
      2776  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/cgi.rb:290
      2688  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/company.rb:584
      2664  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/interpolate/ruby.rb:53

retained memory by class
-----------------------------------
  11562051  String
   3176968  Array
    569240  Class
    310232  Hash
    141745  Regexp
     77912  Module
     61040  Symbol
     11776  Gem::StubSpecification
     11504  Concurrent::Hash
      8096  Gem::StubSpecification::StubLine
      5680  Proc
      4920  Range
      2088  Gem::Version
      1520  Gem::Requirement
      1320  Gem::Specification
       960  Gem::Dependency
       541  JSON::Ext::Generator::State
       320  Integer
       288  Thread::Mutex
       258  Time
       200  Float
       168  MatchData
        88  OpenSSL::X509::Store
        80  Concurrent::Map
        80  Object
        80  Rational
        40  #<Class:0x0000000104acaaf8>::Config
        40  I18n::Backend::Simple
        40  I18n::Config
        40  OpenSSL::PKey::DH
        40  Psych::Handler::DumperOptions
        40  Set

retained objects by gem
-----------------------------------
    269488  psych
      6355  rubygems
      1795  arm64-darwin21
       912  faker-3.2.0
       526  openssl
       494  i18n-1.13.0
       311  other
       158  cgi
        63  random
        48  ostruct
        41  json
        37  concurrent-ruby-1.2.2
        35  3.1.0
        22  forwardable
        12  ipaddr
         9  memory_profiler-1.0.1
         4  set
         4  socket
         2  date
         2  digest
         2  securerandom

retained objects by file
-----------------------------------
    268792  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb
      5294  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>
      1037  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/openssl.bundle
       482  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/socket.bundle
       428  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb
       333  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb
       310  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/base.rb
       308  <internal:dir>
       254  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb
       199  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/specification.rb
       137  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes/node.rb
       129  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/version.rb
       111  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/date_core.bundle
        92  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems.rb
        92  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/util.rb
        91  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/cgi/cookie.rb
        87  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/requirement.rb
        66  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb
        65  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/simple.rb
        64  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/cgi/core.rb
        63  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/random/formatter.rb
        54  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/psych.bundle
        54  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/digest.rb
        51  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/ssl.rb
        48  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/ostruct.rb
        48  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes.rb
        47  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/exceptions.rb
        46  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/cipher.rb
        46  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb
        45  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/json/ext/generator.bundle
        42  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/types.rb
        39  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n.rb
        32  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/json/common.rb
        29  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/strscan.bundle
        29  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/music/grateful_dead.rb
        28  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/basic_specification.rb
        27  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/class_loader.rb
        25  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/x509.rb
        16  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/forwardable/impl.rb
        16  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes/scalar.rb
        16  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb
        15  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/specifications/faker-3.2.0.gemspec
        14  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/syntax_error.rb
        13  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/coder.rb
        13  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes/document.rb
        13  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes/sequence.rb
        13  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/internet.rb
        12  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/digest.bundle
        12  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/ipaddr.rb
        12  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/tree_builder.rb

retained objects by location
-----------------------------------
    261565  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:395
      5180  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85
      3350  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:337
      2955  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:370
      1037  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/openssl.bundle:0
       919  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:167
       482  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/socket.bundle:0
       308  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/base.rb:231
       308  <internal:dir>:129
       137  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:21
       118  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:3
       116  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:5
       114  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:160
       111  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/date_core.bundle:0
        95  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:20
        93  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/specification.rb:812
        92  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems.rb:783
        92  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb:124
        92  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb:36
        92  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb:46
        92  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/util.rb:101
        76  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes/node.rb:4
        75  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/cgi/cookie.rb:2
        70  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb:60
        63  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/random/formatter.rb:198
        58  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/version.rb:208
        58  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n/backend/simple.rb:76
        54  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/psych.bundle:0
        53  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:16
        51  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb:119
        47  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/specification.rb:1123
        46  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/cgi/core.rb:437
        45  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/json/ext/generator.bundle:0
        45  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/ostruct.rb:466
        40  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes/node.rb:3
        38  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/requirement.rb:131
        37  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/types.rb:5
        29  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/strscan.bundle:0
        29  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/version.rb:223
        27  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:40
        27  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:41
        26  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/music/grateful_dead.rb:3
        24  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/ssl.rb:233
        23  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:17
        23  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/specification.rb:1964
        22  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb:64
        22  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n.rb:68
        21  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/class_loader.rb:38
        20  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/requirement.rb:68
        20  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/version.rb:379

retained objects by class
-----------------------------------
    272341  String
      3867  Array
      1526  Symbol
       965  Hash
       762  Class
       228  Regexp
       123  Range
        92  Gem::StubSpecification
        92  Gem::StubSpecification::StubLine
        75  Module
        71  Proc
        59  Concurrent::Hash
        38  Gem::Requirement
        29  Gem::Version
        12  Gem::Dependency
         8  Integer
         5  Float
         4  Thread::Mutex
         3  Gem::Specification
         3  JSON::Ext::Generator::State
         3  Time
         2  Concurrent::Map
         2  Object
         2  Rational
         1  #<Class:0x0000000104acaaf8>::Config
         1  I18n::Backend::Simple
         1  I18n::Config
         1  MatchData
         1  OpenSSL::PKey::DH
         1  OpenSSL::X509::Store
         1  Psych::Handler::DumperOptions
         1  Set


Allocated String Report
-----------------------------------
     11276  ""
     10677  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:126
       316  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:455
       177  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85
        70  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb:118
         6  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:3
         5  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:5
         4  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:21
         4  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes/node.rb:4
         4  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:160
         3  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/music/grateful_dead.rb:3
         2  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/cgi/cookie.rb:2
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/json/common.rb:83
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/json/common.rb:84
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/json/common.rb:85
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/json/common.rb:86
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:17
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:23
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes.rb:2
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:4

      6001  "faker.name.first_name"
      6000  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:101
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:26

      3977  "faker.name.last_name"
      3976  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:101
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:26

      3206  "\n"
      2512  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85
        97  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:5
        70  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/stub_specification.rb:118
        60  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:21
        58  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:20
        57  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:3
        39  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:160
        29  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:16
        18  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/tree_builder.rb:2
        17  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes/node.rb:4
        17  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/yaml_tree.rb:2
        16  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes/node.rb:3
        15  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/cgi/cookie.rb:2
        13  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:18
        13  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes.rb:2
        13  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes.rb:6
        13  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/specification.rb:1123
        12  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:23
        12  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/music/grateful_dead.rb:3
         8  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes.rb:3
         8  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes.rb:5
         8  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes.rb:7
         8  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n.rb:68
         7  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:4
         6  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/forwardable/impl.rb:12
         6  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:19
         6  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes.rb:4
         5  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:17
         5  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:20
         4  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/json/tree_builder.rb:2
         4  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/tree_builder.rb:44
         4  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:2
         3  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/psych.bundle:0
         3  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:15
         3  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:22
         3  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:28
         3  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:6
         3  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors.rb:7
         3  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/memory_profiler-1.0.1/lib/memory_profiler/cli.rb:47
         2  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl/pkey.rb:7
         2  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:16
         2  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:2
         2  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:24
         2  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:25
         2  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:27
         2  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:648
         2  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/nodes.rb:8
         2  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/syntax_error.rb:2
         2  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/json_tree.rb:2
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/json/common.rb:95
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/json/common.rb:96
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/openssl.rb:23
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:15
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:26

      3031  "last_name"
      2976  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:126
        52  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych.rb:455
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:395
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/i18n-1.13.0/lib/i18n.rb:414
         1  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85


Retained String Report
-----------------------------------
         5  "/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems"
         3  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/specification.rb:1909
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/specification.rb:791
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/specification.rb:822

         5  "C"
         2  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin21/openssl.bundle:0
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/random/formatter.rb:198
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:40

         5  "u"
         2  <internal:/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/random/formatter.rb:198
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker.rb:41
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/faker-3.2.0/lib/faker/default/types.rb:5

         4  "/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0"
         3  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/specification.rb:2029
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/specification.rb:790

         4  "/Users/user_name/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/specifications/concurrent-ruby-1.2.2.gemspec"
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems.rb:783
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/basic_specification.rb:91
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/specification.rb:1126
         1  /Users/user_name/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/util.rb:101

Userクラスのプロファイルを見てみる

1000個のUserインスタンスを作成したのでallocated objects by classには1000 Userと、allocated memory by classには40000 Userと40000バイトがUserに割り当てられた事がわかりました。


ユニファでは私たちと一緒に働く仲間を募集しています! 気になる方はご検討ください!

unifa-e.com