package fs

import "github.com/docker/docker/pkg/cgroups/fs"

Utility for testing cgroup operations.

Creates a mock of the cgroup filesystem for the duration of the test.

Index

Variables

var (
	ErrNotSupportStat = errors.New("stats are not supported for subsystem")
	ErrNotValidFormat = errors.New("line is not a valid key value format")
)

Functions

func Apply

func Apply(c *cgroups.Cgroup, pid int) (cgroups.ActiveCgroup, error)

func GetStats

func GetStats(c *cgroups.Cgroup, subsystem string, pid int) (map[string]float64, error)

func NewCgroupTestUtil

func NewCgroupTestUtil(subsystem string, t *testing.T) *cgroupTestUtil

Creates a new test util for the specified subsystem

Source Files

apply_raw.go blkio.go cpu.go cpuacct.go cpuset.go devices.go freezer.go memory.go perf_event.go test_util.go utils.go

Version
v0.11.1
Published
May 8, 2014
Platform
js/wasm
Imports
14 packages
Last checked
11 seconds ago

Tools for package owners.