Skip to content
Snippets Groups Projects

Automatic weights documentation

Merged Benjamin Gallois requested to merge bgallois/duniter-v2s:weight-visualisation into master
All threads resolved!

Parse the weight files to calculate both extrinsic weights and relative weights, and include the results in the documentation #128 (closed).

This requires:

  1. The pallet weights computed on the reference machine.
  2. The extrinsic weights computed on the reference machine to get the weight overhead of the execution of one extrinsic.
  3. The paritydb weights computed on the reference machine to get the weight of read and write in the database.

Include in the docs: The relative weight for all extrinsics available as:

weightextrinsicbase+weightextrinsicweightblock100\frac{weight_{extrinsic_base} + weight_{extrinsic}}{weight_{block}}*100

  • In the case where the extrinsic has a complexity parameter, the weight is calculated as the worst-case scenario, i.e., the maximal value set during benchmarking.
  • In the case where no weight is available, the value is set to -1% and translated to "No weight available" in the doc.

To-do list:

  • parse weight files.
  • compute weights from files.
  • add relative weight in % of block max.
  • fix overhead benchmark.
  • include computed weights in the autogenerated documentation.
  • fix missing weights.
  • automatic block max extraction from metadata.
Edited by Benjamin Gallois

Merge request reports

Merge request pipeline #35206 passed

Merge request pipeline passed for 67b1e8f8

Approval is optional

Merged by Hugo TrentesauxHugo Trentesaux 1 year ago (Jan 8, 2024 4:25pm UTC)

Merge details

Pipeline #35207 passed

Pipeline passed for 23c25376 on master

Activity

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

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Hugo Trentesaux approved this merge request

    approved this merge request

  • Benjamin Gallois changed the description

    changed the description

  • Benjamin Gallois added 24 commits

    added 24 commits

    Compare with previous version

  • Hugo Trentesaux resolved all threads

    resolved all threads

  • Hugo Trentesaux enabled an automatic merge when the pipeline for 67b1e8f8 succeeds

    enabled an automatic merge when the pipeline for 67b1e8f8 succeeds

  • Benjamin Gallois mentioned in commit 23c25376

    mentioned in commit 23c25376

  • mentioned in issue #128 (closed)

  • Please register or sign in to reply
    Loading