-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Per runtime benchmarks #490
Conversation
Coverage Report@@ Coverage Diff @@
## master girazoki-per-runtime-benchs +/- ##
===============================================================
- Coverage 65.38% 65.36% -0.02%
Files 68 68
+ Lines 10000 10001 +1
===============================================================
- Hits 6538 6537 -1
+ Misses 3462 3464 +2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Nice doc!
Using pallet_session and pallet_treasury in dancebox, many pallets in flashbox, and some pallets in templates:
|
// inject it into pallet-foreign-asset-creator. | ||
let asset_location = MultiLocation::new( | ||
0, | ||
X2(PalletInstance(50), GeneralIndex(u32::from(asset_id).into())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we define some constant and use it? That would ensure nobody accidentally modify this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will look into this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would you want this to be somewhere common to all runtimes? If so, I think this would leave in dancekit, and I would need to cherry-pick the change here. Maybe it's a cleanup we can do in a follow up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My idea actually is that we generate in foreign asset creator a benchmarking code that is called: register_foreign_asset_for_benchmarking
which would abstract all this. But again I think we can leave this for future PR
How does benchmark of a pallet as part of runtime and standalone differs? Apart from the configuration difference actual code is more or less same. |
+1 |
For pallet-session, there is really no benchmark we can do for now. The benchmarking code depends on pallet-session-historical and pallet-staking that we dont have. For the rest that you mention, I will take a look, it's probably that I forgot to add them. For pallet-hotfix-sufficients, I believe this is a pallet we should get rid of as it was introduced in moonbeam to fix a bug a long time ago. So it does not really matter if it uses official weights or not I would say, as it is going to dissaper |
Different runtimes might have different hooks for the same pallet. The benchmarking code is the same, but the surrounding conditions are different. And for each runtime, we can have different weights associated. What we call the "standalone" pallet benchmarking is basically a benchmarking that we dont trully care (as long as it's not generated against a mocked runtime obviously) against which runtime is used, nor if it is generated in the benchmarking server. It's only to generate the |
Adds specific benchmarks for each of the runtimes we host: flashbox, dancebox, simple-template and frontier-template. In order to do this:
As I advanced on this, I realized that our frontier template was not applying the 1e6 multiplier to all deposits/fees. I also fixed this plus adapted tests.
MIssing: