Sha256: e6339296919568adff2f3001cca6f54dfd0be4d3ed3b2653668137811512861b

Contents?: true

Size: 353 Bytes

Versions: 42

Compression:

Stored size: 353 Bytes

Contents

# encoding: utf-8

module OneApm
  class Transaction

    def cpu_burn
      normal_cpu_burn || jruby_cpu_burn
    end

    def normal_cpu_burn
      return unless @process_cpu_start
      process_cpu - @process_cpu_start
    end

    def process_cpu
      return nil if defined? JRuby
      p = Process.times
      p.stime + p.utime
    end

  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
oneapm_rpm-1.4.2 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.4.1 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.4.0 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.3.7 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.3.7.rc1 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.3.6 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.3.6.rc1 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.3.5 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.3.5.rc1 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.3.4 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.3.4.rc1 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.3.3 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.3.3.rc1 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.3.2 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.3.2.rc1 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.3.1 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.3.1.rc1 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.3.0 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.3.0.rc1 lib/one_apm/transaction/transaction_cpu.rb
oneapm_rpm-1.2.9 lib/one_apm/transaction/transaction_cpu.rb