Skip to content

Commit

Permalink
tests: profile compute units in success cases
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec committed Oct 11, 2024
1 parent 4748ed8 commit 7025a96
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions program/tests/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ fn success() {
],
&[
Check::success(),
Check::compute_units(1_058),
Check::account(&program).data(&check_data).build(),
],
);
Expand Down Expand Up @@ -285,6 +286,7 @@ fn success() {
],
&[
Check::success(),
Check::compute_units(1_058),
Check::account(&program).data(&check_data).build(),
],
);
Expand Down Expand Up @@ -566,6 +568,7 @@ fn success_source_program() {
],
&[
Check::success(),
Check::compute_units(2_122),
Check::account(&program).data(&check_data).build(),
Check::account(&source).data(&[]).build(),
],
Expand Down Expand Up @@ -607,6 +610,7 @@ fn success_source_program() {
],
&[
Check::success(),
Check::compute_units(2_049),
Check::account(&program).data(&check_data).build(),
Check::account(&source).data(&[]).build(),
],
Expand Down
1 change: 1 addition & 0 deletions program/tests/finalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ fn success() {
],
&[
Check::success(),
Check::compute_units(967),
Check::account(&program).data(&check_data).build(),
],
);
Expand Down
1 change: 1 addition & 0 deletions program/tests/retract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ fn success() {
],
&[
Check::success(),
Check::compute_units(1_011),
Check::account(&program).data(&check_data).build(),
],
);
Expand Down
1 change: 1 addition & 0 deletions program/tests/transfer_authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ fn success() {
],
&[
Check::success(),
Check::compute_units(1_036),
Check::account(&program).data(&check_data).build(),
],
);
Expand Down
3 changes: 3 additions & 0 deletions program/tests/truncate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ fn success_initialization() {
],
&[
Check::success(),
Check::compute_units(1_122),
Check::account(&program).data(&check_data).build(),
],
);
Expand Down Expand Up @@ -462,6 +463,7 @@ fn success() {
],
&[
Check::success(),
Check::compute_units(1_218),
Check::account(&program).data(&check_data).build(),
],
);
Expand Down Expand Up @@ -494,6 +496,7 @@ fn success() {
],
&[
Check::success(),
Check::compute_units(1_466),
Check::account(&program).data(&check_data).build(),
Check::account(&destination)
.lamports(expected_destination_lamports)
Expand Down
2 changes: 2 additions & 0 deletions program/tests/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ fn success() {
],
&[
Check::success(),
Check::compute_units(1_039),
Check::account(&program).data(&check_data).build(),
],
);
Expand All @@ -247,6 +248,7 @@ fn success() {
],
&[
Check::success(),
Check::compute_units(1_193),
Check::account(&program).data(&check_data).build(),
],
);
Expand Down

0 comments on commit 7025a96

Please sign in to comment.