node

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

Package node gets information about the system's NUMA nodes. This looks at the sysfs's node tree and extracts information about each node. If the node tree doesn't exist on the system, instead of node information, an os.ErrNotExist will be returned. Instead of returning a Go struct, the data will be returned as Flatbuffer serialized bytes. A function to deserialize the Flatbuffer serialized bytes into a node.Nodes struct is provided.

Note: the package name is node and not the final element of the import path (flat).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deserialize

func Deserialize(p []byte) *numa.Nodes

Deserialize takes some Flatbuffer serialized bytes and deserializes them as node.Nodes.

func Get

func Get() (p []byte, err error)

Get returns the node information as Flatbuffer serialized bytes using the package's global profiler.

func Serialize

func Serialize(nodes *numa.Nodes) (p []byte)

Serialize node.Nodes using the package global profiler.

Types

type Profiler

type Profiler struct {
	*numa.Profiler
	*fb.Builder
}

Profiler is used to process the node information as Flatbuffers serialized bytes.

func NewProfiler

func NewProfiler() (p *Profiler)

Initializes and returns a node profiler.

func (*Profiler) Get

func (p *Profiler) Get() ([]byte, error)

Get returns the node information as Flatbuffer serialized bytes.

func (*Profiler) Serialize

func (p *Profiler) Serialize(nodes *numa.Nodes) []byte

Serialize serializes node.Nodes using Flatbuffers.

func (*Profiler) SerializeNode

func (p *Profiler) SerializeNode(node *numa.Node) fb.UOffsetT

SerializeNode serializes a Node using flatbuffers and returns the resulting UOffsetT.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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