You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ruby-memory-usage-profiler

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ruby-memory-usage-profiler

0.0.4
bundlerRubygems
Version published
Maintainers
1
Created
Source

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

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

Author

  • @_ko1
  • @tagomoris

License

  • This is licensed by the license ruby itself

FAQs

Package last updated on 22 Oct 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.