Skip to content

Instantly share code, notes, and snippets.

View paniko0's full-sized avatar

Dan Souza paniko0

View GitHub Profile
@paniko0
paniko0 / bench_rails_memory_usage.rb
Created May 11, 2017 18:08 — forked from brianhempel/bench_rails_memory_usage.rb
A script to test the memory usage of your Rails application over time. It will run 30 requests against the specified action and report the final RSS. Choose the URL to hit on line 45 and then run with `ruby bench_rails_memory_usage.rb`.
require "net/http"
def start_server
# Remove the X to enable the parameters for tuning.
# These are the default values as of Ruby 2.2.0.
@child = spawn(<<-EOC.split.join(" "))
XRUBY_GC_HEAP_FREE_SLOTS=4096
XRUBY_GC_HEAP_INIT_SLOTS=10000
XRUBY_GC_HEAP_GROWTH_FACTOR=1.8
XRUBY_GC_HEAP_GROWTH_MAX_SLOTS=0
@paniko0
paniko0 / .block
Created June 9, 2018 03:00 — forked from mbostock/.block
Tree of Life
license: gpl-3.0
height: 960

Keybase proof

I hereby claim:

To claim this, I am signing this object: