-
Notifications
You must be signed in to change notification settings - Fork 999
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
Conversation
d614c89
to
5fa9c3f
Compare
@@ -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")?; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this 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")?; |
There was a problem hiding this comment.
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.
No description provided.