resource_usage

package
v0.0.0-...-bf53ec1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillResourceUsage

func FillResourceUsage(dto *exec_logger_dtos.ResourceUsageDto, procId int) (warnings []string)

FillResourceUsage will fill in all the

Types

type Helper

type Helper interface {
	CPUPercentage() (int, error)
	FreePhysicalMemoryKB() (int, error)
	FreeVirtualMemoryKB() (int, error)

	ProcessUsedCPUAndMemoryKB(pid int) (memKB int, cpuDuration time.Duration, returnErr error)
}

Helper is basically a "facade" to hide the ugly logic

func NewHelperFromOsType

func NewHelperFromOsType(osType osvisitors.OsType) Helper

NewHelperFromOsType will create a new Helper from the OsType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL