stat

package
v1.0.0-M2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: Apache-2.0 Imports: 7 Imported by: 8

Documentation

Index

Constants

View Source
const (
	PrepareSlotName = "sentinel-core-stat-resource-node-prepare-slot"
)
View Source
const (
	StatSlotName = "sentinel-core-stat-slot"
)

Variables

View Source
var (
	DefaultResourceNodePrepareSlot = &ResourceNodePrepareSlot{}
)
View Source
var (
	DefaultSlot = &Slot{}
)

Functions

func ResetResourceNodeMap

func ResetResourceNodeMap()

Types

type BaseStatNode

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

func NewBaseStatNode

func NewBaseStatNode(sampleCount uint32, intervalInMs uint32) *BaseStatNode

func (*BaseStatNode) AddCount added in v1.0.0

func (n *BaseStatNode) AddCount(event base.MetricEvent, count int64)

func (*BaseStatNode) AvgRT

func (n *BaseStatNode) AvgRT() float64

func (*BaseStatNode) CurrentConcurrency added in v1.0.0

func (n *BaseStatNode) CurrentConcurrency() int32

func (*BaseStatNode) DecreaseConcurrency added in v1.0.0

func (n *BaseStatNode) DecreaseConcurrency()

func (*BaseStatNode) DefaultMetric added in v1.0.0

func (n *BaseStatNode) DefaultMetric() base.ReadStat

func (*BaseStatNode) GenerateReadStat added in v1.0.0

func (n *BaseStatNode) GenerateReadStat(sampleCount uint32, intervalInMs uint32) (base.ReadStat, error)

func (*BaseStatNode) GetMaxAvg

func (n *BaseStatNode) GetMaxAvg(event base.MetricEvent) float64

func (*BaseStatNode) GetPreviousQPS added in v0.6.0

func (n *BaseStatNode) GetPreviousQPS(event base.MetricEvent) float64

func (*BaseStatNode) GetQPS

func (n *BaseStatNode) GetQPS(event base.MetricEvent) float64

func (*BaseStatNode) GetSum

func (n *BaseStatNode) GetSum(event base.MetricEvent) int64

func (*BaseStatNode) IncreaseConcurrency added in v1.0.0

func (n *BaseStatNode) IncreaseConcurrency()

func (*BaseStatNode) MetricsOnCondition

func (n *BaseStatNode) MetricsOnCondition(predicate base.TimePredicate) []*base.MetricItem

func (*BaseStatNode) MinRT

func (n *BaseStatNode) MinRT() float64

type ResourceNode

type ResourceNode struct {
	BaseStatNode
	// contains filtered or unexported fields
}

func GetOrCreateResourceNode

func GetOrCreateResourceNode(resource string, resourceType base.ResourceType) *ResourceNode

func GetResourceNode

func GetResourceNode(resource string) *ResourceNode

func InboundNode

func InboundNode() *ResourceNode

InboundNode returns the global inbound statistic node.

func NewResourceNode

func NewResourceNode(resourceName string, resourceType base.ResourceType) *ResourceNode

NewResourceNode creates a new resource node with given name and classification.

func ResourceNodeList

func ResourceNodeList() []*ResourceNode

ResourceNodeList returns the slice of all existing resource nodes.

func (*ResourceNode) ResourceName

func (n *ResourceNode) ResourceName() string

func (*ResourceNode) ResourceType

func (n *ResourceNode) ResourceType() base.ResourceType

type ResourceNodeMap

type ResourceNodeMap map[string]*ResourceNode

type ResourceNodePrepareSlot added in v0.6.1

type ResourceNodePrepareSlot struct {
}

func (*ResourceNodePrepareSlot) Name added in v1.0.0

func (s *ResourceNodePrepareSlot) Name() string

func (*ResourceNodePrepareSlot) Prepare added in v0.6.1

func (s *ResourceNodePrepareSlot) Prepare(ctx *base.EntryContext)

type Slot added in v0.6.1

type Slot struct {
}

func (*Slot) Name added in v1.0.0

func (s *Slot) Name() string

func (*Slot) OnCompleted added in v0.6.1

func (s *Slot) OnCompleted(ctx *base.EntryContext)

func (*Slot) OnEntryBlocked added in v0.6.1

func (s *Slot) OnEntryBlocked(ctx *base.EntryContext, blockError *base.BlockError)

func (*Slot) OnEntryPassed added in v0.6.1

func (s *Slot) OnEntryPassed(ctx *base.EntryContext)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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