Skip to content

Commit 0847cec

Browse files
committed
tests: profile compute units in success cases
1 parent 14baeee commit 0847cec

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

program/tests/deploy.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,7 @@ fn success() {
670670
],
671671
&[
672672
Check::success(),
673+
Check::compute_units(19_893),
673674
Check::account(&program)
674675
.data(
675676
&bincode::serialize(&UpgradeableLoaderState::Program {

program/tests/initialize_buffer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ fn success() {
110110
],
111111
&[
112112
Check::success(),
113+
Check::compute_units(2_168),
113114
Check::account(&source)
114115
.lamports(100_000_000)
115116
.owner(&solana_loader_v3_program::id())

program/tests/write.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ fn success() {
209209
],
210210
&[
211211
Check::success(),
212+
Check::compute_units(1_419),
212213
Check::account(&buffer).data(&check_data).build(),
213214
],
214215
);
@@ -227,6 +228,7 @@ fn success() {
227228
],
228229
&[
229230
Check::success(),
231+
Check::compute_units(1_391),
230232
Check::account(&buffer).data(&check_data).build(),
231233
],
232234
);

0 commit comments

Comments
 (0)