metrics

package
v0.24.3 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const COMPILATION_TIME = "compilation_time"

Metric names

View Source
const DATA_DOCUMENTS_LOADED = "data_documents_loaded"
View Source
const INPUT_IDX = "input_idx"
View Source
const MODULES_LOADED = "modules_loaded"
View Source
const PACKAGE = "package"

Label names

View Source
const POLICIES_LOADED = "policies_loaded"
View Source
const POLICY_ERRORS = "policy_errors"
View Source
const PROVIDERS_LOAD_TIME = "providers_load_time"
View Source
const RESULTS_PRODUCED = "results_produced"
View Source
const RULES_EVALUATED = "rules_evaluated"
View Source
const RULE_EVAL_TIME = "rule_evaluation_time"
View Source
const RULE_SELECTION_TIME = "rule_selection_time"
View Source
const TOTAL_RULE_EVAL_TIME = "total_rule_evaluation_time"

Variables

This section is empty.

Functions

This section is empty.

Types

type Buckets

type Buckets []float64

type Counter

type Counter interface {
	Inc()
	Add(val float64)
}

func NewLocalCounter

func NewLocalCounter(name, description string, labels Labels) Counter

type Histogram

type Histogram interface {
	Observe(val float64)
}

type Labels

type Labels = map[string]string

func MergeLabels

func MergeLabels(labels ...Labels) Labels

type LocalCounter

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

func (*LocalCounter) Add

func (l *LocalCounter) Add(val float64)

func (*LocalCounter) Count

func (l *LocalCounter) Count() float64

func (*LocalCounter) Inc

func (l *LocalCounter) Inc()

type LocalMetrics

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

func NewLocalMetrics

func NewLocalMetrics(logger logging.Logger) *LocalMetrics

func (*LocalMetrics) Counter

func (l *LocalMetrics) Counter(_ context.Context, name, description string, labels Labels) Counter

func (*LocalMetrics) Log

func (l *LocalMetrics) Log(ctx context.Context)

func (*LocalMetrics) Timer

func (l *LocalMetrics) Timer(_ context.Context, name, description string, labels Labels) Timer

type LocalTimer

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

func (*LocalTimer) Duration

func (l *LocalTimer) Duration() time.Duration

func (*LocalTimer) Record

func (l *LocalTimer) Record(d time.Duration)

type Metrics

type Metrics interface {
	Counter(ctx context.Context, name, description string, labels Labels) Counter
	Timer(ctx context.Context, name, description string, labels Labels) Timer
}

type Timer

type Timer interface {
	Record(d time.Duration)
}

func NewLocalTimer

func NewLocalTimer(name, description string, labels Labels) Timer

Jump to

Keyboard shortcuts

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