irqs

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EffectiveAffinity = 1 << iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter map[string]uint64

the IRQ name is not always a number, can be like "NMI", "TLB"...

func (Counter) Clone

func (C Counter) Clone() Counter

func (Counter) Delta

func (C Counter) Delta(X Counter) Counter

assume x is fresher than x. IRQ (all stems by how the kernel does the accounting): if a irq is counted in both c and x, then val(x) >= val(x) x is always a superset of c

type Handler

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

func New

func New(logger *log.Logger, procfsRoot string) *Handler

func (*Handler) ReadInfo

func (handler *Handler) ReadInfo(flags uint) ([]Info, error)

func (*Handler) ReadStats

func (handler *Handler) ReadStats() (Stats, error)

type Info

type Info struct {
	Source string
	IRQ    int
	CPUs   cpuset.CPUSet
}

type Reporter

type Reporter interface {
	Delta(ts time.Time, prevStats, lastStats Stats)
	Summary(initTs time.Time, prevStats, lastStats Stats)
}

func NewReporter

func NewReporter(sink io.Writer, jsonOutput bool, verbose int, cpus cpuset.CPUSet) Reporter

type Stats

type Stats map[int]Counter

CPUid -> counter

func (Stats) Clone

func (S Stats) Clone() Stats

func (Stats) Delta

func (S Stats) Delta(X Stats) Stats

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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