@@ -89,3 +89,5 @@ When designing handlers and internal functions, it is advisable to avoid having
...
@@ -89,3 +89,5 @@ When designing handlers and internal functions, it is advisable to avoid having
1.**Simplified Benchmarking**: Writing benchmarks for hooks or calls where handlers and internal functions are utilized becomes more straightforward.
1.**Simplified Benchmarking**: Writing benchmarks for hooks or calls where handlers and internal functions are utilized becomes more straightforward.
2.**Reduced Benchmarking Complexity**: By directly measuring execution and overhead in a single pass, the number of benchmarks is minimized.
2.**Reduced Benchmarking Complexity**: By directly measuring execution and overhead in a single pass, the number of benchmarks is minimized.
3.**Enhanced Readability**: Understanding that weight accounting occurs at the outermost level improves the overall readability of the code.
3.**Enhanced Readability**: Understanding that weight accounting occurs at the outermost level improves the overall readability of the code.
One notable exception is the internal functions called in hooks like `on_idle` or `on_initialize` that can be easier to benchmark separately when the hook contains numerous branching.