Files
Basalt2/docs/references/plugins/benchmark_Container_VisualElement.md
2025-03-18 01:06:26 +00:00

45 lines
1.1 KiB
Markdown

# Container : VisualElement
## Functions
|Method|Returns|Description|
|---|---|---|
|[Container:benchmarkContainer](#container-benchmarkcontainer)|Container|Recursively enables benchmarking
|[Container:logContainerBenchmarks](#container-logcontainerbenchmarks)|Container|Recursively logs benchmark statistics
|[Container:stopContainerBenchmark](#container-stopcontainerbenchmark)|Container|Recursively stops benchmarking
## Container:benchmarkContainer(methodName)
Enables benchmarking for a container and all its children
### Parameters
* `methodName` `string` The method to benchmark
### Returns
* `Container` `self` The container instance
### Usage
```lua
container:benchmarkContainer("render")
```
## Container:logContainerBenchmarks(methodName)
Logs benchmark statistics for a container and all its children
### Parameters
* `methodName` `string` The method to log
### Returns
* `Container` `self` The container instance
## Container:stopContainerBenchmark(methodName)
Stops benchmarking for a container and all its children
### Parameters
* `methodName` `string` The method to stop benchmarking
### Returns
* `Container` `self` The container instance