pdhutil

package
v0.0.0-...-1d9613f Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	// taken from winperf.h
	PERF_DETAIL_NOVICE   = 100 // The uninformed can understand it
	PERF_DETAIL_ADVANCED = 200 // For the advanced user
	PERF_DETAIL_EXPERT   = 300 // For the expert user
	PERF_DETAIL_WIZARD   = 400 // For the system designer
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterInstanceVerify

type CounterInstanceVerify func(string) bool

CounterInstanceVerify is a callback function called by GetCounterSet for each instance of the counter. Implementation should return true if that instance should be included, false otherwise

type PdhCounterSet

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

PdhCounterSet is the object which represents a pdh counter set.

func GetCounterSet

func GetCounterSet(className string, counterName string, instanceName string, verifyfn CounterInstanceVerify) (*PdhCounterSet, error)

GetCounterSet returns an initialized PDH counter set.

func (*PdhCounterSet) Close

func (p *PdhCounterSet) Close()

Close closes the query handle, freeing the underlying windows resources.

func (*PdhCounterSet) GetAllValues

func (p *PdhCounterSet) GetAllValues() (values map[string]float64, err error)

GetAllValues returns the data associated with each instance in a query.

func (*PdhCounterSet) GetSingleValue

func (p *PdhCounterSet) GetSingleValue() (val float64, err error)

GetSingleValue returns the data associated with a single-value counter

Jump to

Keyboard shortcuts

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