Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatBytes ¶
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
Click to show internal directories.
Click to hide internal directories.