Module: TestProf::MemoryProf::Tracker::RssTool
- Defined in:
- lib/test_prof/memory_prof/tracker/rss_tool.rb
Defined Under Namespace
Classes: GetProcess, PS, ProcFS
Constant Summary
collapse
- TOOLS =
{
linux: ProcFS,
macosx: PS,
unix: PS,
windows: GetProcess
}.freeze
Class Method Summary
collapse
Class Method Details
.os_type ⇒ Object
71
72
73
74
75
76
77
78
79
80
81
82
|
# File 'lib/test_prof/memory_prof/tracker/rss_tool.rb', line 71
def os_type
case RbConfig::CONFIG["host_os"]
when /linux/
:linux
when /darwin|mac os/
:macosx
when /solaris|bsd/
:unix
when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
:windows
end
end
|
67
68
69
|
# File 'lib/test_prof/memory_prof/tracker/rss_tool.rb', line 67
def tool
TOOLS[os_type]&.new
end
|