Documentation ¶
Index ¶
- Constants
- Variables
- func ResetResourceNodeMap()
- type BaseStatNode
- func (n *BaseStatNode) AddCount(event base.MetricEvent, count int64)
- func (n *BaseStatNode) AvgRT() float64
- func (n *BaseStatNode) CurrentConcurrency() int32
- func (n *BaseStatNode) DecreaseConcurrency()
- func (n *BaseStatNode) DefaultMetric() base.ReadStat
- func (n *BaseStatNode) GenerateReadStat(sampleCount uint32, intervalInMs uint32) (base.ReadStat, error)
- func (n *BaseStatNode) GetMaxAvg(event base.MetricEvent) float64
- func (n *BaseStatNode) GetPreviousQPS(event base.MetricEvent) float64
- func (n *BaseStatNode) GetQPS(event base.MetricEvent) float64
- func (n *BaseStatNode) GetSum(event base.MetricEvent) int64
- func (n *BaseStatNode) IncreaseConcurrency()
- func (n *BaseStatNode) MaxConcurrency() int32
- func (n *BaseStatNode) MetricsOnCondition(predicate base.TimePredicate) []*base.MetricItem
- func (n *BaseStatNode) MinRT() float64
- func (n *BaseStatNode) UpdateConcurrency(concurrency int32)
- type ResourceNode
- func GetOrCreateResourceNode(resource string, resourceType base.ResourceType) *ResourceNode
- func GetResourceNode(resource string) *ResourceNode
- func InboundNode() *ResourceNode
- func NewResourceNode(resourceName string, resourceType base.ResourceType) *ResourceNode
- func ResourceNodeList() []*ResourceNode
- type ResourceNodeMap
- type ResourceNodePrepareSlot
- type Slot
Constants ¶
View Source
const ( StatSlotOrder = 1000 ResultPass = "pass" ResultBlock = "block" )
View Source
const (
PrepareSlotOrder = 1000
)
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 ¶
func (n *BaseStatNode) AddCount(event base.MetricEvent, count int64)
func (*BaseStatNode) AvgRT ¶
func (n *BaseStatNode) AvgRT() float64
func (*BaseStatNode) CurrentConcurrency ¶
func (n *BaseStatNode) CurrentConcurrency() int32
func (*BaseStatNode) DecreaseConcurrency ¶
func (n *BaseStatNode) DecreaseConcurrency()
func (*BaseStatNode) DefaultMetric ¶
func (n *BaseStatNode) DefaultMetric() base.ReadStat
func (*BaseStatNode) GenerateReadStat ¶
func (*BaseStatNode) GetMaxAvg ¶
func (n *BaseStatNode) GetMaxAvg(event base.MetricEvent) float64
func (*BaseStatNode) GetPreviousQPS ¶
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 ¶
func (n *BaseStatNode) IncreaseConcurrency()
func (*BaseStatNode) MaxConcurrency ¶
func (n *BaseStatNode) MaxConcurrency() int32
func (*BaseStatNode) MetricsOnCondition ¶
func (n *BaseStatNode) MetricsOnCondition(predicate base.TimePredicate) []*base.MetricItem
func (*BaseStatNode) MinRT ¶
func (n *BaseStatNode) MinRT() float64
func (*BaseStatNode) UpdateConcurrency ¶
func (n *BaseStatNode) UpdateConcurrency(concurrency int32)
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 ¶
type ResourceNodePrepareSlot struct { }
func (*ResourceNodePrepareSlot) Order ¶
func (s *ResourceNodePrepareSlot) Order() uint32
func (*ResourceNodePrepareSlot) Prepare ¶
func (s *ResourceNodePrepareSlot) Prepare(ctx *base.EntryContext)
type Slot ¶
type Slot struct { }
func (*Slot) OnCompleted ¶
func (s *Slot) OnCompleted(ctx *base.EntryContext)
func (*Slot) OnEntryBlocked ¶
func (s *Slot) OnEntryBlocked(ctx *base.EntryContext, blockError *base.BlockError)
func (*Slot) OnEntryPassed ¶
func (s *Slot) OnEntryPassed(ctx *base.EntryContext)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.