metrics

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package metrics implements the file descriptor metrics collection and reporting.

Index

Constants

View Source
const SubSystem = "fd"

Variables

This section is empty.

Functions

func InitAveragers

func InitAveragers(db *sql.DB, tableName string)

func ReadAllocatedFileHandles added in v0.3.1

func ReadAllocatedFileHandles(ctx context.Context, since time.Time) (components_metrics_state.Metrics, error)

func ReadAllocatedFileHandlesPercents added in v0.3.1

func ReadAllocatedFileHandlesPercents(ctx context.Context, since time.Time) (components_metrics_state.Metrics, error)

func ReadRunningPIDs

func ReadRunningPIDs(ctx context.Context, since time.Time) (components_metrics_state.Metrics, error)

func ReadThresholdUsedPercents

func ReadThresholdUsedPercents(ctx context.Context, since time.Time) (components_metrics_state.Metrics, error)

func ReadUsedPercents

func ReadUsedPercents(ctx context.Context, since time.Time) (components_metrics_state.Metrics, error)

func Register

func Register(reg *prometheus.Registry, db *sql.DB, tableName string) error

func SetAllocatedFileHandles added in v0.3.1

func SetAllocatedFileHandles(ctx context.Context, handles float64, currentTime time.Time) error

func SetAllocatedFileHandlesPercent added in v0.3.1

func SetAllocatedFileHandlesPercent(ctx context.Context, pct float64, currentTime time.Time) error

func SetLastUpdateUnixSeconds

func SetLastUpdateUnixSeconds(unixSeconds float64)

func SetLimit

func SetLimit(ctx context.Context, v float64, currentTime time.Time) error

func SetRunningPIDs

func SetRunningPIDs(ctx context.Context, pids float64, currentTime time.Time) error

func SetThresholdAllocatedFileHandles added in v0.3.1

func SetThresholdAllocatedFileHandles(ctx context.Context, handles float64) error

func SetThresholdAllocatedFileHandlesPercent added in v0.3.1

func SetThresholdAllocatedFileHandlesPercent(ctx context.Context, pct float64, currentTime time.Time) error

func SetThresholdRunningPIDs added in v0.3.1

func SetThresholdRunningPIDs(ctx context.Context, limit float64) error

func SetThresholdRunningPIDsPercent added in v0.3.1

func SetThresholdRunningPIDsPercent(ctx context.Context, pct float64, currentTime time.Time) error

func SetUsedPercent

func SetUsedPercent(ctx context.Context, pct float64, currentTime time.Time) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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