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

bench syntax v2: run test in single functions #376

Closed
Tracked by #1428 ...
ggwpez opened this issue Mar 28, 2023 · 6 comments · Fixed by #3574
Closed
Tracked by #1428 ...

bench syntax v2: run test in single functions #376

ggwpez opened this issue Mar 28, 2023 · 6 comments · Fixed by #3574
Assignees
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D1-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. T12-benchmarks This PR/Issue is related to benchmarking and weights.

Comments

@ggwpez
Copy link
Member

ggwpez commented Mar 28, 2023

The v2 benchmark tests are running in one single function instead of one function per bench case.

Current output:

test benchmark_tests::test_benchmarks ... ok

Output that we want:

test benchmarking::bench_sort_vector ... ok
test benchmarking::bench_accumulate_dummy ... ok
test benchmarking::bench_set_dummy_benchmark ... ok

It is probably using this wrong expansion arm here:
https://github.com/paritytech/substrate/blob/2e535bac47f48d816f94b105715e09dc57ed52b0/frame/benchmarking/src/v1.rs#L541

instead of:
https://github.com/paritytech/substrate/blob/2e535bac47f48d816f94b105715e09dc57ed52b0/frame/benchmarking/src/v1.rs#L508

@ggwpez ggwpez changed the title v2 bench syntax: run test in single files bench syntax v2: run test in single functions Mar 28, 2023
@sam0x17 sam0x17 self-assigned this Apr 10, 2023
@NingLin-P
Copy link

Friendly ping, we are using the bench syntax v2 in https://github.com/subspace/subspace, and this feature is highly desired by our usage.

@ggwpez
Copy link
Member Author

ggwpez commented May 1, 2023

Okay thanks for the feedback @NingLin-P, will look into it soon.
Feel free to post additional feedback into #380, since the syntax is not finalized yet.

@juangirini juangirini transferred this issue from paritytech/substrate Aug 24, 2023
@the-right-joyce the-right-joyce added T10-tests This PR/Issue is related to tests. and removed I5-tests labels Aug 25, 2023
@JuaniRios
Copy link
Contributor

Would like to have this as well in our codebase at Polimec

@sam0x17
Copy link
Contributor

sam0x17 commented Sep 14, 2023

This will most likely be a top priority for me once #1343 is done

@ggwpez ggwpez added C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D1-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. T12-benchmarks This PR/Issue is related to benchmarking and weights. and removed T10-tests This PR/Issue is related to tests. labels Feb 4, 2024
@pandres95
Copy link
Contributor

@ggwpez I already started solving this issue.

@pandres95
Copy link
Contributor

@ggwpez PR's ready for review.

github-merge-queue bot pushed a commit that referenced this issue Mar 8, 2024
Closes #376

---------

Co-authored-by: command-bot <>
bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this issue Mar 25, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* substrate-relay: initial commit

* MillauHeaderApi and RialtoHeaderApi

* post-merge fixes + TODOs + compilation
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* substrate-relay: initial commit

* MillauHeaderApi and RialtoHeaderApi

* post-merge fixes + TODOs + compilation
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* substrate-relay: initial commit

* MillauHeaderApi and RialtoHeaderApi

* post-merge fixes + TODOs + compilation
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* substrate-relay: initial commit

* MillauHeaderApi and RialtoHeaderApi

* post-merge fixes + TODOs + compilation
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* substrate-relay: initial commit

* MillauHeaderApi and RialtoHeaderApi

* post-merge fixes + TODOs + compilation
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* substrate-relay: initial commit

* MillauHeaderApi and RialtoHeaderApi

* post-merge fixes + TODOs + compilation
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* substrate-relay: initial commit

* MillauHeaderApi and RialtoHeaderApi

* post-merge fixes + TODOs + compilation
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* substrate-relay: initial commit

* MillauHeaderApi and RialtoHeaderApi

* post-merge fixes + TODOs + compilation
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
* substrate-relay: initial commit

* MillauHeaderApi and RialtoHeaderApi

* post-merge fixes + TODOs + compilation
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
* substrate-relay: initial commit

* MillauHeaderApi and RialtoHeaderApi

* post-merge fixes + TODOs + compilation
jonathanudd pushed a commit to jonathanudd/polkadot-sdk that referenced this issue Apr 10, 2024
* substrate-relay: initial commit

* MillauHeaderApi and RialtoHeaderApi

* post-merge fixes + TODOs + compilation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D1-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. T12-benchmarks This PR/Issue is related to benchmarking and weights.
Projects
Development

Successfully merging a pull request may close this issue.

6 participants