topn

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Path string `yaml:"path"`
	*httpstat.Status
}

Item is the item of status.

type Status

type Status []*Item

Status contains all status generated by TopN.

func (Status) Len

func (s Status) Len() int

func (Status) Less

func (s Status) Less(i, j int) bool

func (Status) Swap

func (s Status) Swap(i, j int)

type TopN

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

TopN is the statistics tool for HTTP traffic.

func New

func New(n int) *TopN

New creates a TopN.

func (*TopN) Stat

func (t *TopN) Stat(ctx context.HTTPContext)

Stat stats the ctx.

func (*TopN) Status

func (t *TopN) Status() *Status

Status returns TopN Status, and resets all metrics.

Jump to

Keyboard shortcuts

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