trace

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//----- DeliverTx
	DeliverTx = "DeliverTx"
	TxDecoder = "TxDecoder"

	//----- RunTx details
	ValTxMsgs  = "valTxMsgs"
	RunAnte    = "RunAnte"
	RunMsg     = "RunMsg"
	Refund     = "refund"
	EvmHandler = "EvmHandler"

	//------ RunAnte details
	CacheTxContext  = "cacheTxContext"
	AnteChain       = "AnteChain"
	AnteOther       = "AnteOther"
	CacheStoreWrite = "cacheStoreWrite"

	//----- handler details
	ParseChainID = "ParseChainID"
	VerifySig    = "VerifySig"
	Txhash       = "txhash"
	SaveTx       = "SaveTx"
	TransitionDb = "TransitionDb"
	Bloomfilter  = "Bloomfilter"
	EmitEvents   = "EmitEvents"
	HandlerDefer = "handler_defer"
)
View Source
const (
	GasUsed     = "GasUsed"
	Produce     = "Produce"
	RunTx       = "RunTx"
	Height      = "Height"
	Tx          = "Tx"
	BlockSize   = "BlockSize"
	Elapsed     = "Elapsed"
	CommitRound = "CommitRound"
	Round       = "Round"
	BlockParts  = "BlockParts"
	Evm         = "Evm"
	Iavl        = "Iavl"
	FlatKV      = "FlatKV"
	//RecvBlock        = "RecvBlock"
	First2LastPart = "First2LastPart"

	SigCacheRatio    = "SigCacheRatio"
	DeliverTxs       = "DeliverTxs"
	EvmHandlerDetail = "EvmHandlerDetail"
	RunAnteDetail    = "RunAnteDetail"
	AnteChainDetail  = "AnteChainDetail"

	Delta      = "Delta"
	InvalidTxs = "InvalidTxs"

	Abci            = "abci"
	SaveResp        = "saveResp"
	Persist         = "persist"
	MempoolUpdate   = "mpUpdate"
	SaveState       = "saveState"
	ApplyBlock      = "ApplyBlock"
	Consensus       = "Consensus"
	LastBlockTime   = "LastBlockTime"
	TimeoutInterval = "TimeoutInterval"

	MempoolCheckTxCnt = "CheckTx"
	MempoolTxsCnt     = "MempoolTxs"

	CompressBlock   = "Compress"
	UncompressBlock = "Uncompress"
	Prerun          = "Prerun"
	IavlRuntime     = "IavlRuntime"

	BlockPartsP2P = "BlockPartsP2P"
)
View Source
const (
	READ         = 1
	WRITE        = 2
	EVMALL       = 3
	UNKNOWN_TYPE = 4
	EVM_FORMAT   = "read<%dms>, write<%dms>, execute<%dms>"
	EVMCORE      = "evmcore"
)
View Source
const FlagEnableAnalyzer string = "enable-analyzer"

Variables

View Source
var (
	STATEDB_WRITE = []string{"AddBalance", "SubBalance", "SetNonce", "SetState", "SetCode", "AddLog",
		"AddPreimage", "AddRefund", "SubRefund", "AddAddressToAccessList", "AddSlotToAccessList",
		"PrepareAccessList", "AddressInAccessList", "Suicide", "CreateAccount", "ForEachStorage"}

	STATEDB_READ = []string{"SlotInAccessList", "GetBalance", "GetNonce", "GetCode", "GetCodeSize",
		"GetCodeHash", "GetState", "GetCommittedState", "GetRefund",
		"HasSuicided", "Snapshot", "RevertToSnapshot", "Empty", "Exist"}

	EVM_OPER = []string{EVMCORE}
)

Functions

func EnableAnalyzer

func EnableAnalyzer(flag bool)

func InitializePprofDumper

func InitializePprofDumper(logger log.Logger, dumpPath string, coolDownStr string, abciElapsed int64)

func OnAppBeginBlockEnter

func OnAppBeginBlockEnter(height int64)

func OnAppDeliverTxEnter

func OnAppDeliverTxEnter()

func OnCommitDone

func OnCommitDone()

func SetDynamicConfig

func SetDynamicConfig(c IDynamicConfig)

func SetInfoObject

func SetInfoObject(e IElapsedTimeInfos)

func StartTxLog

func StartTxLog(oper string)

func StopTxLog

func StopTxLog(oper string)

Types

type Analyzer

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

type DbRecord

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

func (*DbRecord) AddOperType

func (s *DbRecord) AddOperType(oper string, value int)

func (*DbRecord) GetOperType

func (s *DbRecord) GetOperType(oper string) int

type EmptyTimeInfo

type EmptyTimeInfo struct {
}

func (*EmptyTimeInfo) AddInfo

func (e *EmptyTimeInfo) AddInfo(key string, info string)

func (*EmptyTimeInfo) Dump

func (e *EmptyTimeInfo) Dump(logger interface{})

func (*EmptyTimeInfo) GetElapsedTime

func (e *EmptyTimeInfo) GetElapsedTime() int64

func (*EmptyTimeInfo) SetElapsedTime

func (e *EmptyTimeInfo) SetElapsedTime(elapsedTime int64)

type IDynamicConfig

type IDynamicConfig interface {
	GetEnableAnalyzer() bool
}

type IElapsedTimeInfos

type IElapsedTimeInfos interface {
	AddInfo(key string, info string)
	Dump(logger interface{})
	SetElapsedTime(elapsedTime int64)
	GetElapsedTime() int64
}

func GetElapsedInfo

func GetElapsedInfo() IElapsedTimeInfos

type MockDynamicConfig

type MockDynamicConfig struct {
}

func (MockDynamicConfig) GetEnableAnalyzer

func (c MockDynamicConfig) GetEnableAnalyzer() bool

type Summary

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

func GetTraceSummary

func GetTraceSummary() *Summary

func (*Summary) Dump

func (s *Summary) Dump(context string)

func (*Summary) Init

func (s *Summary) Init(keys ...string)

type Tracer

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

func NewTracer

func NewTracer(name string) *Tracer

func (*Tracer) EnableSummary added in v1.5.2

func (t *Tracer) EnableSummary()

func (*Tracer) Format

func (t *Tracer) Format() string

func (*Tracer) FormatRepeatingPins

func (t *Tracer) FormatRepeatingPins(ignoredTags string) string

func (*Tracer) GetElapsedTime

func (t *Tracer) GetElapsedTime() int64

func (*Tracer) Pin

func (t *Tracer) Pin(format string, args ...interface{})

func (*Tracer) RepeatingPin

func (t *Tracer) RepeatingPin(format string, args ...interface{})

func (*Tracer) Reset

func (t *Tracer) Reset()

Jump to

Keyboard shortcuts

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