stat

package
v0.0.0-...-9c41f32 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Collect

func Collect(op string, err *error) func()

Collect collects function execution data.

func InitStat

func InitStat()

InitStat initializes collecting program statistics.

Types

type Stat

type Stat struct {
	Operation string `json:"operation"`
	Success   int64  `json:"success"`
	Error     int64  `json:"error"`
}

Stat is for storing a particular statistics.

type Stats

type Stats []Stat

Stats implements log.Message interface.

func Statistics

func Statistics() Stats

Statistics will return statistics that has been collected so far.

func (Stats) JSON

func (s Stats) JSON() string

func (Stats) String

func (s Stats) String() string

Jump to

Keyboard shortcuts

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