Module: Perfer::Platform::Windows

Included in:
Perfer::Platform
Defined in:
lib/perfer/platform/windows.rb

Defined Under Namespace

Modules: Kernel32, PSAPI, Types Classes: PProcessMemoryCounters

Instance Method Summary collapse

Instance Method Details

#command_lineObject



74
75
76
77
78
79
80
81
# File 'lib/perfer/platform/windows.rb', line 74

def command_line
  Kernel32.GetCommandLineA().tap do |command_line|
    unless command_line
      warn "Could not get command line via GetCommandLineA()"
      return nil
    end
  end
end

#maximum_memory_usedObject



67
68
69
70
71
72
# File 'lib/perfer/platform/windows.rb', line 67

def maximum_memory_used
  get_process_memory_info { |info|
    # info[:WorkingSetSize] # RAM
    info[:PagefileUsage] # RAM + SWAP
  }
end

#memory_usedObject



60
61
62
63
64
65
# File 'lib/perfer/platform/windows.rb', line 60

def memory_used
  get_process_memory_info { |info|
    # info[:PeakWorkingSetSize] # RAM
    info[:PeakPagefileUsage] # RAM + SWAP
  }
end