Documentation ¶
Index ¶
- func GetAll() map[string]map[string]interface{}
- func Unregister(nameFormat string, nameArgs ...interface{})
- func UpdateCfxRpcLogFilter(method string, cfx sdk.ClientOperator, filter *types.LogFilter)
- func UpdateEthRpcLogFilter(method string, eth *client.RpcEthClient, filter *w3types.FilterQuery)
- type InputBlockMetric
- type InputEpochMetric
- type Metrics
- type NodeManagerMetrics
- type PubSubMetrics
- type RpcMetrics
- func (*RpcMetrics) BatchLatency() metrics.Histogram
- func (*RpcMetrics) BatchSize() metrics.Histogram
- func (*RpcMetrics) FullnodeErrorRate(node ...string) metricUtil.Percentage
- func (*RpcMetrics) FullnodeNonRpcErrorRate(node ...string) metricUtil.Percentage
- func (*RpcMetrics) FullnodeQps(node, space, method string, err error) metrics.Timer
- func (*RpcMetrics) InputBlock(method, block string) metricUtil.Percentage
- func (*RpcMetrics) InputBlockGap(method string) metrics.Histogram
- func (*RpcMetrics) InputBlockHash(method string) metricUtil.Percentage
- func (*RpcMetrics) InputEpoch(method, epoch string) metricUtil.Percentage
- func (*RpcMetrics) InputEpochGap(method string) metrics.Histogram
- func (*RpcMetrics) Percentage(method, name string) metricUtil.Percentage
- func (*RpcMetrics) StoreHit(method, storeName string) metricUtil.Percentage
- func (*RpcMetrics) UpdateDuration(method string, err error, start time.Time)
- type StoreMetrics
- type SyncMetrics
- func (*SyncMetrics) QueryEpochData(space string) metricUtil.TimerUpdater
- func (*SyncMetrics) QueryEpochDataAvailability(space string) metricUtil.Percentage
- func (*SyncMetrics) SyncOnceQps(space, storeName string, err error) metrics.Timer
- func (*SyncMetrics) SyncOnceSize(space, storeName string) metrics.Histogram
- type TrafficCollector
- type VirtualFilterMetrics
- func (*VirtualFilterMetrics) PersistFilterChanges(space, node, store string) metricUtil.TimerUpdater
- func (*VirtualFilterMetrics) PollOnceQps(space, node string, err error) metrics.Timer
- func (*VirtualFilterMetrics) PollOnceSize(space, node string) metrics.Histogram
- func (*VirtualFilterMetrics) QueryFilterChanges(space, node, store string) metricUtil.TimerUpdater
- func (*VirtualFilterMetrics) Sessions(space string, filterType, node string) metrics.Gauge
- func (*VirtualFilterMetrics) StoreQueryPercentage(space string, node, store string) metricUtil.Percentage
- type Visitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Unregister ¶
func Unregister(nameFormat string, nameArgs ...interface{})
func UpdateCfxRpcLogFilter ¶
func UpdateCfxRpcLogFilter(method string, cfx sdk.ClientOperator, filter *types.LogFilter)
func UpdateEthRpcLogFilter ¶
func UpdateEthRpcLogFilter(method string, eth *client.RpcEthClient, filter *w3types.FilterQuery)
Types ¶
type InputBlockMetric ¶
type InputBlockMetric struct{}
InputBlockMetric is used to add metrics for input block parameter.
func (*InputBlockMetric) Update1 ¶
func (metric *InputBlockMetric) Update1(blockNum *types.BlockNumber, method string, eth *client.RpcEthClient)
func (*InputBlockMetric) Update2 ¶
func (metric *InputBlockMetric) Update2(blockNumOrHash *types.BlockNumberOrHash, method string, eth *client.RpcEthClient)
type InputEpochMetric ¶
type InputEpochMetric struct{}
InputEpochMetric is used to add metrics for input epoch parameter.
func (*InputEpochMetric) Update ¶
func (metric *InputEpochMetric) Update(epoch *types.Epoch, method string, cfx sdk.ClientOperator)
Update marks the percentage for different epochs. If epoch number specified, add statistic for epoch gap against latest mined.
func (*InputEpochMetric) Update2 ¶
func (metric *InputEpochMetric) Update2(ebh *types.EpochOrBlockHash, method string, cfx sdk.ClientOperator)
type Metrics ¶
type Metrics struct { RPC RpcMetrics PubSub PubSubMetrics Sync SyncMetrics Store StoreMetrics Nodes NodeManagerMetrics VirtualFilter VirtualFilterMetrics }
var Registry Metrics
type NodeManagerMetrics ¶
type NodeManagerMetrics struct{}
Node manager metrics
func (*NodeManagerMetrics) NodeAvailability ¶
func (*NodeManagerMetrics) NodeAvailability(space, group, node string) string
func (*NodeManagerMetrics) NodeLatency ¶
func (*NodeManagerMetrics) NodeLatency(space, group, node string) string
type PubSubMetrics ¶
type PubSubMetrics struct{}
PubSub metrics
func (*PubSubMetrics) InputLogFilter ¶
func (*PubSubMetrics) InputLogFilter(space string) metricUtil.Percentage
type RpcMetrics ¶
type RpcMetrics struct{}
RPC metrics
func (*RpcMetrics) BatchLatency ¶
func (*RpcMetrics) BatchLatency() metrics.Histogram
func (*RpcMetrics) BatchSize ¶
func (*RpcMetrics) BatchSize() metrics.Histogram
func (*RpcMetrics) FullnodeErrorRate ¶
func (*RpcMetrics) FullnodeErrorRate(node ...string) metricUtil.Percentage
func (*RpcMetrics) FullnodeNonRpcErrorRate ¶
func (*RpcMetrics) FullnodeNonRpcErrorRate(node ...string) metricUtil.Percentage
func (*RpcMetrics) FullnodeQps ¶
func (*RpcMetrics) FullnodeQps(node, space, method string, err error) metrics.Timer
func (*RpcMetrics) InputBlock ¶
func (*RpcMetrics) InputBlock(method, block string) metricUtil.Percentage
func (*RpcMetrics) InputBlockGap ¶
func (*RpcMetrics) InputBlockGap(method string) metrics.Histogram
func (*RpcMetrics) InputBlockHash ¶
func (*RpcMetrics) InputBlockHash(method string) metricUtil.Percentage
func (*RpcMetrics) InputEpoch ¶
func (*RpcMetrics) InputEpoch(method, epoch string) metricUtil.Percentage
func (*RpcMetrics) InputEpochGap ¶
func (*RpcMetrics) InputEpochGap(method string) metrics.Histogram
func (*RpcMetrics) Percentage ¶
func (*RpcMetrics) Percentage(method, name string) metricUtil.Percentage
func (*RpcMetrics) StoreHit ¶
func (*RpcMetrics) StoreHit(method, storeName string) metricUtil.Percentage
func (*RpcMetrics) UpdateDuration ¶
func (*RpcMetrics) UpdateDuration(method string, err error, start time.Time)
type StoreMetrics ¶
type StoreMetrics struct{}
Store metrics
func (*StoreMetrics) GetLogs ¶
func (*StoreMetrics) GetLogs() metricUtil.TimerUpdater
func (*StoreMetrics) Pop ¶
func (*StoreMetrics) Pop(storeName string) metricUtil.TimerUpdater
func (*StoreMetrics) Push ¶
func (*StoreMetrics) Push(storeName string) metricUtil.TimerUpdater
type SyncMetrics ¶
type SyncMetrics struct{}
Sync service metrics
func (*SyncMetrics) QueryEpochData ¶
func (*SyncMetrics) QueryEpochData(space string) metricUtil.TimerUpdater
func (*SyncMetrics) QueryEpochDataAvailability ¶
func (*SyncMetrics) QueryEpochDataAvailability(space string) metricUtil.Percentage
func (*SyncMetrics) SyncOnceQps ¶
func (*SyncMetrics) SyncOnceQps(space, storeName string, err error) metrics.Timer
func (*SyncMetrics) SyncOnceSize ¶
func (*SyncMetrics) SyncOnceSize(space, storeName string) metrics.Histogram
type TrafficCollector ¶
TrafficCollector collects traffic hits and calculate topK stats.
func DefaultTrafficCollector ¶
func DefaultTrafficCollector() TrafficCollector
type VirtualFilterMetrics ¶
type VirtualFilterMetrics struct{}
Virtual filter metrics
func (*VirtualFilterMetrics) PersistFilterChanges ¶
func (*VirtualFilterMetrics) PersistFilterChanges(space, node, store string) metricUtil.TimerUpdater
func (*VirtualFilterMetrics) PollOnceQps ¶
func (*VirtualFilterMetrics) PollOnceQps(space, node string, err error) metrics.Timer
func (*VirtualFilterMetrics) PollOnceSize ¶
func (*VirtualFilterMetrics) PollOnceSize(space, node string) metrics.Histogram
func (*VirtualFilterMetrics) QueryFilterChanges ¶
func (*VirtualFilterMetrics) QueryFilterChanges(space, node, store string) metricUtil.TimerUpdater
func (*VirtualFilterMetrics) Sessions ¶
func (*VirtualFilterMetrics) Sessions(space string, filterType, node string) metrics.Gauge
func (*VirtualFilterMetrics) StoreQueryPercentage ¶
func (*VirtualFilterMetrics) StoreQueryPercentage(space string, node, store string) metricUtil.Percentage
Click to show internal directories.
Click to hide internal directories.