Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Benchmark macro #4962

Merged
merged 24 commits into from
Feb 20, 2020
Merged

Benchmark macro #4962

merged 24 commits into from
Feb 20, 2020

Conversation

gavofyork
Copy link
Member

Fixes #4861

@gavofyork gavofyork added the A0-please_review Pull request needs code review. label Feb 18, 2020
@kianenigma
Copy link
Contributor

Will it still be possible, given this, to manually build the setup? There is a situation in #4947 that you can see and it cannot be really tracked with this benchmarking setup. One of the parameters is

Enum Mode {
   BenchMode1,
   BenchMode2, 
}

and stepping over this is not possible.

@marcio-diaz
Copy link
Contributor

marcio-diaz commented Feb 19, 2020

Will it still be possible, given this, to manually build the setup? There is a situation in #4947 that you can see and it cannot be really tracked with this benchmarking setup. One of the parameters is

Enum Mode {
   BenchMode1,
   BenchMode2, 
}

and stepping over this is not possible.

I think you can make two benchmarks out of the enum and refactor the common parts.

Copy link
Contributor

@marcio-diaz marcio-diaz left a comment

Choose a reason for hiding this comment

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

Looks good to me, very ergonomic. Maybe we want @shawntabrizi or @gavofyork to take a look to my changes (balances/benchmarking mostly) before merging.

@gnunicorn
Copy link
Contributor

So, the reports say that it consistently slightly improves on wasm but is sometimes a regression on native ... how do you want to proceed?

@marcio-diaz
Copy link
Contributor

So, the reports say that it consistently slightly improves on wasm but is sometimes a regression on native ... how do you want to proceed?

Wrong PR :)? I'll merge once CI finish, other benchmarks depend on this.

@marcio-diaz marcio-diaz merged commit 5135844 into master Feb 20, 2020
@marcio-diaz marcio-diaz deleted the gav-benchmarks-macro branch February 20, 2020 16:20
General-Beck pushed a commit to General-Beck/substrate that referenced this pull request Mar 4, 2020
* MAcro benchamrks

* Iterative macro

* Tidying it up.

* Macro improvements

* Bits..

* Last benchmaks.

* Repo benchmark macro

* Add the possibility of evaluating arbitrary expressions in a
benchmaark

* Better syntax and docs

* Update `BenchmarkParameter`

* Add `ignore` to sudo-code in docs

* First try of timestamp implementation.

* Fix macro docs, remove warnings.

* Use macro in balances pallet.

* Make some space in frame benchmarking.

* Remove _benchmarks_seed variable.

* Bump impl_version.

Co-authored-by: Shawn Tabrizi <[email protected]>
Co-authored-by: Marcio Diaz <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create macros to simplify benchmarking.
6 participants