6

We have two instances of a pallet with different runtime configurations. How can we run the benchmarks separately to generate two distinct sets of weights?

As far as I can tell this is not possible and if you list multiple pallet instances (such as in the kusama runtime here) it will use the last instance.

1 Answer 1

2

It is possible. You just run the benchmark like for any other pallet.
The output will list the calls multiple times and finally print:

Created file: "runtime/kusama/src/weights/pallet_referenda_fellowship_referenda.rs"
Created file: "runtime/kusama/src/weights/pallet_referenda_referenda.rs"

Be sure to specify a folder and not a file path for the --output like in Kusama.
Otherwise it will overwrite the same file and print this as last line:

Created file: "runtime/kusama/src/weights/pallet_referenda.rs"
Created file: "runtime/kusama/src/weights/pallet_referenda.rs"
Multiple benchmarks were written to the same file: "runtime/kusama/src/weights/pallet_referenda.rs".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.