performance

package
v5.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	CacheFlagName            = "cache-be"
	CacheLatestBlockFlagName = "cache-latest-block"
)
View Source
const (
	// PyroscopeAddressFlagName is the flag name for the Pyroscope server address
	PyroscopeAddressFlagName = "pyroscope-address"
	// PyroscopeAppNameFlagName is the flag name for the Pyroscope application name
	PyroscopeAppNameFlagName = "pyroscope-app-name"
	// PyroscopeMutexProfileFractionFlagName is the flag name for the mutex profile sampling rate
	PyroscopeMutexProfileFractionFlagName = "pyroscope-mutex-profile-fraction"
	// PyroscopeBlockProfileRateFlagName is the flag name for the block profile rate
	PyroscopeBlockProfileRateFlagName = "pyroscope-block-profile-rate"
	// PyroscopeTagsFlagName is the flag name for custom tags to add to profiles
	PyroscopeTagsFlagName = "pyroscope-tags"

	// DefaultMutexProfileFraction is the default sampling rate for mutex profiling (1 in N events)
	DefaultMutexProfileFraction = 5
	// DefaultBlockProfileRate is the default rate for block profiling in nanoseconds
	DefaultBlockProfileRate = 1
)
View Source
const (
	PprofAddressFlagName = "pprof-address"
)

Variables

View Source
var (
	NotConnectedError   = sdkerrors.New("Not Connected Error", 700, "No Connection To grpc server")
	NotInitializedError = sdkerrors.New("Not Initialized Error", 701, "to use cache run initCache")
)

Functions

func ParseTags added in v5.7.0

func ParseTags(tagsStr string) map[string]string

ParseTags parses a comma-separated list of key=value pairs into a map. Example input: "instance=provider-1,region=us-east,chain=ETH1"

func StartPprofServer

func StartPprofServer(addr string) error

func StartPyroscope added in v5.7.0

func StartPyroscope(appName, serverAddress string, mutexProfileFraction, blockProfileRate int, tags map[string]string) error

StartPyroscope initializes continuous profiling with Pyroscope It connects to a Pyroscope server and sends profiling data for: - CPU profiling - Memory allocation (objects and bytes) - Memory in-use (objects and bytes) - Goroutine profiling

Types

type Cache

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

func InitCache

func InitCache(ctx context.Context, addr string) (*Cache, error)

func (*Cache) CacheActive

func (cache *Cache) CacheActive() bool

func (*Cache) GetEntry

func (cache *Cache) GetEntry(ctx context.Context, relayCacheGet *pairingtypes.RelayCacheGet) (reply *pairingtypes.CacheRelayReply, err error)

func (*Cache) SetEntry

func (cache *Cache) SetEntry(ctx context.Context, cacheSet *pairingtypes.RelayCacheSet) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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