SamSaffron / MiniProfiler

A simple but effective mini-profiler for ASP.NET MVC, ASP.NET and Ruby.
http://miniprofiler.com
1.05k stars 221 forks source link

Include Memsize (Kilobytes) for Gc profiler (Ruby Edition) #189

Closed nathany closed 10 years ago

nathany commented 11 years ago

Including the Kilobyte size for objects in with the ?pp=profile-gc option, and sorting by it.

nathany commented 11 years ago

I'm also experimenting with separate sorted lists (by memsize and by object count) rather than one containing both.

nathany commented 11 years ago

I modified diff_object_stats to handle both the object count and size.

At the moment I'm adapting this code to our unicorn config to log this data whenever a unicorn dies. This is an example of two separate sorted lists instead of combining the data into one.

Unicorn master intercepting TERM and sending myself QUIT instead
pid=85998 : RubyVM::InstructionSequence : 42022K
pid=85998 : Thread : 2050K
pid=85998 : Class : 1587K
pid=85998 : Hash : 915K
pid=85998 : String : 830K
pid=85998 : Module : 744K
pid=85998 : Regexp : 352K
pid=85998 : Array : 63K
pid=85998 : Rails::Paths::Root : 13K
pid=85998 : File : 8K
pid=85998 : Random : 2K
pid=85998 : RubyVM : 1K

pid=85998 : String : 203189
pid=85998 : RubyVM::InstructionSequence : 42124
pid=85998 : Array : 36421
pid=85998 : Hash : 6889
pid=85998 : Proc : 6414
pid=85998 : RubyVM::Env : 6348
pid=85998 : Class : 3646
pid=85998 : Regexp : 313
...
dixon commented 10 years ago

We have moved this project to https://github.com/MiniProfiler/rack-mini-profiler - would you please make your changes there? Thank you!

nathany commented 10 years ago

Thanks.

I'll get to it one of these days.

SamSaffron commented 10 years ago

@nathany be sure to check out my talk

http://www.youtube.com/watch?v=LWyEWUD-ztQ

and memory_profiler

https://github.com/SamSaffron/memory_profiler

nathany commented 10 years ago

@SamSaffron Thanks. Will do.