etcd: go.etcd.io/etcd/etcdserver/api/v2stats Index | Files

package v2stats

import "go.etcd.io/etcd/etcdserver/api/v2stats"

Package v2stats defines a standard interface for etcd cluster statistics.

Index

Package Files

leader.go queue.go server.go stats.go

type CountsStats Uses

type CountsStats struct {
    Fail    uint64 `json:"fail"`
    Success uint64 `json:"success"`
}

CountsStats encapsulates raft statistics.

type FollowerStats Uses

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 Uses

func (fs *FollowerStats) Fail()

Fail updates the FollowerStats with an unsuccessful send

func (*FollowerStats) Succ Uses

func (fs *FollowerStats) Succ(d time.Duration)

Succ updates the FollowerStats with a successful send

type LatencyStats Uses

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 Uses

type LeaderStats struct {
    sync.Mutex
    // contains filtered or unexported fields
}

LeaderStats is used by the leader in an etcd cluster, and encapsulates statistics about communication with its followers

func NewLeaderStats Uses

func NewLeaderStats(id string) *LeaderStats

NewLeaderStats generates a new LeaderStats with the given id as leader

func (*LeaderStats) Follower Uses

func (ls *LeaderStats) Follower(name string) *FollowerStats

func (*LeaderStats) JSON Uses

func (ls *LeaderStats) JSON() []byte

type RequestStats Uses

type RequestStats struct {
    SendingTime time.Time
    Size        int
}

RequestStats represent the stats for a request. It encapsulates the sending time and the size of the request.

type ServerStats Uses

type ServerStats struct {
    sync.Mutex
    // contains filtered or unexported fields
}

ServerStats encapsulates various statistics about an EtcdServer and its communication with other members of the cluster

func NewServerStats Uses

func NewServerStats(name, id string) *ServerStats

func (*ServerStats) BecomeLeader Uses

func (ss *ServerStats) BecomeLeader()

func (*ServerStats) JSON Uses

func (ss *ServerStats) JSON() []byte

func (*ServerStats) RecvAppendReq Uses

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 Uses

func (ss *ServerStats) SendAppendReq(reqSize int)

SendAppendReq updates the ServerStats in response to an AppendRequest being sent by this server

type Stats Uses

type Stats interface {
    // SelfStats returns the struct representing statistics of this server
    SelfStats() []byte
    // LeaderStats returns the statistics of all followers in the cluster
    // if this server is leader. Otherwise, nil is returned.
    LeaderStats() []byte
    // StoreStats returns statistics of the store backing this EtcdServer
    StoreStats() []byte
}

Package v2stats imports 7 packages (graph) and is imported by 34 packages. Updated 2018-08-29. Refresh now. Tools for package owners.