cadvisor: Index | Files

package perf

import ""

Collector of perf events for a container.

Configuration for perf event manager.

Manager of perf events for containers.


Package Files

collector_no_libpfm.go config.go manager_no_libpfm.go

func Finalize Uses

func Finalize()

Finalize terminates libpfm4 to free resources.

func NewCollector Uses

func NewCollector(cgroupPath string, events Events, numCores int) stats.Collector

func NewManager Uses

func NewManager(configFile string, topology []info.Node) (stats.Manager, error)

type Config Uses

type Config []uint64

func (*Config) UnmarshalJSON Uses

func (c *Config) UnmarshalJSON(b []byte) error

type CustomEvent Uses

type CustomEvent struct {
    // Type of the event. See perf_event_attr documentation
    // at man perf_event_open.
    Type uint32 `json:"type,omitempty"`

    // Symbolically formed event like:
    // pmu/config=PerfEvent.Config[0],config1=PerfEvent.Config[1],config2=PerfEvent.Config[2]
    // as described in man perf-stat.
    Config Config `json:"config"`

    // Human readable name of metric that will be created from the event.
    Name Event `json:"name"`

type Event Uses

type Event string

type Events Uses

type Events struct {
    // List of perf events' names to be measured.
    Events []Group `json:"events"`

    // List of custom perf events' to be measured. It is impossible to
    // specify some events using their names and in such case you have
    // to provide lower level configuration.
    CustomEvents []CustomEvent `json:"custom_events"`

type Group Uses

type Group struct {
    // contains filtered or unexported fields

func (*Group) UnmarshalJSON Uses

func (g *Group) UnmarshalJSON(b []byte) error

type PerfEvents Uses

type PerfEvents struct {
    // Core perf events to be measured.
    Core Events `json:"core,omitempty"`

    // Uncore perf events to be measured.
    Uncore Events `json:"uncore,omitempty"`

Package perf imports 7 packages (graph) and is imported by 3 packages. Updated 2020-09-18. Refresh now. Tools for package owners.