Skip to content

Instantly share code, notes, and snippets.

@tobowers
Created March 28, 2013 21:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobowers/5267155 to your computer and use it in GitHub Desktop.
Save tobowers/5267155 to your computer and use it in GitHub Desktop.
Profiling enabled; ^C shutdown will now dump profile info
main profile results:
Total time: 1.07
total self children calls method
----------------------------------------------------------------
0.53 0.00 0.53 283 Kernel.require
0.43 0.05 0.39 341 Kernel.require
0.35 0.00 0.35 1 Gem.try_activate
0.35 0.00 0.35 3 Gem::Specification.each
0.35 0.00 0.35 3 Enumerable.find
0.35 0.00 0.35 1 Gem::Specification.find_by_path
0.35 0.01 0.34 9470 Array#each
0.33 0.00 0.33 3 Gem::Specification._all
0.23 0.00 0.23 73 Gem::Specification.load
0.22 0.00 0.21 2123 Class#new_proxy
0.20 0.05 0.15 73 Kernel.eval
0.20 0.04 0.16 16 Kernel.load
0.19 0.00 0.19 2 Fixnum#times
0.15 0.02 0.13 73 Gem::Specification#initialize
0.13 0.00 0.13 1000 Virtus::InstanceMethods.attributes
0.13 0.00 0.13 1000 Virtus::InstanceMethods.get_attributes
0.13 0.00 0.13 1035 Enumerable.each_with_object
0.12 0.00 0.12 1000 Virtus::AttributeSet#each
0.11 0.00 0.11 268 Kernel.require
0.10 0.01 0.09 1003 Array#uniq
0.09 0.02 0.08 8000 #<Module:0x6196ec74>.hash
0.09 0.00 0.09 1 Gem::Specification.dirs
0.09 0.09 0.00 73 File.directory?
0.09 0.00 0.09 1 Array#collect
0.07 0.02 0.05 8179 Array#map
0.07 0.00 0.07 15 Backports.require_relative
0.06 0.00 0.05 4 Backports.require_relative_dir
0.05 0.00 0.05 1000 Virtus::InstanceMethods.initialize
0.05 0.00 0.05 1000 Virtus::InstanceMethods.attributes=
0.05 0.00 0.05 1000 Virtus::InstanceMethods.set_attributes
0.05 0.01 0.04 1035 Hash#each
0.04 0.04 0.00 25 JavaUtilities.get_proxy_or_package_under_package
0.04 0.04 0.00 8002 Hash#hash
0.04 0.01 0.03 4000 BasicObject#__send__
0.04 0.01 0.03 286 Gem::Requirement#initialize
0.03 0.01 0.03 203 Gem::Specification#add_dependency_with_type
0.03 0.00 0.03 2000 Virtus::InstanceMethods.set_attribute
0.03 0.00 0.02 509 Gem::Version#initialize
0.03 0.00 0.02 287 Array#map!
0.02 0.00 0.02 203 Gem::Dependency#initialize
0.02 0.02 0.01 73 IO.read
0.02 0.00 0.02 288 Gem::Requirement.parse
0.02 0.00 0.02 132 Gem::Specification#add_development_dependency
0.02 0.00 0.02 284 Gem::Requirement.create
0.02 0.00 0.02 509 Gem::Version.correct?
0.02 0.00 0.02 2000 Virtus::Attribute#set
0.02 0.00 0.02 88 Gem::Version#<=>
0.02 0.02 0.00 521 String#=~
0.02 0.00 0.02 75 Comparable.>=
0.02 0.02 0.00 1 Time.now
require 'rubygems'
require 'virtus'
class MyTest
include Virtus
attribute :a, String
attribute :b, String
end
1000.times do
MyTest.new(a: 'hi', b: 'bye').attributes
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment