stats

package
v1.6.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CPUMHzPerCore

func CPUMHzPerCore() (uint64, uint64)

CPUMHzPerCore returns the MHz per CPU (P, E) core type.

As with CPUNumCores, asymetric core detection currently only works with Apple Silicon CPUs.

func CPUModelName

func CPUModelName() string

CPUModelName returns the model name of the CPU.

func CPUNumCores

func CPUNumCores() (int, int)

CPUNumCores returns the number of CPU cores available.

This is represented with two values - (Power (P), Efficiency (E)) so we can correctly compute total compute for processors with asymetric cores such as Apple Silicon.

For platforms with symetric cores (or where we do not correcly detect asymetric cores), all cores are presented as P cores.

func Init

func Init() error

func RuntimeStats added in v0.8.0

func RuntimeStats() map[string]string

RuntimeStats is used to return various runtime information

func TotalTicksAvailable

func TotalTicksAvailable() uint64

TotalTicksAvailable calculates the total MHz available across all cores.

Where asymetric cores are correctly detected, the total ticks is the sum of the performance across both core types.

Where asymetric cores are not correctly detected (such as Intel 13th gen), the total ticks available is over-estimated, as we assume all cores are P cores.

Types

This section is empty.

Jump to

Keyboard shortcuts

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