stats

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package stats provides instrumentation for the gopcua library via expvar.

The API is experimental and might change.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client() *expvar.Map

Client is the global client statistics map.

func Error

func Error() *expvar.Map

Error is the global error statistics map.

func RecordError

func RecordError(err error)

func Reset

func Reset()

Reset resets all counters to zero.

func Subscription

func Subscription() *expvar.Map

Subscription is the global subscription statistics map.

Types

type Stats

type Stats struct {
	Client       *expvar.Map
	Error        *expvar.Map
	Subscription *expvar.Map
}

Stats collects gopcua statistics via expvar.

func NewStats

func NewStats() *Stats

func (*Stats) RecordError

func (s *Stats) RecordError(err error)

RecordError updates the metric for an error by one.

func (*Stats) Reset

func (s *Stats) Reset()

Reset resets all counters to zero.

Jump to

Keyboard shortcuts

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