-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmarks 'how-to guide' uses outdated syntax #1355
Comments
@ggwpez , Can you provide some guidance on what to change? Assuming there are already some benchmarks set up on your node, you just need to add another instance of the add_benchmark! macro: /// configuration for running benchmarks I wouldn't be at all surprised that this doc is out-of-date, but the How-to guide is pretty thin on details so I'm not sure what needs to change (well, actually, it probably needs to be completely rewritten at some point ;-D). |
Thanks for spotting it! add_benchmark!(params, batches, frame_benchmarking, BaselineBench::<Runtime>);
add_benchmark!(params, batches, pallet_assets, Assets);
add_benchmark!(params, batches, pallet_babe, Babe);
… and then in another function, one had to write the same thing again which is error prone: list_benchmark!(list, extra, frame_benchmarking, BaselineBench::<Runtime>);
list_benchmark!(list, extra, pallet_assets, Assets);
list_benchmark!(list, extra, pallet_babe, Babe);
… these two got unified into define_benchmarks!(
[frame_benchmarking, BaselineBench::<Runtime>]
[pallet_assets, Assets]
[pallet_babe, Babe]
…
); This can be seen here (and following lines). The old syntax is still valid and it is possible to mix the old and new syntax, but I would suggest to only mention the new one. Looks like this article also mentions the old syntax. |
Thanks, @ggwpez ! I took a stab at updating the guide. |
In am referring to this guide. In section 2. Add benchmarking to your runtime, point 3. says:
As far as I know, this syntax (
add_benchmark!
) has been deprecated in favour of a more convenient and easierdefine_benchmarks!
in this PR. I'd like to request updating this section of the guide to use the new syntax.The text was updated successfully, but these errors were encountered: