metrics

package
v0.27.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppMetrics

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

func NewAppMetrics

func NewAppMetrics(logger *zap.Logger, poolStatistics *frostfs.PoolStatistic, enabled bool) *AppMetrics

func (*AppMetrics) Handler

func (m *AppMetrics) Handler() http.Handler

func (*AppMetrics) SetEnabled

func (m *AppMetrics) SetEnabled(enabled bool)

func (*AppMetrics) SetHealth

func (m *AppMetrics) SetHealth(status HealthStatus)

func (*AppMetrics) Shutdown

func (m *AppMetrics) Shutdown()

func (*AppMetrics) Update

func (m *AppMetrics) Update(user, bucket, cnrID string, reqType api.RequestType, in, out uint64)

type GateMetrics

type GateMetrics struct {
	State   stateMetrics
	Pool    poolMetricsCollector
	Billing *billingMetrics
}

func NewGateMetrics

func NewGateMetrics(scraper StatisticScraper) *GateMetrics

func (*GateMetrics) Handler

func (g *GateMetrics) Handler() http.Handler

func (*GateMetrics) Unregister

func (g *GateMetrics) Unregister()

type HealthStatus

type HealthStatus int32

HealthStatus of the gate application.

const (
	HealthStatusUndefined    HealthStatus = 0
	HealthStatusStarting     HealthStatus = 1
	HealthStatusReady        HealthStatus = 2
	HealthStatusShuttingDown HealthStatus = 3
)

type OperationList

type OperationList [6]int

type StatisticScraper

type StatisticScraper interface {
	Statistic() pool.Statistic
}

type TrafficType

type TrafficType int
const (
	UnknownTraffic TrafficType = iota
	INTraffic      TrafficType = iota
	OUTTraffic     TrafficType = iota
)

func (TrafficType) String

func (t TrafficType) String() string

type UserBucketInfo

type UserBucketInfo struct {
	User        string
	Bucket      string
	ContainerID string
}

type UserMetrics

type UserMetrics struct {
	Requests []UserMetricsInfo
	Traffic  []UserTrafficMetricsInfo
}

type UserMetricsInfo

type UserMetricsInfo struct {
	UserBucketInfo
	Operation api.RequestType
	Requests  int
}

type UserTrafficMetricsInfo

type UserTrafficMetricsInfo struct {
	UserBucketInfo
	Type  TrafficType
	Value uint64
}

type UsersAPIStats

type UsersAPIStats struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*UsersAPIStats) DumpMetrics

func (u *UsersAPIStats) DumpMetrics() UserMetrics

func (*UsersAPIStats) Update

func (u *UsersAPIStats) Update(user, bucket, cnrID string, reqType api.RequestType, in, out uint64)

Jump to

Keyboard shortcuts

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