utils

package
v0.59.0-devel Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package utils groups multiple utils function that can be used by the secl package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PprofDoWithoutContext

func PprofDoWithoutContext(labelSet LabelSet, f func())

PprofDoWithoutContext does the same thing as https://pkg.go.dev/runtime/pprof#Do, but without the allocation resulting from the usage of context values. This function also directly takes a map of labels, instead of incuring allocations when converting from one format (LabelSet) to the other (map).

Types

type LabelSet

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

LabelSet represents an abstracted set of labels that can be used to call PprofDoWithoutContext

func NewLabelSet

func NewLabelSet(labels ...string) (LabelSet, error)

NewLabelSet returns a new LabelSet based on the labels provided as a pair number of arguments (key, value, key value ....)

Jump to

Keyboard shortcuts

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