eventApp

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2019 License: Apache-2.0 Imports: 5 Imported by: 22

Documentation

Index

Constants

View Source
const (
	UnknownName = "unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppStats

type AppStats struct {
	AppUUID *events.UUID
	AppId   string

	NonContainerStdout int64
	NonContainerStderr int64

	ContainerArray []*ContainerStats
	// Key: instanceId
	ContainerTrafficMap map[string]*TrafficStats

	// ISSUE: Must do this at clone time because of AvgTracker counter
	TotalTraffic *TrafficStats

	// We save container info in AppStats and not in ContainerStats
	// because container stats entries and come and go (scale up/down)
	// but we want to keep all crash info regardless of container status
	ContainerCrashInfo []*crashData.ContainerCrashInfo
}

func ConvertFromMap

func ConvertFromMap(statsMap map[string]*AppStats, appMdMgr *app.AppMetadataManager) []*AppStats

func NewAppStats

func NewAppStats(appId string) *AppStats

func (*AppStats) AddCrashInfo added in v0.8.3

func (as *AppStats) AddCrashInfo(containerIndex int, crashTime *time.Time, exitDescription string)

func (*AppStats) Crash1hCount added in v0.8.3

func (as *AppStats) Crash1hCount() int

Crash count in last 1 hour recorded since top started

func (*AppStats) Crash24hCount added in v0.8.3

func (as *AppStats) Crash24hCount() int

Crash count in last 24 hours recorded since top started

func (*AppStats) CrashCountSince added in v0.8.3

func (as *AppStats) CrashCountSince(since time.Duration) int

Crash count in last duration

func (*AppStats) CrashSince added in v0.8.3

func (as *AppStats) CrashSince(since time.Duration) []*crashData.ContainerCrashInfo

func (*AppStats) Id

func (as *AppStats) Id() string

type ContainerStats

type ContainerStats struct {
	ContainerIndex          int
	Ip                      string
	ContainerMetric         *events.ContainerMetric
	LastUpdateTime          *time.Time
	LastMetricUpdateTime    *time.Time
	OutCount                int64
	ErrCount                int64
	CreateCount             int64
	CellLastStartMsgText    string
	CellLastStartMsgTime    *time.Time
	CellLastCreatingMsgTime *time.Time
	CellCreatedMsgTime      *time.Time
	CellHealthyMsgTime      *time.Time
}

func NewContainerStats

func NewContainerStats(containerIndex int) *ContainerStats

type HttpInfo added in v0.8.5

type HttpInfo struct {
	HttpMethod     events.Method
	HttpStatusCode int32
	HttpCount      int64
	LastAcivity    *time.Time
	// Last response time in nano-seconds
	LastResponseTime int64
}

func NewHttpInfo added in v0.8.5

func NewHttpInfo(httpMethod events.Method, httpStatusCode int32) *HttpInfo

type TrafficStats

type TrafficStats struct {
	InstanceIndex int32

	ResponseL60Time    *util.AvgTracker
	AvgResponseL60Time float64 // updated after a clone of this object
	EventL60Rate       int     // updated after a clone of this object

	ResponseL10Time    *util.AvgTracker
	AvgResponseL10Time float64 // updated after a clone of this object
	EventL10Rate       int     // updated after a clone of this object

	ResponseL1Time    *util.AvgTracker
	AvgResponseL1Time float64 // updated after a clone of this object
	EventL1Rate       int     // updated after a clone of this object

	HttpInfoMap map[events.Method]map[int32]*HttpInfo
}

func NewTrafficStats

func NewTrafficStats() *TrafficStats

Jump to

Keyboard shortcuts

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