Sha256: 52729d544f4e1854cbb66ff6cf5fb0fec4b2806b592c0aff562108ef657cd594

Contents?: true

Size: 613 Bytes

Versions: 25

Compression:

Stored size: 613 Bytes

Contents

#######################################################################
# example_sys_cpu_bsd.rb
#
# Sample cript for general futzing. You can run this code via the
# 'rake example' task.
#
# Modify as you see fit.
#######################################################################
require "sys/cpu"
include Sys

puts "VERSION: " + CPU::VERSION

puts "Load Average: " + CPU.load_avg.join(", ")
puts "CPU Freq (speed): " + CPU.freq.to_s unless RUBY_PLATFORM.match('darwin')
puts "Num CPU: " + CPU.num_cpu.to_s
puts "Architecture: " + CPU.architecture
puts "Machine: " + CPU.machine
puts "Model: " + CPU.model

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
sys-cpu-1.1.0 examples/example_sys_cpu_bsd.rb
sys-cpu-1.0.6 examples/example_sys_cpu_bsd.rb
sys-cpu-1.0.5 examples/example_sys_cpu_bsd.rb
sys-cpu-1.0.4 examples/example_sys_cpu_bsd.rb
sys-cpu-1.0.3 examples/example_sys_cpu_bsd.rb
sys-cpu-1.0.2 examples/example_sys_cpu_bsd.rb
sys-cpu-1.0.1 examples/example_sys_cpu_bsd.rb
sys-cpu-1.0.0 examples/example_sys_cpu_bsd.rb
sys-cpu-0.9.0 examples/example_sys_cpu_bsd.rb
sys-cpu-0.8.3 examples/example_sys_cpu_bsd.rb
sys-cpu-0.8.2 examples/example_sys_cpu_bsd.rb
sys-cpu-0.8.1 examples/example_sys_cpu_bsd.rb
sys-cpu-0.8.0 examples/example_sys_cpu_bsd.rb
sys-cpu-0.7.2 examples/example_sys_cpu_bsd.rb
sys-cpu-0.7.1 examples/example_sys_cpu_bsd.rb
sys-cpu-0.7.0-universal-linux examples/example_sys_cpu_bsd.rb
sys-cpu-0.7.0 examples/example_sys_cpu_bsd.rb
sys-cpu-0.6.4-universal-linux examples/example_sys_cpu_bsd.rb
sys-cpu-0.6.4 examples/example_sys_cpu_bsd.rb
sys-cpu-0.6.3-x86-linux examples/example_sys_cpu_bsd.rb