Sha256: e04ae67da91102e2eaf2f3fa1949a410152f9dffadddcb4dd411d5b912d254ad

Contents?: true

Size: 438 Bytes

Versions: 11

Compression:

Stored size: 438 Bytes

Contents

# 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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
oneapm_rpm-1.4.2 lib/one_apm/collector/support/jruby_poller.rb
oneapm_rpm-1.4.1 lib/one_apm/collector/support/jruby_poller.rb
oneapm_rpm-1.4.0 lib/one_apm/collector/support/jruby_poller.rb
oneapm_rpm-1.3.7 lib/one_apm/collector/support/jruby_poller.rb
oneapm_rpm-1.3.7.rc1 lib/one_apm/collector/support/jruby_poller.rb
oneapm_rpm-1.3.6 lib/one_apm/collector/support/jruby_poller.rb
oneapm_rpm-1.3.6.rc1 lib/one_apm/collector/support/jruby_poller.rb
oneapm_rpm-1.3.5 lib/one_apm/collector/support/jruby_poller.rb
oneapm_rpm-1.3.5.rc1 lib/one_apm/collector/support/jruby_poller.rb
oneapm_rpm-1.3.4 lib/one_apm/collector/support/jruby_poller.rb
oneapm_rpm-1.3.4.rc1 lib/one_apm/collector/support/jruby_poller.rb