Project

quick_mem

0.0
No commit activity in last 3 years
No release in over 3 years
A simple gem to dump memory stats
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 0.6.3
~> 10.0
~> 3.1.0
~> 0.29.1
 Project Readme

QuickMem

Gem Version

A simple gem to dump memory stats. Primarily written to tick off the "I wrote a gem" box. I'll probably improve it to be some kind of analyzer/profiler if time permits. Suggestions welcome!

Installation

Add this line to your application's Gemfile:

gem 'quick_mem'

And then execute:

$ bundle

Or install it yourself as:

$ gem install quick_mem

Usage

require 'quick_mem'

# show memory stats (more-or-less raw form)
QuickMem::QuickMemory.show_stats

# show memory summary (heap total,used,free mem in MB and percentage)
QuickMem::QuickMemory.show_summary

# view top 50 objects by descending order of size
QuickMem::QuickMemory.view_objects_by_size

# view top 50 objects by descending order of instance count
QuickMem::QuickMemory.view_objects_by_count

Contributing

  1. Fork it ( https://github.com/rajivrnair/quick_mem/fork )
  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 a new Pull Request

Useful Reading

http://www.atdot.net/~ko1/activities/rubyconf2013-ko1_pub.pdf http://www.omniref.com/blog/blog/2014/03/27/ruby-garbage-collection-still-not-ready-for-production/ http://samsaffron.com/archive/2014/04/08/ruby-2-1-garbage-collection-ready-for-production http://samsaffron.com/archive/2013/11/22/demystifying-the-ruby-gc http://thorstenball.com/blog/2014/03/12/watching-understanding-ruby-2.1-garbage-collector/ http://www.rubyenterpriseedition.com/documentation.html#_garbage_collector_performance_tuning http://stackoverflow.com/questions/16850551/ruby-gcprofiler-use-size-is-greater-than-total-size https://github.com/ko1/gc_tracer/

https://quickleft.com/blog/engineering-lunch-series-step-by-step-guide-to-building-your-first-ruby-gem/ http://www.smashingmagazine.com/2014/04/08/how-to-build-a-ruby-gem-with-bundler-test-driven-development-travis-ci-and-coveralls-oh-my/ http://recipes.sinatrarb.com/p/development/bundler