Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCallerLine ¶
GetCallerLine returns just the line number of the caller at the given stack level
func GetMemorySize ¶
GetMemorySize returns the total estimated memory usage in bytes.
Types ¶
type MemoryStats ¶
type MemoryStats struct {
Tables int64
TableEntries int64
Strings int64
StringBytes int64
Functions int64
UserData int64
Threads int64
Total int64
}
MemoryStats holds detailed memory usage statistics.
func GetMemoryStats ¶
func GetMemoryStats(L *lua.LState) MemoryStats
GetMemoryStats walks the Lua state and calculates memory usage.
type StackFrame ¶
type StackFrame struct {
Level int
Source string
CurrentLine int
Name string
FuncType string // What type of function (Lua, Go, main, etc)
Locals []Local // Local variables
Upvalues []Upvalue // Upvalue information
}
StackFrame represents a single frame in the Lua stack
func GetStackFrame ¶
func GetStackFrame(l *lua.LState, level int) (StackFrame, bool)
GetStackFrame captures information about a single stack frame
func (StackFrame) String ¶
func (sf StackFrame) String() string
type StackTrace ¶
type StackTrace struct {
ThreadID string
Frames []StackFrame
}
StackTrace represents a complete stack trace
func GetAllCoroutineStacks ¶
func GetAllCoroutineStacks(l *lua.LState) []*StackTrace
GetAllCoroutineStacks gets stack traces for all coroutines in the registry
func GetStackTrace ¶
func GetStackTrace(l *lua.LState) *StackTrace
GetStackTrace captures a complete stack trace from a Lua state
func (StackTrace) String ¶
func (st StackTrace) String() string
Click to show internal directories.
Click to hide internal directories.