metrics

package
v0.0.0-...-96f9553 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

pkg/metrics/metrics.go

pkg/metrics/storage.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GatherUsage

func GatherUsage(interval int)

func SaveMetricsToFile

func SaveMetricsToFile(metric Metric)

Types

type Metric

type Metric struct {
	Timestamp   time.Time `json:"timestamp"`
	CPUUsage    float64   `json:"cpu_usage"`
	MemoryUsage float64   `json:"memory_usage"`
}

Metric represents the system usage metrics.

type MetricsStore

type MetricsStore struct {
	sync.Mutex
	// contains filtered or unexported fields
}

MetricsStore is a thread-safe store for metrics.

Jump to

Keyboard shortcuts

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