performance

package
v0.0.0-...-ae0b575 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatBytes

func FormatBytes(bytes uint64) string

FormatBytes formats bytes to human readable format

Types

type MemoryStats

type MemoryStats struct {
	AllocBytes      uint64        `json:"alloc_bytes"`
	TotalAllocBytes uint64        `json:"total_alloc_bytes"`
	SysBytes        uint64        `json:"sys_bytes"`
	NumGC           uint32        `json:"num_gc"`
	GCPauseTotal    time.Duration `json:"gc_pause_total_ns"`
}

MemoryStats holds memory usage statistics

func ForceGC

func ForceGC() MemoryStats

ForceGC forces garbage collection and returns memory stats

func GetMemoryStats

func GetMemoryStats() MemoryStats

GetMemoryStats returns current memory statistics

type PerformanceMonitor

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

PerformanceMonitor tracks performance metrics

func NewPerformanceMonitor

func NewPerformanceMonitor() *PerformanceMonitor

NewPerformanceMonitor creates a new performance monitor

func (*PerformanceMonitor) GetMetrics

func (pm *PerformanceMonitor) GetMetrics() map[string]interface{}

GetMetrics returns performance metrics since monitor creation

Jump to

Keyboard shortcuts

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