No commit activity in last 3 years
No release in over 3 years
Memory usage profiler for debugging of Ruby itself (and/or middlewares)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
 Project Readme

Ruby's MemoryUsageProfiler

Collect memory usage profiling informations from CRuby runtime and Linux pseudo filesystems.

Originally written by @_ko1.

Installation

Add this line to your application's Gemfile:

gem 'ruby-memory-usage-profiler'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ruby-memory-usage-profiler

Usage

To run profiler itself (without any other ruby code):

$ run_ruby_memory_usage_profiler

This program writes profiler result in 'memory-profile-result' of current directory, in each 1 second.

$ run_ruby_memory_usage_profiler [DURATION sec] [OUTPUT PATH]

For stdout, specify '-'

$ run_ruby_memory_usage_profiler 5 -

From your own code

Kick MemoryUsageProfiler#kick with block how to process results each time you want.

labels = MemoryUsageProfiler.banner
each_time_you_want do
  MemoryUsageProfiler.kick('my_program_label') do |result|
    result_hash = Hash[ [labels, result].transpose ]
    send_to_anywhere_by_myself(result_hash)
  end
end

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Author

  • @_ko1
  • @tagomoris

License

  • This is licensed by the license ruby itself