Skip to content
Snippets Groups Projects

Identity pallet benchmark

Merged Benjamin Gallois requested to merge bgallois/duniter-v2s:pallet-benchmark into master
  • Add benchmark for the Identity pallet.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Benjamin Gallois added 2 commits

    added 2 commits

    • 2ca30536 - feat(node): add genesis builder for benchmarking
    • a693f9f8 - feat: add pallet identity benchmark

    Compare with previous version

  • Benjamin Gallois added 4 commits

    added 4 commits

    Compare with previous version

  • added 1 commit

    • 5af57ef1 - feat: add pallet identity benchmark

    Compare with previous version

  • Benjamin Gallois added 2 commits

    added 2 commits

    • 389e50d4 - feat(pallet_identity): add weights info
    • 9ec602d7 - feat(runtimes): use our benchmarks for pallet identity

    Compare with previous version

  • Benjamin Gallois added 2 commits

    added 2 commits

    • c520dbb5 - feat(pallet_identity): add weights info
    • 0c91dd0e - feat(runtimes): use our benchmarks for pallet identity

    Compare with previous version

  • Benjamin Gallois added 2 commits

    added 2 commits

    • 744492cb - feat(pallet_identity): add weights info
    • 3134170d - feat(runtimes): use our benchmarks for pallet identity

    Compare with previous version

    • Added a genesis builder with prepared identities to run the benchmark using --chain=gdev-benchmark.
    • Added pallet identity benchmark.
    • Updated the runtime configuration to use the computed weights using a placeholder until runtime/common/src/weights/pallet_identity.rs has been generated using the reference machine.
  • Benjamin Gallois resolved all threads

    resolved all threads

  • Benjamin Gallois marked this merge request as ready

    marked this merge request as ready

  • added 1 commit

    • e3231808 - doc(benchmark): add some air in the benchmark doc

    Compare with previous version

    • Resolved by Hugo Trentesaux

      I tried

      ./target/release/duniter benchmark pallet --chain=gdev-benchmark --steps=1 --repeat=1 --pallet=pallet_identity --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=.

      and got

      Error: Input("No benchmarks found which match your input.")

      Where is the mistake?

  • Yes, I will commit the Cargo.lock with the "sp-keystore" that is necessary to run the tests of the pallet.

    To clarify the point 5 of the documentation:
    At the beginning, the pallets/identity/src/weights.rs does not exist at all and the pallet doesn't use any weight info. We run the benchmark to create automatically runtime/common/src/weights/pallet_identity.rs. We use this file to create manually the pallets/identity/src/weights.rs that will contain the trait definition and a dummy implementation for testing purpose. After that, we can use the weight info inside the pallet that will run on test and runtime. At the end, the benchmark can be run again, but on the reference machine to regenerate runtime/common/src/weights/pallet_identity.rs.

  • Benjamin Gallois added 4 commits

    added 4 commits

    • 3367f6b9 - feat: add pallet identity benchmark
    • cf9afc5f - feat(pallet_identity): add weights info
    • d7577268 - feat(runtimes): use our benchmarks for pallet identity
    • a8332ffa - doc(benchmark): add some air in the benchmark doc

    Compare with previous version

  • As we will not squash the commits from this MR, I suggest:

    • detailing point 5 of the doc with what you describe in previous post
      1. create runtime/common/src/weights/pallet_<pallet>.rs automatically
      2. add pallets/<pallet>/src/weights.rs manually
    • reflect these steps in the commit history so that the topological order matches the previous chronological order

    This way, the commits from this MR could serve as an example of the steps detailed in the doc.

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading