perf

package
v0.49.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Collector of perf events for a container.

Configuration for perf event manager.

Manager of perf events for containers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Finalize

func Finalize()

Finalize terminates libpfm4 to free resources.

func NewCollector

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

func NewManager

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

Types

type Config

type Config []uint64

func (*Config) UnmarshalJSON

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

type CustomEvent

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

type Event string

type Events

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 added in v0.38.0

type Group struct {
	// contains filtered or unexported fields
}

func (*Group) UnmarshalJSON added in v0.38.0

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

type PerfEvents

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"`
}

Jump to

Keyboard shortcuts

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