Documentation
¶
Index ¶
- Constants
- Variables
- func EnableAnalyzer(flag bool)
- func InitializePprofDumper(logger log.Logger, dumpPath string, coolDownStr string, abciElapsed int64)
- func OnAppBeginBlockEnter(height int64)
- func OnAppDeliverTxEnter()
- func OnCommitDone()
- func SetDynamicConfig(c IDynamicConfig)
- func SetInfoObject(e IElapsedTimeInfos)
- func StartTxLog(oper string)
- func StopTxLog(oper string)
- type Analyzer
- type DbRecord
- type EmptyTimeInfo
- type IDynamicConfig
- type IElapsedTimeInfos
- type MockDynamicConfig
- type Summary
- type Tracer
- func (t *Tracer) EnableSummary()
- func (t *Tracer) Format() string
- func (t *Tracer) FormatRepeatingPins(ignoredTags string) string
- func (t *Tracer) GetElapsedTime() int64
- func (t *Tracer) Pin(format string, args ...interface{})
- func (t *Tracer) RepeatingPin(format string, args ...interface{})
- func (t *Tracer) Reset()
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 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)
Types ¶
type DbRecord ¶
type DbRecord struct {
// contains filtered or unexported fields
}
func (*DbRecord) AddOperType ¶
func (*DbRecord) GetOperType ¶
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
type Tracer ¶
type Tracer struct {
// contains filtered or unexported fields
}
func (*Tracer) EnableSummary ¶ added in v1.5.2
func (t *Tracer) EnableSummary()
func (*Tracer) FormatRepeatingPins ¶
func (*Tracer) GetElapsedTime ¶
func (*Tracer) RepeatingPin ¶
Click to show internal directories.
Click to hide internal directories.