Class: JRuby::Management::ProfilerMBean
- Inherits:
-
JMX::DynamicMBean
- Object
- JMX::DynamicMBean
- JRuby::Management::ProfilerMBean
- Defined in:
- lib/jruby/management/profiler_mbean.rb
Defined Under Namespace
Classes: JRuby.runtime
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.mbean_name ⇒ Object
31 32 33 |
# File 'lib/jruby/management/profiler_mbean.rb', line 31 def self.mbean_name "ProfilerMBean" end |
Instance Method Details
#dump_profile_info(path) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/jruby/management/profiler_mbean.rb', line 18 def dump_profile_info(path) runtime = JRuby.runtime file = open(path, 'w+') runtime.thread_service.ruby_thread_map.each do |t, rubythread| file.puts("\n#{t} profile results:") context = JRuby.reference(rubythread).context profile_data = context.profile_data printer = runtime.instance_config.make_default_profile_printer(profile_data) printer.printProfile(file) end file.close end |