stats

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counters

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

Counters are used to keep quick stats counters so that we can do stats reporting without locking the hub and reading over the spokes internal state should not be accessed directly

func (*Counters) DecrJob

func (c *Counters) DecrJob()

DecrJob updates counter - job has been removed

func (*Counters) DecrSpoke

func (c *Counters) DecrSpoke()

DecrSpoke updates counter - spoke has been removed

func (*Counters) IncrJob

func (c *Counters) IncrJob()

IncrJob updates counters - job has been added

func (*Counters) IncrSpoke

func (c *Counters) IncrSpoke()

IncrSpoke updates counters - spoke has been added

func (*Counters) Read

func (c *Counters) Read() Snapshot

Read returns a "copy" of the current stats snapshot at that instant

type Snapshot

type Snapshot struct {
	CurrentJobs   int64 // current set of jobs
	RemovedJobs   int64 // jobs removed so far
	CurrentSpokes int64 // number of current spokes
}

Snapshot is a readonly view of the stats counters

Jump to

Keyboard shortcuts

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