From 9d0dea1ce0695159b11b0ffef36b61ec60e4052f Mon Sep 17 00:00:00 2001 From: bgallois <benjamin@gallois.cc> Date: Tue, 28 Nov 2023 09:47:41 +0100 Subject: [PATCH] update documentation --- docs/dev/weights-benchmarking.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/dev/weights-benchmarking.md b/docs/dev/weights-benchmarking.md index 2b7640c2a..d9a171d94 100644 --- a/docs/dev/weights-benchmarking.md +++ b/docs/dev/weights-benchmarking.md @@ -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. 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. + +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. -- GitLab