Should we add a benchmark in test dir? #875
Closed
andreivladbrg
started this conversation in
Ideas
Replies: 3 comments 1 reply
-
Good idea. Let's go with the first option and create a dedicated Adding functions at the end of each existing contract would clog up the tests, and it would make it difficult to integrate with Bulloak in the future. |
Beta Was this translation helpful? Give feedback.
1 reply
-
This is also be a pre-requirement for #872 since #872 requires gas calculations in order to compute max count of segments/tranches. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Created the issue: #876 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As per a private discussion with @smol-ninja, we agreed that it would be a good idea to add a benchmark for gas usage to all relevant functions:
createWithDurations
,createWithTimestamps
,withdraw
,cancel
, etc.Now, the question is: where would be the best place to include them? I can think of two options:
Note: It would be a good idea to name the benchmark tests in a consistent manner, like
testGas_FunctionName
, so that we can run a specific CLI command to obtain them:forge t --mt "testGas"
@PaulRBerg, what do you say?
Beta Was this translation helpful? Give feedback.
All reactions