Skip to content

Add CU instrumentation option#3872

Closed
jamie-osec wants to merge 3 commits intosolana-foundation:masterfrom
jamie-osec:instrument-cus
Closed

Add CU instrumentation option#3872
jamie-osec wants to merge 3 commits intosolana-foundation:masterfrom
jamie-osec:instrument-cus

Conversation

@jamie-osec
Copy link
Copy Markdown
Collaborator

Closes #151

When passing --instrument-compute-units, insert logging after each statement in instruction handlers:

sol_log("Executing `<statement>`;");
 sol_log_compute_units();

@vercel
Copy link
Copy Markdown

vercel bot commented Aug 21, 2025

@jamie-osec is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@nutafrost nutafrost moved this to In Progress in Anchor 1.0 Aug 22, 2025
@nutafrost nutafrost moved this from In Progress to Security Review Required in Anchor 1.0 Aug 22, 2025
@nutafrost nutafrost removed this from Anchor 1.0 Aug 22, 2025
@jamie-osec
Copy link
Copy Markdown
Collaborator Author

I'm not fully convinced this is the best approach - using rustc's own (potentially currently unstable) instrumentation options could be a lot less fragile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cli, lang: Add compute units logging

2 participants