Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Support different method call scenarios #272

Open
drortirosh opened this issue Jan 16, 2022 · 2 comments
Open

Support different method call scenarios #272

drortirosh opened this issue Jan 16, 2022 · 2 comments

Comments

@drortirosh
Copy link

First, I must say its an easy, intuitive tool for gas reporting.
Minimal configuration to get result.

But sometimes, you do need explicit configuration:
I have a method I want to test is different scenarios, and not average them all into a single number

e.g. I want the output like:

·················|····················|·············|·············|·············|···············|··············
|  Contract      ·  Method            ·  Min        ·  Max        ·  Avg        ·  # calls      ·  eur (avg)  │
·················|····················|·············|·············|·············|···············|··············
|  MyContract    ·  myMethod          ·      29600  ·      46700  ·      35300  ·            3  ·          -  │
·················|····················|·············|·············|·············|···············|··············
|  MyContract    ·  myMethod (heavy)  ·      70393  ·      87469  ·      76097  ·            3  ·          -  │
·················|····················|·············|·············|·············|···············|··············

Maybe it can be done by adding to specific tests:

methodUseCase(myContract, "myMethod", "heavy")
@cgewecke
Copy link
Owner

Ah! This is a good idea. Will think about how this could be done....

@Martibis
Copy link

Martibis commented Jan 20, 2022

Just came here to suggest the same thing, one clear usecase would be testing NFT mints where (e.g.: 1 mint vs 10 mints) from the same method would have a big difference in gas cost. I'd like to see the output for each separate call rather than the avg.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants