Documentation
¶
Overview ¶
Package profiling provides memory profiling utilities for brfit.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatBytes ¶
FormatBytes formats bytes as a human-readable string.
func StartCPUProfile ¶
StartCPUProfile starts CPU profiling to the specified file. Returns a stop function that should be called to stop profiling.
func WriteHeapProfile ¶
WriteHeapProfile writes a heap profile to the specified file.
Types ¶
type MemoryStats ¶
type MemoryStats struct {
// Alloc is bytes of allocated heap objects.
Alloc uint64
// TotalAlloc is cumulative bytes allocated for heap objects.
TotalAlloc uint64
// Sys is total bytes of memory obtained from the OS.
Sys uint64
// NumGC is the number of completed GC cycles.
NumGC uint32
// GoroutineCount is the number of goroutines.
GoroutineCount int
// HeapObjects is the number of allocated heap objects.
HeapObjects uint64
}
MemoryStats holds memory usage information.
func GetMemoryStats ¶
func GetMemoryStats() MemoryStats
GetMemoryStats returns current memory statistics.
Click to show internal directories.
Click to hide internal directories.