Documentation ¶
Overview ¶
Package testcontainers implements utility functions for running tests with TestContainers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerStats ¶
type ContainerStats struct { Timestamp time.Time CPUUsageTotal uint64 CPUUsageInKernel uint64 CPUUsageUser uint64 CPUPercentage float64 MemoryUsage uint64 MemoryMaxUsage uint64 MemoryLimit uint64 MemoryPercentage float64 NetworkRxBytes uint64 NetworkTxBytes uint64 BlockIOReadBytes uint64 BlockIOWriteBytes uint64 }
ContainerStats defines a summary of the container's starts
func Stats ¶
func Stats(ctx context.Context, containerID string) (ContainerStats, error)
Stats works as Docker Stats command and retrieves a summary of container resource usage. As CPU measurement are accumulated, in order to calculate CPU percentage, two samples are taken a second apart and the incremental usage is used for estimating the percentage.
Click to show internal directories.
Click to hide internal directories.