Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
hanami-controller memory profile for Hanami::Action inheritance (at 470b35e5)
# Running TIMES=10000 be ruby benchmarks/memory_profile_action.rb
Total allocated: 184912288 bytes (1360036 objects)
Total retained: 104910880 bytes (780031 objects)
allocated memory by gem
-----------------------------------
56242240 concurrent-ruby-1.1.10
53282480 dry-configurable-0.15.0
34120000 utils-8585be837309
30547488 other
10720080 controller/lib
allocated memory by file
-----------------------------------
48081896 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb
32920000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb
30547488 benchmarks/memory_profile_action_temp.rb
29361288 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/setting.rb
20641032 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/settings.rb
6000200 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/map.rb
6000080 /Users/tim/Source/hanami/controller/lib/hanami/action.rb
4720000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb
2480120 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/instance_methods.rb
2160144 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb
800040 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/config.rb
800000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/callbacks.rb
400000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute/attributes.rb
allocated memory by location
-----------------------------------
31720000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
30547488 benchmarks/memory_profile_action_temp.rb:10
27840928 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:123
20240968 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:16
20001000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/setting.rb:158
15840792 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/settings.rb:49
6000200 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/map.rb:241
5760288 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/setting.rb:162
4000200 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/settings.rb:67
3600000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/setting.rb:89
3520000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:368
2400000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:288
2160144 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:14
1680000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/instance_methods.rb:42
800040 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/settings.rb:72
800000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/callbacks.rb:23
800000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:85
800000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/config.rb:127
800000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/instance_methods.rb:51
800000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:284
400000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:22
400000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute/attributes.rb:15
400000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:286
400000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:54
400000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:55
400000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:57
400000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:58
400000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:64
400000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:95
400000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:302
400000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:336
400000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:366
80 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/instance_methods.rb:18
80 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:70
40 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/config.rb:27
40 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/instance_methods.rb:21
allocated memory by class
-----------------------------------
77923184 Hash
33240000 String
29747488 Class
18800480 Array
15840792 Dry::Configurable::Setting
2160144 Thread::Mutex
1200080 Concurrent::Map
800040 Dry::Configurable::Config
800040 Dry::Configurable::Settings
800040 Hanami::Action::Configuration
800000 <<Unknown>>
800000 Concurrent::Array
800000 Hanami::Utils::Callbacks::Chain
800000 Pathname
400000 Hanami::Utils::ClassAttribute::Attributes
allocated objects by gem
-----------------------------------
620028 dry-configurable-0.15.0
340000 utils-8585be837309
240002 controller/lib
120006 concurrent-ruby-1.1.10
40000 other
allocated objects by file
-----------------------------------
350013 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/setting.rb
310000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb
220011 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/settings.rb
140002 /Users/tim/Source/hanami/controller/lib/hanami/action.rb
100000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb
60003 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb
40000 benchmarks/memory_profile_action_temp.rb
30003 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/instance_methods.rb
30002 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb
30001 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/map.rb
20001 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/config.rb
20000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/callbacks.rb
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute/attributes.rb
allocated objects by location
-----------------------------------
280000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
180009 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/setting.rb:158
180009 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/settings.rb:49
90000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/setting.rb:89
80004 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/setting.rb:162
70000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:368
60000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:288
40000 benchmarks/memory_profile_action_temp.rb:10
30002 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:14
30002 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:16
30001 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:123
30001 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/map.rb:241
20001 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/settings.rb:67
20001 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/settings.rb:72
20000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/callbacks.rb:23
20000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:85
20000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/config.rb:127
20000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/instance_methods.rb:51
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:22
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute/attributes.rb:15
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/instance_methods.rb:42
10000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:284
10000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:286
10000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:54
10000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:55
10000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:57
10000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:58
10000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:64
10000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:95
10000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:302
10000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:336
10000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:366
2 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/instance_methods.rb:18
2 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:70
1 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/config.rb:27
1 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/instance_methods.rb:21
allocated objects by class
-----------------------------------
390016 Hash
300000 String
270004 Array
180009 Dry::Configurable::Setting
30002 Concurrent::Map
30002 Thread::Mutex
20001 Dry::Configurable::Config
20001 Dry::Configurable::Settings
20001 Hanami::Action::Configuration
20000 Class
20000 Concurrent::Array
20000 Hanami::Utils::Callbacks::Chain
20000 Pathname
10000 <<Unknown>>
10000 Hanami::Utils::ClassAttribute::Attributes
retained memory by gem
-----------------------------------
44002240 dry-configurable-0.15.0
29747488 other
22401112 concurrent-ruby-1.1.10
5560040 controller/lib
3200000 utils-8585be837309
retained memory by file
-----------------------------------
29747488 benchmarks/memory_profile_action_temp.rb
25761288 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/setting.rb
20240968 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb
16640832 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/settings.rb
3200040 /Users/tim/Source/hanami/controller/lib/hanami/action.rb
2360000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb
2160144 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb
2000000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb
800080 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/instance_methods.rb
800040 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/config.rb
800000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/callbacks.rb
400000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute/attributes.rb
retained memory by location
-----------------------------------
29747488 benchmarks/memory_profile_action_temp.rb:10
20240968 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:16
20001000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/setting.rb:158
15840792 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/settings.rb:49
5760288 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/setting.rb:162
2160144 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:14
1600000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
1560000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:368
800040 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/settings.rb:72
800000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/callbacks.rb:23
800000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/config.rb:127
800000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/instance_methods.rb:51
800000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:284
400000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:22
400000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute/attributes.rb:15
400000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:286
400000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:288
400000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:55
400000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:58
400000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:64
400000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:95
400000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:302
400000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:336
80 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/instance_methods.rb:18
40 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/config.rb:27
40 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:70
retained memory by class
-----------------------------------
47202256 Hash
29747488 Class
15840792 Dry::Configurable::Setting
2160144 Thread::Mutex
2000000 Array
1200080 Concurrent::Map
1160000 String
800040 Dry::Configurable::Config
800040 Dry::Configurable::Settings
800040 Hanami::Action::Configuration
800000 <<Unknown>>
800000 Concurrent::Array
800000 Hanami::Utils::Callbacks::Chain
400000 Hanami::Utils::ClassAttribute::Attributes
400000 Pathname
retained objects by gem
-----------------------------------
500026 dry-configurable-0.15.0
120001 controller/lib
80000 utils-8585be837309
60004 concurrent-ruby-1.1.10
20000 other
retained objects by file
-----------------------------------
260013 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/setting.rb
200010 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/settings.rb
70001 /Users/tim/Source/hanami/controller/lib/hanami/action.rb
50000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb
50000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb
30002 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb
30002 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb
20002 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/instance_methods.rb
20001 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/config.rb
20000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/callbacks.rb
20000 benchmarks/memory_profile_action_temp.rb
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute/attributes.rb
retained objects by location
-----------------------------------
180009 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/setting.rb:158
180009 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/settings.rb:49
80004 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/setting.rb:162
40000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
30002 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb:14
30002 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb:16
30000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:368
20001 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/settings.rb:72
20000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/callbacks.rb:23
20000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/config.rb:127
20000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/instance_methods.rb:51
20000 benchmarks/memory_profile_action_temp.rb:10
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:22
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute/attributes.rb:15
10000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:284
10000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:286
10000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:288
10000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:55
10000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:58
10000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:64
10000 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:95
10000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:302
10000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:336
2 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/instance_methods.rb:18
1 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/dry-configurable-0.15.0/lib/dry/configurable/config.rb:27
1 /Users/tim/Source/hanami/controller/lib/hanami/action.rb:70
retained objects by class
-----------------------------------
320015 Hash
180009 Dry::Configurable::Setting
50000 Array
30002 Concurrent::Map
30002 Thread::Mutex
20001 Dry::Configurable::Config
20001 Dry::Configurable::Settings
20001 Hanami::Action::Configuration
20000 Class
20000 Concurrent::Array
20000 Hanami::Utils::Callbacks::Chain
20000 String
10000 <<Unknown>>
10000 Hanami::Utils::ClassAttribute::Attributes
10000 Pathname
Allocated String Report
-----------------------------------
60000 "/Users/tim/Source/hanami/controller"
50000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:368
10000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:366
40000 " end # end\n"
40000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
20000 "\n"
20000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
20000 "\n def after_callbacks # def foo\n class_attributes[:after_callbacks] # class_attributes[:foo]\n end "
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:85
20000 "\n def before_callbacks # def foo\n class_attributes[:before_callbacks] # class_attributes[:foo]\n end "
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:85
20000 " "
20000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
20000 " #\n"
20000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
20000 "class_attributes["
20000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
10000 " class_attributes[:after_callbacks] # class_attributes[:foo]\n"
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
10000 " class_attributes[:after_callbacks] = value # class_attributes[:foo] = value\n"
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
10000 " class_attributes[:before_callbacks] # class_attributes[:foo]\n"
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
10000 " class_attributes[:before_callbacks] = value # class_attributes[:foo] = value\n"
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
10000 " def after_callbacks # def foo\n"
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
10000 " def after_callbacks=(value) # def foo=(value)\n"
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
10000 " def before_callbacks # def foo\n"
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
10000 " def before_callbacks=(value) # def foo=(value)\n"
10000 /Users/tim/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/bundler/gems/utils-8585be837309/lib/hanami/utils/class_attribute.rb:77
Retained String Report
-----------------------------------
20000 "/Users/tim/Source/hanami/controller"
20000 /Users/tim/Source/hanami/controller/lib/hanami/action/configuration.rb:368
@timriley
Copy link
Author

timriley commented Oct 19, 2022

This is the "before" profile. See https://gist.github.com/timriley/417595e404e58efb92a5290a4942ef1a for the "after" profile.

@timriley
Copy link
Author

timriley commented Oct 20, 2022

Memory usage per r10k:

memory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment