Skip to content
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

fix calculate task id in benchmark verify block #403

Merged
merged 1 commit into from
Aug 5, 2023
Merged

Conversation

v9n
Copy link
Member

@v9n v9n commented Aug 5, 2023

@chrisli30 @imstar15 sorry for the last minute PR. I discovered this when attempting to run the benchmark.

depend on where we run, in unit test or in benchmark, the amount of initial event will be different, instead of hard code a number as before which make the verify cannot pass both of benchmark/unitest, we dynamically get the event count from initial events in the block to calculate task id.

this way the verify works for both of benchmark/unittest

Upon fixing both of unitest are pass and benchmark is run succesfully locally

Min Squares Analysis
========
-- Extrinsic Time --

Model:
Time ~=       16
              µs

Reads = 1
Writes = 1
Recorded proof Size = 8942

Created file: "./pallets/automation-time/src/raw-weights.rs"

depend on where we run, in unit test or in benchmark, the amount of
initial event will be different, instead of hard code a number as before
which make the verify cannot pass both of benchmark/unitest, we
dynamically get the event count from initial events in the block to
calculate task id.

this way the `verify` works for both of benchmark/unittest
@v9n v9n requested review from chrisli30 and imstar15 August 5, 2023 00:51
Copy link
Member

@chrisli30 chrisli30 left a comment

Choose a reason for hiding this comment

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

oh yeah this totally makes sense 👌

@v9n v9n merged commit cd9b3e6 into master Aug 5, 2023
@v9n v9n deleted the fix-benchmark-verify branch August 5, 2023 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants