Automatic weights documentation
Parse the weight files to calculate both extrinsic weights and relative weights, and include the results in the documentation #128 (closed).
This requires:
- The pallet weights computed on the reference machine.
- The extrinsic weights computed on the reference machine to get the weight overhead of the execution of one extrinsic.
- The paritydb weights computed on the reference machine to get the weight of read and write in the database.
Include in the docs:
The relative weight for all extrinsics available as:
\frac{weight_{extrinsic_base} + weight_{extrinsic}}{weight_{block}}*100
- In the case where the extrinsic has a complexity parameter, the weight is calculated as the worst-case scenario, i.e., the maximal value set during benchmarking.
- In the case where no weight is available, the value is set to -1% and translated to "No weight available" in the doc.
To-do list:
-
parse weight files. -
compute weights from files. -
add relative weight in % of block max. -
fix overhead benchmark. -
include computed weights in the autogenerated documentation. -
fix missing weights. -
automatic block max extraction from metadata.
Edited by Benjamin Gallois