2.0 KiB
2.0 KiB
BaseElement
Functions
| Method | Returns | Description |
|---|---|---|
| BaseElement:benchmark | BaseElement | Enables performance measurement for a method |
| BaseElement:endProfile | BaseElement | Ends timing a method call and records statistics |
| BaseElement:getBenchmarkStats | table? | Retrieves benchmark statistics for a method |
| BaseElement:logBenchmark | BaseElement | Logs benchmark statistics for a method |
| BaseElement:startProfile | BaseElement | Starts timing a method call |
| BaseElement:stopBenchmark | BaseElement | Disables performance measurement for a method |
BaseElement:benchmark(methodName)
Enables benchmarking for a method
Parameters
methodNamestringThe name of the method to benchmark
Returns
BaseElementselfThe element instance
Usage
element:benchmark("render")
BaseElement:endProfile(methodName)
Ends profiling a method
Parameters
methodNamestringThe name of the method to stop profiling
Returns
BaseElementselfThe element instance
BaseElement:getBenchmarkStats(methodName)
Gets benchmark statistics for a method
Parameters
methodNamestringThe name of the method to get statistics for
Returns
table?statsThe benchmark statistics or nil
BaseElement:logBenchmark(methodName)
Logs benchmark statistics for a method
Parameters
methodNamestringThe name of the method to log
Returns
BaseElementselfThe element instance
BaseElement:startProfile(methodName)
Starts profiling a method
Parameters
methodNamestringThe name of the method to profile
Returns
BaseElementselfThe element instance
BaseElement:stopBenchmark(methodName)
Stops benchmarking for a method
Parameters
methodNamestringThe name of the method to stop benchmarking
Returns
BaseElementselfThe element instance