Skip to content

Commit

Permalink
🛠️ Rework benchmarks (#374)
Browse files Browse the repository at this point in the history
## What?
- Fix and modify pallet-funding benchmarks post-simplification

## Why?
- Our benchmarks were overtly complicated, a result of the old logic.

## How?
- Fix syntax for new instantiator functions
- Simplify setup
- Delete old logic branches (e.g. no longer "unchanged" outcome for evaluator, no more benchmark for that)
- When 2 logic branches only had a small difference (e.g. 1 storage read/write), we now benchmark the worst case.

## Testing?
`cargo test --features runtime-benchmarks`
`just dry-run-benchmarks`
Keep in mind you need to do a cargo clean for it to work (dunno why)

## Anything Else?
Had to delete the runtime weights since the weight struct looks different. The runtime now uses the default `()` from the new weight file I generated in the pallet.

Soon we will generate the real pallet/runtime benchmarks in AWS
  • Loading branch information
JuaniRios authored Aug 23, 2024
1 parent cf121bb commit deeccca
Show file tree
Hide file tree
Showing 20 changed files with 1,236 additions and 4,278 deletions.
3 changes: 3 additions & 0 deletions integration-tests/src/tests/e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ fn funds_raised() {
excel_bidders(),
excel_contributions(),
excel_remainders(),
true,
);

inst.execute(|| {
Expand Down Expand Up @@ -430,6 +431,7 @@ fn ct_minted() {
excel_bidders(),
excel_contributions(),
excel_remainders(),
true,
);

for (contributor, expected_amount_fixed, project_id) in excel_ct_amounts() {
Expand All @@ -456,6 +458,7 @@ fn ct_migrated() {
excel_bidders(),
excel_contributions(),
excel_remainders(),
true,
);

for (contributor, expected_amount_fixed, project_id) in excel_ct_amounts() {
Expand Down
Loading

0 comments on commit deeccca

Please sign in to comment.