-
-
Save jeremy/28027 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $ ruby -Ilib active_support_test.rb | |
# ActiveSupport eating 2214 KB, loaded in 92 ms | |
require 'rubygems' | |
unless ENV['stdlib'] | |
%w( active_support/vendor English base64 benchmark bigdecimal blankslate | |
builder cgi date date/format digest/md5 drb enumerator fast_xs fcntl | |
fileutils iconv kconv logger memcache mocha monitor openssl pathname | |
rational rexml/document securerandom set singleton stringio strscan | |
tempfile test/unit/error test/unit/testcase thread time tmpdir tzinfo | |
xmlsimple yaml ).each { |f| require f } | |
end | |
GC.enable_stats | |
GC.start | |
before = GC.allocated_size | |
elapsed = Benchmark.realtime { require 'active_support' } | |
GC.start | |
after = GC.allocated_size | |
puts "ActiveSupport eating %d KB, loaded in %d ms" % [(after - before) / 1024.0, elapsed * 1000] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment