eventApp

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2017 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
	LastUpdate      time.Time
	OutCount        int64
	ErrCount        int64
}

func NewContainerStats

func NewContainerStats(containerIndex int) *ContainerStats

type TrafficStats

type TrafficStats struct {
	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

	HttpAllCount int64
	Http2xxCount int64
	Http3xxCount int64
	Http4xxCount int64
	Http5xxCount int64
}

func NewTrafficStats

func NewTrafficStats() *TrafficStats

Jump to

Keyboard shortcuts

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