A summary of data about the Ruby ecosystem.

https://github.com/zombocom/get_process_mem

Get memory usage of a process in Ruby
https://github.com/zombocom/get_process_mem

Keywords from Contributors

rubygems mvc activerecord activejob rack multithreading devise rack-middleware crash-reporting sinatra

Last synced: about 22 hours ago
JSON representation

Repository metadata

Get memory usage of a process in Ruby

README.md

Get Process Memory

CI
Help Contribute to Open Source

Do you need to get the memory usage of a process? Great because this library does that.

Install

In your Gemfile add

gem 'get_process_mem'

then run $ bundle install.

If you're using Windows you'll also need to have the sys-proctable gem.

Use It

Get the current process memory usage:

mem = GetProcessMem.new
puts mem.inspect
#<GetProcessMem @mb=24.28125 @gb=0.023712158203125 @kb=24864.0 @bytes=25460736 >
mem.bytes # => 25460736
mem.kb    # => 24864.0
mem.mb    # => 24.28125
mem.gb    # => 0.023712158203125

Note: All numeric values returned as a float except bytes which is an integer.

Get memory usage of another process:

`echo 'nothing to see here' > tmplogf`
pid = Process.spawn('tail -f tmplog')
mem = GetProcessMem.new(pid)
puts mem.inspect
# => #<GetProcessMem @mb=0.48828125 @gb=0.000476837158203125 @kb=500.0 @bytes=512000 >

Process.kill('TERM', pid)
Process.wait(pid)

mem.inspect
# => "#<GetProcessMem @mb=0.0 @gb=0.0 @kb=0.0 @bytes=0>"
`rm tmplog`

On Linux, for memory size we return the RSS or the Resident Set Size, basically how much memory the program takes up in RAM at the time, including all the shared memory.

License

MIT


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 1 day ago

Total Commits: 66
Total Committers: 14
Avg Commits per committer: 4.714
Development Distribution Score (DDS): 0.364

Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
schneems r****n@g****m 42
Karl Söderström k****m@g****m 6
Frederick Cheung f****g@g****m 4
pavel p****y@e****z 3
wonda-tea-coffee r****a@c****p 2
technogeeky t****b@g****m 1
Stan Hu s****u@g****m 1
Olle Jonsson o****n@g****m 1
Juanito Fatas k****0@g****m 1
Elia Schito e****a@s****e 1
Dave Gynn d****n@g****m 1
Ankit gupta a****8@g****m 1
Andrew Selder a****r@m****m 1
Andrew Selder a****r@u****m 1

Committer domains:


Issue and Pull Request metadata

Last synced: 25 days ago

Total issues: 20
Total pull requests: 33
Average time to close issues: 11 months
Average time to close pull requests: 5 months
Total issue authors: 15
Total pull request authors: 16
Average comments per issue: 5.3
Average comments per pull request: 1.67
Merged pull request: 29
Bot issues: 0
Bot pull requests: 0

Past year issues: 1
Past year pull requests: 1
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 1
Past year pull request authors: 1
Past year average comments per issue: 0.0
Past year average comments per pull request: 1.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/zombocom/get_process_mem

Top Issue Authors

  • schneems (4)
  • aselder (2)
  • jjb (2)
  • yovasx2 (1)
  • erwanlr (1)
  • LucasCioffi (1)
  • edariedl (1)
  • vusaalab (1)
  • wonda-tea-coffee (1)
  • nsallis (1)
  • andrewngo (1)
  • nathany (1)
  • dgynn (1)
  • bdmac (1)
  • wjordan (1)

Top Pull Request Authors

  • schneems (11)
  • ksoderstrom (3)
  • ahorek (3)
  • wonda-tea-coffee (2)
  • aselder (2)
  • fcheung (2)
  • stanhu (1)
  • Filirom1 (1)
  • technogeeky (1)
  • olleolleolle (1)
  • MSP-Greg (1)
  • elia (1)
  • dgynn (1)
  • JuanitoFatas (1)
  • bdmac (1)

Top Issue Labels

Top Pull Request Labels


Dependencies

Gemfile rubygems
  • sys-proctable >= 0
get_process_mem.gemspec rubygems
  • rake ~> 12 development
  • sys-proctable ~> 1.2 development
  • test-unit ~> 3 development
  • ffi ~> 1.0
.github/workflows/check_changelog.yml actions
  • actions/checkout v1 composite
.github/workflows/ci.yml actions
  • actions/checkout v4 composite
  • ruby/setup-ruby v1 composite

Score: 8.827321452697849