stats

package
v0.0.0-...-f1e43fe Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FilerGather        = prometheus.NewRegistry()
	VolumeServerGather = prometheus.NewRegistry()

	FilerRequestCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: "SeaweedFS",
			Subsystem: "filer",
			Name:      "request_total",
			Help:      "Counter of filer requests.",
		}, []string{"type"})

	FilerRequestHistogram = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Namespace: "SeaweedFS",
			Subsystem: "filer",
			Name:      "request_seconds",
			Help:      "Bucketed histogram of filer request processing time.",
			Buckets:   prometheus.ExponentialBuckets(0.0001, 2, 24),
		}, []string{"type"})

	FilerStoreCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: "SeaweedFS",
			Subsystem: "filerStore",
			Name:      "request_total",
			Help:      "Counter of filer store requests.",
		}, []string{"store", "type"})

	FilerStoreHistogram = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Namespace: "SeaweedFS",
			Subsystem: "filerStore",
			Name:      "request_seconds",
			Help:      "Bucketed histogram of filer store request processing time.",
			Buckets:   prometheus.ExponentialBuckets(0.0001, 2, 24),
		}, []string{"store", "type"})

	VolumeServerRequestCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: "SeaweedFS",
			Subsystem: "volumeServer",
			Name:      "request_total",
			Help:      "Counter of volume server requests.",
		}, []string{"type"})

	VolumeServerRequestHistogram = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Namespace: "SeaweedFS",
			Subsystem: "volumeServer",
			Name:      "request_seconds",
			Help:      "Bucketed histogram of volume server request processing time.",
			Buckets:   prometheus.ExponentialBuckets(0.0001, 2, 24),
		}, []string{"type"})

	VolumeServerVolumeCounter = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: "SeaweedFS",
			Subsystem: "volumeServer",
			Name:      "volumes",
			Help:      "Number of volumes or shards.",
		}, []string{"collection", "type"})

	VolumeServerMaxVolumeCounter = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Namespace: "SeaweedFS",
			Subsystem: "volumeServer",
			Name:      "max_volumes",
			Help:      "Maximum number of volumes.",
		})

	VolumeServerDiskSizeGauge = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: "SeaweedFS",
			Subsystem: "volumeServer",
			Name:      "total_disk_size",
			Help:      "Actual disk size used by volumes.",
		}, []string{"collection", "type"})
)

Functions

func AssignRequest

func AssignRequest()

func BytesIn

func BytesIn(val int64)

func BytesOut

func BytesOut(val int64)

func ConnectionClose

func ConnectionClose()

func ConnectionOpen

func ConnectionOpen()

func DeleteRequest

func DeleteRequest()

func LoopPushingMetric

func LoopPushingMetric(name, instance string, gatherer *prometheus.Registry, fnGetMetricsDest func() (addr string, intervalSeconds int))

func MemStat

func MemStat() *volume_server_pb.MemStatus

func NewDiskStatus

func NewDiskStatus(path string) (disk *volume_server_pb.DiskStatus)

func ReadRequest

func ReadRequest()

func RequestClose

func RequestClose()

func RequestOpen

func RequestOpen()

func SourceName

func SourceName(port int) string

func WriteRequest

func WriteRequest()

Types

type Channels

type Channels struct {
	Connections    chan *TimedValue
	Requests       chan *TimedValue
	AssignRequests chan *TimedValue
	ReadRequests   chan *TimedValue
	WriteRequests  chan *TimedValue
	DeleteRequests chan *TimedValue
	BytesIn        chan *TimedValue
	BytesOut       chan *TimedValue
}
var (
	Chan *Channels
)

type DurationCounter

type DurationCounter struct {
	MinuteCounter *RoundRobinCounter
	HourCounter   *RoundRobinCounter
	DayCounter    *RoundRobinCounter
	WeekCounter   *RoundRobinCounter
}

func NewDurationCounter

func NewDurationCounter() *DurationCounter

func (*DurationCounter) Add

func (sc *DurationCounter) Add(tv *TimedValue)

Add is for cumulative counts

type RoundRobinCounter

type RoundRobinCounter struct {
	LastIndex int
	Values    []int64
	Counts    []int64
}

func NewRoundRobinCounter

func NewRoundRobinCounter(slots int) *RoundRobinCounter

func (*RoundRobinCounter) Add

func (rrc *RoundRobinCounter) Add(index int, val int64)

func (*RoundRobinCounter) Count

func (rrc *RoundRobinCounter) Count() (cnt int64)

func (*RoundRobinCounter) Max

func (rrc *RoundRobinCounter) Max() (max int64)

func (*RoundRobinCounter) Sum

func (rrc *RoundRobinCounter) Sum() (sum int64)

func (*RoundRobinCounter) ToList

func (rrc *RoundRobinCounter) ToList() (ret []int64)

type ServerStats

type ServerStats struct {
	Requests       *DurationCounter
	Connections    *DurationCounter
	AssignRequests *DurationCounter
	ReadRequests   *DurationCounter
	WriteRequests  *DurationCounter
	DeleteRequests *DurationCounter
	BytesIn        *DurationCounter
	BytesOut       *DurationCounter
}

func NewServerStats

func NewServerStats() *ServerStats

func (*ServerStats) Start

func (ss *ServerStats) Start()

type TimedValue

type TimedValue struct {
	// contains filtered or unexported fields
}

func NewTimedValue

func NewTimedValue(t time.Time, val int64) *TimedValue

Jump to

Keyboard shortcuts

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