Skip to content

Instantly share code, notes, and snippets.

@raggi
Created July 13, 2010 23:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raggi/474732 to your computer and use it in GitHub Desktop.
Save raggi/474732 to your computer and use it in GitHub Desktop.
require 'thin'
request = "GET / HTTP/1.0\r\nHost: 127.0.0.1:3001\r\nUser-Agent: ApacheBench/2.3\r\nAccept: */*\r\n\r\n"
def rss
system "ps -orss= #{$$}"
end
rss
while true
100_000.times do
parser = Thin::HttpParser.new
parser.execute({}, request, 0)
end
rss
end
@raggi
Copy link
Author

raggi commented Jul 13, 2010

leaks on rbx 1.0.1 20100603
not on 1.8 or ruby-head (although the latter sees interesting growth initially)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment