Class: OneApm::Collector::JrubyPoller
Instance Attribute Summary
Attributes inherited from ShellPoller
#pid
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from ShellPoller
#cpu_utilization, kb_page_size
Class Method Details
.enable? ⇒ Boolean
8
9
10
|
# File 'lib/one_apm/collector/support/jruby_poller.rb', line 8
def self.enable?
defined?(::JRuby)
end
|
Instance Method Details
#memory ⇒ Object
12
13
14
|
# File 'lib/one_apm/collector/support/jruby_poller.rb', line 12
def memory
java.lang.Runtime.getRuntime.totalMemory / (1024 * 1024).to_f rescue nil
end
|
#to_s ⇒ Object
16
17
18
|
# File 'lib/one_apm/collector/support/jruby_poller.rb', line 16
def to_s
"JrubyPoller from: java.lang.Runtime.getRuntime.totalMemory"
end
|