Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MetaKronosDelta = metric.Metadata{ Name: "kronos.delta", Help: "Offset between local time and kronos time"} MetaKronosUptimeDelta = metric.Metadata{ Name: "kronos.uptimedelta", Help: "Offset between local uptime and kronos uptime"} MetaKronosIsOracle = metric.Metadata{ Name: "kronos.oracle", Help: "1 if the current node is the oracle, 0 otherwise"} MetaKronosOverthrowCounter = metric.Metadata{ Name: "kronos.overthrow.count", Help: "Number of oracle overthrow attempts"} MetaKronosRTT = metric.Metadata{ Name: "kronos.rtt", Help: "RTT of Kronos RPCs"} MetaKronosSyncSuccess = metric.Metadata{ Name: "kronos.sync.success.count", Help: "Number of successful syncs with the oracle"} MetaKronosSyncFailure = metric.Metadata{ Name: "kronos.sync.failure.count", Help: "Number of failed syncs with the oracle"} MetaKronosTimeCap = metric.Metadata{ Name: "kronos.timecap", Help: "Time cap of Kronos"} MetaKronosUptimeCap = metric.Metadata{ Name: "kronos.uptimecap", Help: "Time cap of Kronos Uptime"} )
Fully-qualified names for metrics.
Functions ¶
This section is empty.
Types ¶
type KronosMetrics ¶
type KronosMetrics struct { // Delta is the offset between local time with kronos time. Delta *metric.Gauge // UptimeDelta is the offset between local time with kronos uptime. UptimeDelta *metric.Gauge // IsOracle is 1 if the current server is the oracle, otherwise 0. IsOracle *metric.Gauge // OverthrowAttemptCount is the number of oracle overthrow attempts. OverthrowAttemptCount *metric.Counter // RTT is the histogram of RTT of oracle time queries. RTT *metric.Histogram // SyncSuccessCount is the number of successful time syncs with the oracle. SyncSuccessCount *metric.Counter // SyncFailureCount is the number of failed time syncs with the oracle. SyncFailureCount *metric.Counter // TimeCap is an upper bound to kronos time. TimeCap *metric.Gauge // TimeCap is an upper bound to kronos uptime. UptimeCap *metric.Gauge }
KronosMetrics is used to record metrics of Kronos
func NewMetrics ¶
func NewMetrics() *KronosMetrics
NewMetrics returns KronosMetrics which can be used to record metrics
Click to show internal directories.
Click to hide internal directories.