Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics for DIPS experiments #4940

Merged
merged 2 commits into from
Nov 9, 2023
Merged

Metrics for DIPS experiments #4940

merged 2 commits into from
Nov 9, 2023

Conversation

incrypto32
Copy link
Member

No description provided.

@incrypto32 incrypto32 self-assigned this Oct 26, 2023
@@ -103,7 +103,8 @@ fn ethereum_call(
abis: &[Arc<MappingABI>],
eth_call_gas: Option<u32>,
) -> Result<AscEnumArray<EthereumValueKind>, HostExportError> {
ctx.gas.consume_host_fn(ETHEREUM_CALL)?;
ctx.gas
.consume_host_fn_with_metrics(ETHEREUM_CALL, "ethereum_call")?;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a macro crate function_name! https://docs.rs/function_name/latest/function_name/

Which can be potentially used here instead of hardcoding then name. Thoughts?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nicest would be an enum for the gas ops, but you don't need to spend time refactoring that right now.

@incrypto32 incrypto32 marked this pull request as ready for review November 7, 2023 05:39
Copy link
Collaborator

@leoyvens leoyvens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Since this is off by default we don't have to think too hard about any performance impact.

@@ -103,7 +103,8 @@ fn ethereum_call(
abis: &[Arc<MappingABI>],
eth_call_gas: Option<u32>,
) -> Result<AscEnumArray<EthereumValueKind>, HostExportError> {
ctx.gas.consume_host_fn(ETHEREUM_CALL)?;
ctx.gas
.consume_host_fn_with_metrics(ETHEREUM_CALL, "ethereum_call")?;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nicest would be an enum for the gas ops, but you don't need to spend time refactoring that right now.

@incrypto32 incrypto32 merged commit 742da63 into master Nov 9, 2023
5 of 7 checks passed
@incrypto32 incrypto32 deleted the krishna/dips branch November 9, 2023 14:29
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.

2 participants