grafana

package
v0.0.0-...-7ece11e Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT, BSD-2-Clause-Views Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Measurement      = "Measurement"
	Tag              = "Tag"
	TagValue         = "TagValue"
	MeasurementValue = "MeasurementValue"
	Time             = "Time"
	GrafanaURL       = "http://128.199.96.206:8086/write?db=mydb"
)
View Source
const (
	TxPoolValidated                  = "TxPoolValidated"
	TxPoolValidationDetails          = "TxPoolValidationDetails"
	TxPoolValidatedWithType          = "TxPoolValidatedWithType"
	TxPoolEntered                    = "TxPoolEntered"
	TxPoolEnteredWithType            = "TxPoolEnteredWithType"
	TxPoolAddedAfterValidation       = "TxPoolAddedAfterValidation"
	TxPoolRemoveAfterInBlock         = "TxPoolRemoveAfterInBlock"
	TxPoolRemoveAfterInBlockWithType = "TxPoolRemoveAfterInBlockWithType"
	TxPoolRemoveAfterLifeTime        = "TxPoolRemoveAfterLifeTime"
	TxAddedIntoPoolType              = "TxAddedIntoPoolType"
	TxPoolPrivacyOrNot               = "TxPoolPrivacyOrNot"
	TxEnterNetSyncSuccess            = "TxEnterNetSyncSuccess"
	PoolSize                         = "PoolSize"
	TxInOneBlock                     = "TxInOneBlock"
	TxPoolDuplicateTxs               = "DuplicateTxs"
	NumOfBlockInsertToChain          = "NumOfBlockInsertToChain"
	NumOfRoundPerBlock               = "NumOfRoundPerBlock"
	TxPoolRemovedNumber              = "TxPoolRemovedNumber"
	TxPoolRemovedTime                = "TxPoolRemovedTime"
	TxPoolRemovedTimeDetails         = "TxPoolRemovedTimeDetails"
	TxPoolTxBeginEnter               = "TxPoolTxBeginEnter"
	ProcessDiscoverPeersTime         = "ProcessDiscoverPeersTime"
	AllConnectedPeers                = "AllConnectedPeers"
	BeaconBlock                      = "BeaconBlock"
	ShardBlock                       = "ShardBlock"
	CreateNewShardBlock              = "CreateNewShardBlock"
	HandleAllMessage                 = "HandleAllMessage"
	HandleAllMessageSize             = "HandleAllMessageSize"
	HandleMessagePeerState           = "HandleMessagePeerState"
	HandleMessageBFTMsg              = "HandleMessageBFTMsg"
	HandleMessagePeerStateTime       = "HandleMessagePeerStateTime"
	HandleMessageBFTMsgTime          = "HandleMessageBFTMsgTime"
	HandleMessageGetBlockBeacon      = "HandleMessageGetBlockBeacon"
	HandleMessageGetCrossShard       = "HandleMessageGetCrossShard"
	HandleMessageGetBlockShard       = "HandleMessageGetBlockShard"
	HandleMessageCrossShard          = "HandleMessageCrossShard"
	HandleMessageShardBlock          = "HandleMessageShardBlock"
	HandleMessageBeaconBlock         = "HandleMessageBeaconBlock"
	NumberOfGoRoutine                = "NumberOfGoRoutine"
)

Measurement

View Source
const (
	BlockHeightTag              = "blockheight"
	TxSizeTag                   = "txsize"
	TxSizeWithTypeTag           = "txsizewithtype"
	PoolSizeMetric              = "poolsize"
	TxTypeTag                   = "txtype"
	ValidateConditionTag        = "validatecond"
	TxPrivacyOrNotTag           = "txprivacyornot"
	ShardIDTag                  = "shardid"
	NodeIDTag                   = "node"
	TxHashTag                   = "txhash"
	FuncTag                     = "func"
	ExternalAddressTag          = "externaladdresstag"
	NewShardBlockProcessingStep = "newshardblockprocessingstep"
)

tag

View Source
const (
	Beacon                                          = "beacon"
	Shard                                           = "shard"
	TxPrivacy                                       = "privacy"
	TxNormalPrivacy                                 = "normaltxprivacy"
	TxNoPrivacy                                     = "noprivacy"
	TxNormalNoPrivacy                               = "normaltxnoprivacy"
	Condition1                                      = "condition1"
	Condition2                                      = "condition2"
	Condition3                                      = "condition3"
	Condition4                                      = "condition4"
	Condition41                                     = "condition42"
	Condition42                                     = "condition42"
	Condition5                                      = "condition5"
	Condition6                                      = "condition6"
	Condition7                                      = "condition7"
	Condition8                                      = "condition8"
	Condition9                                      = "condition9"
	Condition10                                     = "condition10"
	Condition11                                     = "condition11"
	VTBITxTypeMetic                                 = "vtbitxtype"
	ReplaceTxMetic                                  = "replacetx"
	CloneShardBestStateStep                         = "cloneshardbeststatestep"
	FetchBeaconBlockStep                            = "fetchbeaconblockstep"
	GetCrossShardDataStep                           = "getcrossshardatastep"
	CreateNormalTokenTxFromCrossShardStep           = "createnormaltokentxfromcrossshardstep"
	GetTransactionForNewBlockStep                   = "gettransactionfornewblockstep"
	BuildResponseTransactionFromTxsWithMetadataStep = "buildresponsetransactionfromtxswithmetdatastep"
	ProcessInstructionFromBeaconStep                = "processinstructionfrombeaconstep"
	GenerateInstructionStep                         = "generateinstructionstep"
	BuildShardBlockHeaderEssentialStep              = "buildshardblockheaderessentialstep"
	UpdateShardBestStateStep                        = "updateshardbeststatestep"
	BuildHeaderRootHashStep                         = "buildheaderroothashstep"
	FullProcessingStep                              = "fullprocesscingstep"
)

Tag value

View Source
const (
	UnexpectedError = iota
)

Variables

View Source
var ErrCodeMessage = map[int]struct {
	Code    int
	Message string
}{
	UnexpectedError: {-1000, "Unexpected Error"},
}

Functions

func AnalyzeTimeSeriesMetricData

func AnalyzeTimeSeriesMetricData(params map[string]interface{})

func AnalyzeTimeSeriesMetricDataWithTime

func AnalyzeTimeSeriesMetricDataWithTime(params map[string]interface{})

func InitMetricTool

func InitMetricTool(tool MetricTool)

func StartSystemMetrics

func StartSystemMetrics()

Types

type Grafana

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

func NewGrafana

func NewGrafana(url, externalAddress string) Grafana

func (*Grafana) GetExternalAddress

func (grafana *Grafana) GetExternalAddress() string

func (*Grafana) SendTimeSeriesMetricData

func (grafana *Grafana) SendTimeSeriesMetricData(params map[string]interface{})

Influxdb write query <measurement>[,<tag-key>=<tag-value>...] <field-key>=<field-value>[,<field2-key>=<field2-value>...] [unix-nano-timestamp]

func (*Grafana) SendTimeSeriesMetricDataWithTime

func (grafana *Grafana) SendTimeSeriesMetricDataWithTime(params map[string]interface{})

type MetricError

type MetricError struct {
	Code    int    // The code to send with reject messages
	Message string // Human readable message of the issue
	Err     error
}

func NewMetricError

func NewMetricError(key int, err error) *MetricError

func (MetricError) Error

func (e MetricError) Error() string

Error satisfies the error interface and prints human-readable errors.

func (*MetricError) Init

func (e *MetricError) Init(key int, err error)

txRuleError creates an underlying MempoolTxError with the given a set of arguments and returns a RuleError that encapsulates it.

type MetricTool

type MetricTool interface {
	SendTimeSeriesMetricData(params map[string]interface{})
	SendTimeSeriesMetricDataWithTime(params map[string]interface{})
	GetExternalAddress() string
}

Jump to

Keyboard shortcuts

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