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
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 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 (*Cache) CacheActive ¶
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
Click to show internal directories.
Click to hide internal directories.