Skip to content

Commit

Permalink
docs(benchmark): update gas usage
Browse files Browse the repository at this point in the history
  • Loading branch information
smol-ninja committed Oct 18, 2024
1 parent 6101d4c commit 9bfe5d6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
9 changes: 7 additions & 2 deletions benchmark/Flow.Gas.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,17 @@ contract Flow_Gas_Test is Integration_Test {
);

// {flow.deposit}
computeGas("deposit", abi.encodeCall(flow.deposit, (streamId, DEPOSIT_AMOUNT_6D)));
computeGas(
"deposit", abi.encodeCall(flow.deposit, (streamId, DEPOSIT_AMOUNT_6D, users.sender, users.recipient))
);

// {flow.depositViaBroker}
computeGas(
"depositViaBroker",
abi.encodeCall(flow.depositViaBroker, (streamId, TOTAL_AMOUNT_WITH_BROKER_FEE_6D, defaultBroker))
abi.encodeCall(
flow.depositViaBroker,
(streamId, TOTAL_AMOUNT_WITH_BROKER_FEE_6D, users.sender, users.recipient, defaultBroker)
)
);

// {flow.pause}
Expand Down
22 changes: 11 additions & 11 deletions benchmark/results/SablierFlow.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

| Function | Gas Usage |
| ----------------------------- | --------- |
| `adjustRatePerSecond` | 44149 |
| `create` | 113659 |
| `deposit` | 30035 |
| `depositViaBroker` | 21953 |
| `pause` | 9522 |
| `refund` | 11894 |
| `restart` | 7013 |
| `void (solvent stream)` | 10038 |
| `void (insolvent stream)` | 37438 |
| `adjustRatePerSecond` | 44171 |
| `create` | 113681 |
| `deposit` | 32975 |
| `depositViaBroker` | 22732 |
| `pause` | 7522 |
| `refund` | 11939 |
| `restart` | 7036 |
| `void (solvent stream)` | 10060 |
| `void (insolvent stream)` | 37460 |
| `withdraw (insolvent stream)` | 57688 |
| `withdraw (solvent stream)` | 40156 |
| `withdrawMax` | 51966 |
| `withdraw (solvent stream)` | 38156 |
| `withdrawMax` | 51988 |

0 comments on commit 9bfe5d6

Please sign in to comment.