Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Add storage root recalculation time to benchmarks #5035

Merged
merged 1 commit into from
Feb 24, 2020

Conversation

shawntabrizi
Copy link
Member

This is a small PR which additionally adds storage root recalculation time to our pallet benchmarking setup.

Storage root recalculation is measured using:

sp_io::storage::root

Results now look like:

Pallet: "pallet-identity", Extrinsic: "add_registrar", Steps: 10, Repeat: 100
r,extrinsic_time,storage_root_time
1,305000,65000
1,97000,39000
1,281000,39000
1,102000,41000

@shawntabrizi shawntabrizi added A0-please_review Pull request needs code review. A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). labels Feb 24, 2020
Copy link
Contributor

@marcio-diaz marcio-diaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just a few questions:

  • What are we supposed to observe?
  • Is there some correlation between execution time and storage root recalculation?

@shawntabrizi
Copy link
Member Author

The two values should be loosely correlated. We need to run benchmarks to see.

The idea is you could have some very simple extrinsic, which makes a TON of changes to storage
while you have a very complicated extrinsic, which does touches only one storage item.

Before we were only measuring computation complexity, now we also look at the storage root complexity.

We will probably need to create yet another pipeline to do more accurate benchmarking of storage root calculation in general.

@shawntabrizi shawntabrizi added the B0-silent Changes should not be mentioned in any release notes label Feb 24, 2020
@shawntabrizi shawntabrizi added A8-looksgood and removed A0-please_review Pull request needs code review. labels Feb 24, 2020
@gnunicorn gnunicorn added this to the 2.0 milestone Feb 24, 2020
@gnunicorn gnunicorn merged commit 41bb219 into master Feb 24, 2020
@gnunicorn gnunicorn deleted the shawntabrizi-benchmark-storage-recalc branch February 24, 2020 17:07
General-Beck pushed a commit to General-Beck/substrate that referenced this pull request Mar 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). B0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants