import{_ as a,a as t,b as r,ag as n}from"./chunks/framework.BcrMLAmg.js";const u=JSON.parse('{"title":"BaseElement","description":"","frontmatter":{},"headers":[],"relativePath":"references/plugins/benchmark.md","filePath":"references/plugins/benchmark.md","lastUpdated":1757840145000}'),o={name:"references/plugins/benchmark.md"};function s(h,e,i,l,d,m){return r(),t("div",null,e[0]||(e[0]=[n('
| Method | Returns | Description |
|---|---|---|
| BaseElement:startProfile | BaseElement | Starts timing a method call |
| BaseElement:endProfile | BaseElement | Ends timing a method call and records statistics |
| BaseElement:benchmark | BaseElement | Enables performance measurement for a method |
| BaseElement:logBenchmark | BaseElement | Logs benchmark statistics for a method |
| BaseElement:stopBenchmark | BaseElement | Disables performance measurement for a method |
| BaseElement:getBenchmarkStats | stats | Retrieves benchmark statistics for a method |
Starts profiling a method
methodName string The name of the method to profileBaseElement self The element instanceEnds profiling a method
methodName string The name of the method to stop profilingBaseElement self The element instanceEnables benchmarking for a method
methodName string The name of the method to benchmarkBaseElement self The element instanceelement:benchmark("render")Logs benchmark statistics for a method
methodName string The name of the method to logBaseElement self The element instanceStops benchmarking for a method
methodName string The name of the method to stop benchmarkingBaseElement self The element instanceGets benchmark statistics for a method
methodName string The name of the method to get statistics forstats The benchmark statistics or nilExtends: VisualElement
| Method | Returns | Description |
|---|---|---|
| Container:benchmarkContainer | Container | Recursively enables benchmarking |
| Container:logContainerBenchmarks | Container | Recursively logs benchmark statistics |
| Container:stopContainerBenchmark | Container | Recursively stops benchmarking |
Enables benchmarking for a container and all its children
methodName string The method to benchmarkContainer self The container instancecontainer:benchmarkContainer("render")Logs benchmark statistics for a container and all its children
methodName string The method to logContainer self The container instanceStops benchmarking for a container and all its children
methodName string The method to stop benchmarkingContainer self The container instanceThis is the benchmark plugin. It provides performance measurement tools for elements and methods,with support for hierarchical profiling and detailed statistics. The plugin is meant to be used for very big projectswhere performance is critical. It allows you to measure the time taken by specific methods and log the results.
| Method | Returns | Description |
|---|---|---|
| Benchmark.start | - | Starts timing a custom operation |
| Benchmark.stop | - | Stops timing and logs results |
| Benchmark.getStats | stats | Retrieves benchmark statistics |
| Benchmark.clear | - | Removes a benchmark's data |
| Benchmark.clearAll | - | Removes all custom benchmark data |
Starts a custom benchmark
name string The name of the benchmarkoptions (optional) table Optional configurationStops a custom benchmark
name string The name of the benchmark to stopGets statistics for a benchmark
name string The name of the benchmarkstats The benchmark statistics or nilClears a specific benchmark
name string The name of the benchmark to clearClears all custom benchmarks
',89)]))}const b=a(o,[["render",s]]);export{u as __pageData,b as default};