metrics

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package metrics collects Lava execution metrics.

Index

Constants

This section is empty.

Variables

View Source
var DefaultCollector = NewCollector()

DefaultCollector is the default Collector.

Functions

func Collect

func Collect(name string, value any)

Collect records a metric with the provided name and value using DefaultCollector.

func Write

func Write(w io.Writer) error

Write writes the collected metrics to the specified io.Writer using DefaultCollector.

func WriteFile

func WriteFile(file string) error

WriteFile writes the collected metrics into the specified file using DefaultCollector.

Types

type Collector

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

Collector represents a metrics collector.

func NewCollector

func NewCollector() *Collector

NewCollector returns a new metrics collector.

func (*Collector) Collect

func (c *Collector) Collect(name string, value any)

Collect records a metric with the provided name and value.

func (*Collector) Write

func (c *Collector) Write(w io.Writer) error

Write writes the metrics to the specified io.Writer.

Jump to

Keyboard shortcuts

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