This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple test to validate weights resulting from weight functions, generated by benchmarking, against various known limits. | |
// | |
// NOTE: this is simply to provide a rough indication of dispatchable weights in relation to block limits, which can be useful for: | |
// - ensuring a dispatchable does not exceed block, max extrinsic limits and regression testing | |
// - evaluating if some optimisation results in net reduction in weight usage | |
// - getting a feel for weights early during pallet development and monitoring through optimisation | |
// | |
// Is only as good as the corresponding runtime configuration (i.e. test placed within pallet with mock runtime vs placed within runtime with actual runtime config). | |
// Also ensure the limits are relevant to your implementation, they may have changed with newer versions and will definitely change with async backing. | |
// Finally, it uses the generated weight functions directly and therefore does not cater to any post-dispatch weight adjustment resulting from a dispatchable. |