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

[parachain-template] benchmarks into mod benchmarks #3818

Merged

Conversation

asiniscalchi
Copy link
Contributor

@asiniscalchi asiniscalchi commented Mar 25, 2024

This PR introduces a dedicated module for benchmarks within the parachain runtime. By segregating benchmarks into their own module, we achieve a cleaner project structure and improved readability, facilitating easier maintenance and updates.

Key Changes:

  • New Benchmarks Module: A new file benchmarks.rs is added, encapsulating the benchmarking code for various pallets.
  • Refactoring lib.rs: The main runtime library file (lib.rs) has been updated to reflect the extraction of benchmark definitions. By moving these definitions to benchmarks.rs, we reduce clutter in lib.rs, streamlining the runtime's core logic and configuration.

Benefits of This Refactoring:

  • Focused Benchmarking: Developers can now easily locate and modify benchmarks without navigating through the core runtime logic, enabling targeted performance improvements.
  • Cleaner Codebase: Segregating benchmarks from the main runtime logic helps maintain a clean, well-organized codebase, simplifying navigation and maintenance.
  • Scalability: As the parachain evolves, adding or updating benchmarks becomes more straightforward, supporting scalability and adaptability of the runtime.

Summary of Changes:

  • Created benchmarks.rs to house the benchmarking suite.
  • Streamlined lib.rs by removing the inlined benchmark definitions and linking to the new benchmarks module.

@asiniscalchi asiniscalchi changed the title benchmarks in module [parachain-template] benchmarks in module Mar 25, 2024
@asiniscalchi asiniscalchi changed the title [parachain-template] benchmarks in module [parachain-template] dedicated Benchmarks Module Mar 25, 2024
@asiniscalchi asiniscalchi marked this pull request as ready for review March 25, 2024 07:58
@asiniscalchi asiniscalchi changed the title [parachain-template] dedicated Benchmarks Module [parachain-template] benchmarks into mod benchmarks Mar 25, 2024
Copy link
Member

@ggwpez ggwpez left a comment

Choose a reason for hiding this comment

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

I dont see the value in this change.

Please consider that reviewers have very limited. This time can either be spent on reviewing important changes, or it can be wasted with unimportant changes. Either way; it is a limited resource, that must be deployed wisely for a best overall outcome.

Copy link
Member

@ggwpez ggwpez left a comment

Choose a reason for hiding this comment

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

Okay approving as it could help new teams, please excuse my prior comment. It looked quite AI generated.

@asiniscalchi
Copy link
Contributor Author

@bkchr ping :)

// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
//
// For more information, please refer to <http://unlicense.org>
Copy link
Member

Choose a reason for hiding this comment

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

It says MIT license in the Cargo.toml? Not sure what is right, maybe the unlicense is right.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://github.com/paritytech/polkadot-sdk/blob/master/templates/parachain/LICENSE

maybe a user story ( issue ) will force a resolution

@asiniscalchi
Copy link
Contributor Author

asiniscalchi commented Mar 28, 2024

@asiniscalchi
Copy link
Contributor Author

@kianenigma maybe this will make sense as part of #3819

@asiniscalchi
Copy link
Contributor Author

@kianenigma I think T0 is missing

@kianenigma kianenigma added the R0-silent Changes should not be mentioned in any release notes label Apr 2, 2024
@asiniscalchi
Copy link
Contributor Author

@kianenigma ... last merge step

@kianenigma kianenigma added this pull request to the merge queue Apr 5, 2024
Merged via the queue into paritytech:master with commit 33bbdb3 Apr 5, 2024
131 of 133 checks passed
paritytech-ci pushed a commit that referenced this pull request Apr 5, 2024
This PR introduces a dedicated module for benchmarks within the
parachain runtime. By segregating benchmarks into their own module, we
achieve a cleaner project structure and improved readability,
facilitating easier maintenance and updates.

### Key Changes:
- **New Benchmarks Module**: A new file `benchmarks.rs` is added,
encapsulating the benchmarking code for various pallets.
- **Refactoring `lib.rs`**: The main runtime library file (`lib.rs`) has
been updated to reflect the extraction of benchmark definitions. By
moving these definitions to `benchmarks.rs`, we reduce clutter in
`lib.rs`, streamlining the runtime's core logic and configuration.

### Benefits of This Refactoring:
- **Focused Benchmarking**: Developers can now easily locate and modify
benchmarks without navigating through the core runtime logic, enabling
targeted performance improvements.
- **Cleaner Codebase**: Segregating benchmarks from the main runtime
logic helps maintain a clean, well-organized codebase, simplifying
navigation and maintenance.
- **Scalability**: As the parachain evolves, adding or updating
benchmarks becomes more straightforward, supporting scalability and
adaptability of the runtime.

### Summary of Changes:
- Created `benchmarks.rs` to house the benchmarking suite.
- Streamlined `lib.rs` by removing the inlined benchmark definitions and
linking to the new benchmarks module.

---------

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Ank4n pushed a commit that referenced this pull request Apr 9, 2024
This PR introduces a dedicated module for benchmarks within the
parachain runtime. By segregating benchmarks into their own module, we
achieve a cleaner project structure and improved readability,
facilitating easier maintenance and updates.

### Key Changes:
- **New Benchmarks Module**: A new file `benchmarks.rs` is added,
encapsulating the benchmarking code for various pallets.
- **Refactoring `lib.rs`**: The main runtime library file (`lib.rs`) has
been updated to reflect the extraction of benchmark definitions. By
moving these definitions to `benchmarks.rs`, we reduce clutter in
`lib.rs`, streamlining the runtime's core logic and configuration.

### Benefits of This Refactoring:
- **Focused Benchmarking**: Developers can now easily locate and modify
benchmarks without navigating through the core runtime logic, enabling
targeted performance improvements.
- **Cleaner Codebase**: Segregating benchmarks from the main runtime
logic helps maintain a clean, well-organized codebase, simplifying
navigation and maintenance.
- **Scalability**: As the parachain evolves, adding or updating
benchmarks becomes more straightforward, supporting scalability and
adaptability of the runtime.

### Summary of Changes:
- Created `benchmarks.rs` to house the benchmarking suite.
- Streamlined `lib.rs` by removing the inlined benchmark definitions and
linking to the new benchmarks module.

---------

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
dharjeezy pushed a commit to dharjeezy/polkadot-sdk that referenced this pull request Apr 9, 2024
This PR introduces a dedicated module for benchmarks within the
parachain runtime. By segregating benchmarks into their own module, we
achieve a cleaner project structure and improved readability,
facilitating easier maintenance and updates.

### Key Changes:
- **New Benchmarks Module**: A new file `benchmarks.rs` is added,
encapsulating the benchmarking code for various pallets.
- **Refactoring `lib.rs`**: The main runtime library file (`lib.rs`) has
been updated to reflect the extraction of benchmark definitions. By
moving these definitions to `benchmarks.rs`, we reduce clutter in
`lib.rs`, streamlining the runtime's core logic and configuration.

### Benefits of This Refactoring:
- **Focused Benchmarking**: Developers can now easily locate and modify
benchmarks without navigating through the core runtime logic, enabling
targeted performance improvements.
- **Cleaner Codebase**: Segregating benchmarks from the main runtime
logic helps maintain a clean, well-organized codebase, simplifying
navigation and maintenance.
- **Scalability**: As the parachain evolves, adding or updating
benchmarks becomes more straightforward, supporting scalability and
adaptability of the runtime.

### Summary of Changes:
- Created `benchmarks.rs` to house the benchmarking suite.
- Streamlined `lib.rs` by removing the inlined benchmark definitions and
linking to the new benchmarks module.

---------

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants