# encoding: utf-8 require 'one_apm/collector/support/shell_poller' module OneApm module Collector class JrubyPoller < OneApm::Collector::ShellPoller def self.enable? defined?(::JRuby) end def memory java.lang.Runtime.getRuntime.totalMemory / (1024 * 1024).to_f rescue nil end def to_s "JrubyPoller from: java.lang.Runtime.getRuntime.totalMemory" end end end end