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

Benchmark derived task scheduling weight function (on development) #1140

Closed

Conversation

4meta5
Copy link
Contributor

@4meta5 4meta5 commented Sep 20, 2024

Closes #1138

big improvement on accuracy and maintainability of weights returned in tasks on-initialize wherein task scheduling happens

this is the same as #1139 but it is done and ready for review, the other PR is on top of broken benchmarks for now

@4meta5 4meta5 added ready-for-review PR author(s) done with coding and reviewer[s] can start !ci-benchmark Benchmark and commit new weights benchmarking labels Sep 20, 2024
@4meta5 4meta5 added this to the Milestone Q3 2024 milestone Sep 20, 2024
@4meta5 4meta5 requested a review from dvc94ch September 20, 2024 20:25
@4meta5 4meta5 self-assigned this Sep 20, 2024
@4meta5 4meta5 changed the title Benchmark derived task scheduling benchmarks Benchmark derived task scheduling weight function (on development) Sep 20, 2024
.saturating_add(Self::schedule_tasks_shard(network, shard, tasks_for_shard))
// READS: ShardTasks
.saturating_add(T::DbWeight::get().reads(1));
Self::schedule_tasks_shard(network, shard, tasks_for_shard);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

do not return Weight from this inner function

would be better to return the number of tasks actually assigned to the shard (to be added to num_tasks_assigned accumulator below)

@4meta5
Copy link
Contributor Author

4meta5 commented Sep 21, 2024

cc @penumbra23 @dvc94ch CI error is:

Run ./timechain-node benchmark pallet --chain development --pallet pallet_networks --extrinsic '*' --output ./weights/networks.rs
2024-09-21 02:44:35 Using the chain spec instead of the runtime to generate the genesis state is deprecated. Please remove the `--chain`/`--dev`/`--local` argument, point `--runtime` to your runtime blob and set `--genesis-builder=runtime`. This warning may become a hard error any time after December 2024.    
Error: Input("The runtime returned an error when trying to build the genesis storage. Please ensure that all pallets define a genesis config that can be built. This can be tested with: [https://github.com/paritytech/polkadot-sdk/pull/3412\nError:](https://github.com/paritytech/polkadot-sdk/pull/3412/nError:) wasm call error Other: Exported method GenesisBuilder_get_preset is not found")

@4meta5
Copy link
Contributor Author

4meta5 commented Sep 25, 2024

We are doing v2

@4meta5 4meta5 closed this Sep 25, 2024
@4meta5 4meta5 deleted the amar-benchmark-derived-schedule-tasks-benchmarking2 branch September 25, 2024 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!ci-benchmark Benchmark and commit new weights ready-for-review PR author(s) done with coding and reviewer[s] can start
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix weight accounting in task scheduling (in on-initialize)
1 participant