Documentation ¶
Overview ¶
Package mempressure creates a realistic memory pressure situation and takes related measurements.
Index ¶
Constants ¶
View Source
const ( // CompressibleData is a file containing compressible data for preallocation. CompressibleData = "memory_pressure_page.lzo.40" // WPRArchiveName is the external file name for the wpr archive. WPRArchiveName = "memory_pressure_mixed_sites.wprgo" )
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(ctx context.Context, outDir string, cr *chrome.Chrome, arc *arc.ARC, p *RunParameters) (errRet error)
Run creates a memory pressure situation by loading multiple tabs into Chrome until the first tab discard occurs. It takes various measurements as the pressure increases (phase 1) and afterwards (phase 2). Parameter arc is optional - if nil, VM-dependent metrics will be omitted.
Types ¶
type RunParameters ¶
type RunParameters struct { // PageFilePath is the path name of a file with one page (4096 bytes) // of data. PageFilePath string // PageFileCompressionRatio is the approximate zram compression ratio of the content of PageFilePath. PageFileCompressionRatio float64 // MaxTabCount is the maximal tab count to open MaxTabCount int // Mode indicates whether to run in record mode // vs. replay mode. Mode wpr.Mode }
RunParameters contains the configurable parameters for Run.
type TestEnv ¶
type TestEnv struct {
// contains filtered or unexported fields
}
TestEnv is a struct containing the common setup data for memory pressure tests.
func NewTestEnv ¶
func NewTestEnv(ctx context.Context, outDir string, enableARC, useHugePages bool, archive string) (*TestEnv, error)
NewTestEnv creates a new TestEnv, creating new WPR, Chrome, and ARC instances to use.
Click to show internal directories.
Click to hide internal directories.