Sha256: b313a1633ab751c6d4e2bb5992f0450acb2cdcade2e0fb22439af4f835c84659
Contents?: true
Size: 402 Bytes
Versions: 10
Compression:
Stored size: 402 Bytes
Contents
#!/usr/bin/env ruby require 'ruby-prof' # Make sure this works with no class or method result = RubyProf.profile do sleep 1 end methods = result.threads.values.first global_method = methods.sort_by {|method| method.full_name}.first if global_method.full_name != 'Global#[No method]' raise(RuntimeError, "Wrong method name. Expected: Global#[No method]. Actual: #{global_method.full_name}") end
Version data entries
10 entries across 10 versions & 2 rubygems