0

I notice some benchmarks in Frame have #[skip_meta].

What does this macro do?

Please explain when one should use this macro when benchmarking.

1 Answer 1

1

This is what I found.

https://github.dev/paritytech/substrate/blob/15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9/frame/benchmarking/src/lib.rs#L1109-L1115

https://github.dev/paritytech/substrate/blob/15cfd9c5dbbfa1f3ed49623eb55b67354d1645e9/primitives/externalities/src/lib.rs#L306-L311

It would ignore the reads_and_writes if the benchmark was marked as #[skip_meta].

It won't calculate the reads_and_writes and won't put them into the BenchmarkResult.

1
  • ahh nice find. I wonder why we would want to ignore the read and writes?
    – Yatusabes
    Dec 10, 2022 at 8:00

Your Answer

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

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