kronosstats

package
v0.0.0-...-a355c63 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 0 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter interface {
	Inc(int64)
}

type Gauge

type Gauge interface {
	Value() int64
	Update(int64)
}

type Histogram

type Histogram interface {
	RecordValue(int64)
}

type KronosMetrics

type KronosMetrics struct {
	// Delta is the offset between local time with kronos time.
	Delta Gauge
	// UptimeDelta is the offset between local time with kronos uptime.
	UptimeDelta Gauge
	// IsOracle is 1 if the current server is the oracle, otherwise 0.
	IsOracle Gauge
	// OverthrowAttemptCount is the number of oracle overthrow attempts.
	OverthrowAttemptCount Counter
	// RTT is the histogram of RTT of oracle time queries.
	RTT Histogram
	// SyncSuccessCount is the number of successful time syncs with the oracle.
	SyncSuccessCount Counter
	// SyncFailureCount is the number of failed time syncs with the oracle.
	SyncFailureCount Counter
	// TimeCap is an upper bound to kronos time.
	TimeCap Gauge
	// TimeCap is an upper bound to kronos uptime.
	UptimeCap Gauge
}

KronosMetrics is used to record metrics of Kronos

func NewTestMetrics

func NewTestMetrics() *KronosMetrics

Jump to

Keyboard shortcuts

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