stats

package
v0.0.0-...-c13e492 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActiveAppsTrimInterval  = 1 * time.Minute
	ActiveAppsEntryLifetime = 30 * time.Minute
)
View Source
const (
	TopAppsTrimInterval  = 10 * time.Second
	TopAppsEntryLifetime = 60 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveApps

type ActiveApps struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewActiveApps

func NewActiveApps() *ActiveApps

func (*ActiveApps) ActiveSince

func (x *ActiveApps) ActiveSince(y time.Time) []string

func (*ActiveApps) Mark

func (x *ActiveApps) Mark(ApplicationId string, z time.Time)

func (*ActiveApps) Trim

func (x *ActiveApps) Trim(y time.Time)

type TopApps

type TopApps struct {
	sync.Mutex

	*time.Ticker
	// contains filtered or unexported fields
}

func NewTopApps

func NewTopApps() *TopApps

func (*TopApps) Mark

func (x *TopApps) Mark(ApplicationId string, z time.Time)

func (*TopApps) TopSince

func (x *TopApps) TopSince(y time.Time, n int) []TopAppsTopEntry

func (*TopApps) Trim

func (x *TopApps) Trim(y time.Time)

type TopAppsTopEntry

type TopAppsTopEntry struct {
	ApplicationId string
	Requests      int64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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