package v2stats
import "go.etcd.io/etcd/server/v3/etcdserver/api/v2stats"
Index ¶
- type CountsStats
- type FollowerStats
- type LatencyStats
- type LeaderStats
- func NewLeaderStats(lg *zap.Logger, id string) *LeaderStats
- func (ls *LeaderStats) Follower(name string) *FollowerStats
- func (ls *LeaderStats) JSON() []byte
- type RequestStats
- type ServerStats
Types ¶
type CountsStats ¶
CountsStats encapsulates raft statistics.
type FollowerStats ¶
type FollowerStats struct {
Latency LatencyStats `json:"latency"`
Counts CountsStats `json:"counts"`
sync.Mutex
}
FollowerStats encapsulates various statistics about a follower in an etcd cluster
func (*FollowerStats) Fail ¶
func (fs *FollowerStats) Fail()
Fail updates the FollowerStats with an unsuccessful send
func (*FollowerStats) Succ ¶
func (fs *FollowerStats) Succ(d time.Duration)
Succ updates the FollowerStats with a successful send
type LatencyStats ¶
type LatencyStats struct {
Current float64 `json:"current"`
Average float64 `json:"average"`
StandardDeviation float64 `json:"standardDeviation"`
Minimum float64 `json:"minimum"`
Maximum float64 `json:"maximum"`
// contains filtered or unexported fields
}
LatencyStats encapsulates latency statistics.
type LeaderStats ¶
LeaderStats is used by the leader in an etcd cluster, and encapsulates statistics about communication with its followers
func NewLeaderStats ¶
func NewLeaderStats(lg *zap.Logger, id string) *LeaderStats
NewLeaderStats generates a new LeaderStats with the given id as leader
func (*LeaderStats) Follower ¶
func (ls *LeaderStats) Follower(name string) *FollowerStats
func (*LeaderStats) JSON ¶
func (ls *LeaderStats) JSON() []byte
type RequestStats ¶
RequestStats represent the stats for a request. It encapsulates the sending time and the size of the request.
type ServerStats ¶
ServerStats encapsulates various statistics about an EtcdServer and its communication with other members of the cluster
func NewServerStats ¶
func NewServerStats(name, id string) *ServerStats
func (*ServerStats) BecomeLeader ¶
func (ss *ServerStats) BecomeLeader()
func (*ServerStats) JSON ¶
func (ss *ServerStats) JSON() []byte
func (*ServerStats) RecvAppendReq ¶
func (ss *ServerStats) RecvAppendReq(leader string, reqSize int)
RecvAppendReq updates the ServerStats in response to an AppendRequest from the given leader being received
func (*ServerStats) SendAppendReq ¶
func (ss *ServerStats) SendAppendReq(reqSize int)
SendAppendReq updates the ServerStats in response to an AppendRequest being sent by this server
Source Files ¶
leader.go queue.go server.go
- Version
- v3.6.10 (latest)
- Published
- Apr 1, 2026
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 2 weeks ago –
Tools for package owners.