stats

package
v0.0.0-...-fa2cb06 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunStats

func RunStats(statsContainer *Stats, conf *config.Config)

RunStats runs statistics collector and API service.

Types

type Stats

type Stats struct {
	RequestsNumber    uint64 `json:"requests_number"`
	CrawleraRequests  uint64 `json:"crawlera_requests"`
	SessionsCreated   uint64 `json:"sessions_created"`
	ClientsConnected  uint64 `json:"clients_connected"`
	AdblockedRequests uint64 `json:"adblocked_requests"`
	CrawleraErrors    uint64 `json:"crawlera_errors"`
	AllErrors         uint64 `json:"all_errors"`

	// The owls are not what they seem
	// do not believe RWMutex. We use it as shared/exclusive lock.
	OverallTimes  *durationTimeSeries `json:"overall_times"`
	CrawleraTimes *durationTimeSeries `json:"crawlera_times"`

	Uptime statsUptime `json:"uptime"`
	// contains filtered or unexported fields
}

Stats is a collector of statistics. Its idea is to listen to all provided channels and generate reports (JSON data structures).

func NewStats

func NewStats() *Stats

NewStats creates new initialized Stats instance.

func (*Stats) DropCertificate

func (s *Stats) DropCertificate()

func (*Stats) DropConnect

func (s *Stats) DropConnect()

func (*Stats) DropConnection

func (s *Stats) DropConnection()

func (*Stats) DropDelete

func (s *Stats) DropDelete()

func (*Stats) DropGet

func (s *Stats) DropGet()

func (*Stats) DropHead

func (s *Stats) DropHead()

func (*Stats) DropOptions

func (s *Stats) DropOptions()

func (*Stats) DropOther

func (s *Stats) DropOther()

func (*Stats) DropPatch

func (s *Stats) DropPatch()

func (*Stats) DropPost

func (s *Stats) DropPost()

func (*Stats) DropPut

func (s *Stats) DropPut()

func (*Stats) DropTrace

func (s *Stats) DropTrace()

func (*Stats) NewAdblockedRequest

func (s *Stats) NewAdblockedRequest()

func (*Stats) NewCertificate

func (s *Stats) NewCertificate()

func (*Stats) NewConnect

func (s *Stats) NewConnect()

func (*Stats) NewConnection

func (s *Stats) NewConnection()

func (*Stats) NewCrawleraError

func (s *Stats) NewCrawleraError()

func (*Stats) NewCrawleraRequest

func (s *Stats) NewCrawleraRequest()

func (*Stats) NewCrawleraTime

func (s *Stats) NewCrawleraTime(elapsed time.Duration)

func (*Stats) NewDelete

func (s *Stats) NewDelete()

func (*Stats) NewGet

func (s *Stats) NewGet()

func (*Stats) NewHead

func (s *Stats) NewHead()

func (*Stats) NewOptions

func (s *Stats) NewOptions()

func (*Stats) NewOther

func (s *Stats) NewOther()

func (*Stats) NewOtherError

func (s *Stats) NewOtherError()

func (*Stats) NewOverallTime

func (s *Stats) NewOverallTime(elapsed time.Duration)

func (*Stats) NewPatch

func (s *Stats) NewPatch()

func (*Stats) NewPost

func (s *Stats) NewPost()

func (*Stats) NewPut

func (s *Stats) NewPut()

func (*Stats) NewSessionCreated

func (s *Stats) NewSessionCreated()

func (*Stats) NewTrace

func (s *Stats) NewTrace()

Jump to

Keyboard shortcuts

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