debug

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandHome

func ExpandHome(p string) string

ExpandHome expands home directory in file paths. ~someuser/tmp will not be expanded.

Types

type API added in v0.6.0

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

API is the collection of tracing APIs exposed over the private debugging endpoint.

func NewAPI added in v0.6.0

func NewAPI(
	ctx *server.Context,
	backend backend.Backend,
	clientCtx client.Context,
) *API

NewAPI creates a new API definition for the tracing methods of the Ethereum service.

func (*API) BlockProfile added in v0.6.0

func (a *API) BlockProfile(file string, nsec uint) error

BlockProfile turns on goroutine profiling for nsec seconds and writes profile data to file. It uses a profile rate of 1 for most accurate information. If a different rate is desired, set the rate and write the profile manually.

func (*API) CpuProfile added in v0.6.0

func (a *API) CpuProfile(file string, nsec uint) error

CpuProfile turns on CPU profiling for nsec seconds and writes profile data to file.

func (*API) FreeOSMemory added in v0.6.0

func (a *API) FreeOSMemory()

FreeOSMemory forces a garbage collection.

func (*API) GcStats added in v0.6.0

func (a *API) GcStats() *debug.GCStats

GcStats returns GC statistics.

func (*API) GoTrace added in v0.6.0

func (a *API) GoTrace(file string, nsec uint) error

GoTrace turns on tracing for nsec seconds and writes trace data to file.

func (*API) MemStats added in v0.6.0

func (a *API) MemStats() *runtime.MemStats

MemStats returns detailed runtime memory statistics.

func (*API) MutexProfile added in v0.6.0

func (a *API) MutexProfile(file string, nsec uint) error

MutexProfile turns on mutex profiling for nsec seconds and writes profile data to file. It uses a profile rate of 1 for most accurate information. If a different rate is desired, set the rate and write the profile manually.

func (*API) SetBlockProfileRate added in v0.6.0

func (a *API) SetBlockProfileRate(rate int)

SetBlockProfileRate sets the rate of goroutine block profile data collection. rate 0 disables block profiling.

func (*API) SetGCPercent added in v0.6.0

func (a *API) SetGCPercent(v int) int

SetGCPercent sets the garbage collection target percentage. It returns the previous setting. A negative value disables GC.

func (*API) SetMutexProfileFraction added in v0.6.0

func (a *API) SetMutexProfileFraction(rate int)

SetMutexProfileFraction sets the rate of mutex profiling.

func (*API) Stacks added in v0.6.0

func (a *API) Stacks() string

Stacks returns a printed representation of the stacks of all goroutines.

func (*API) StartCPUProfile added in v0.6.0

func (a *API) StartCPUProfile(file string) error

StartCPUProfile turns on CPU profiling, writing to the given file.

func (*API) StartGoTrace added in v0.6.0

func (a *API) StartGoTrace(file string) error

StartGoTrace turns on tracing, writing to the given file.

func (*API) StopCPUProfile added in v0.6.0

func (a *API) StopCPUProfile() error

StopCPUProfile stops an ongoing CPU profile.

func (*API) StopGoTrace added in v0.6.0

func (a *API) StopGoTrace() error

StopGoTrace stops an ongoing trace.

func (*API) TraceBlockByNumber added in v0.6.0

func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.TraceConfig) ([]*evmtypes.TxTraceResult, error)

TraceBlockByNumber returns the structured logs created during the execution of EVM and returns them as a JSON object.

func (*API) TraceTransaction added in v0.6.0

func (a *API) TraceTransaction(hash common.Hash, config *evmtypes.TraceConfig) (interface{}, error)

TraceTransaction returns the structured logs created during the execution of EVM and returns them as a JSON object.

func (*API) WriteBlockProfile added in v0.6.0

func (a *API) WriteBlockProfile(file string) error

WriteBlockProfile writes a goroutine blocking profile to the given file.

func (*API) WriteMemProfile added in v0.6.0

func (a *API) WriteMemProfile(file string) error

WriteMemProfile writes an allocation profile to the given file. Note that the profiling rate cannot be set through the API, it must be set on the command line.

func (*API) WriteMutexProfile added in v0.6.0

func (a *API) WriteMutexProfile(file string) error

WriteMutexProfile writes a goroutine blocking profile to the given file.

type HandlerT

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

HandlerT keeps track of the cpu profiler and trace execution

Jump to

Keyboard shortcuts

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