-
Notifications
You must be signed in to change notification settings - Fork 0
Benchmark top 50 methods #1
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
Conversation
|
export const ethGetTransactionReceipt = { | ||
name: "eth_getTransactionReceipt", | ||
params: [ | ||
"0xb0ccffb14e1e79f0b6c6ceec223bb4bbf6fc302ae76067f1f9225bae9d6f3fdc", |
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.
I'd also like to mention it here so it doesn't get lost. It's okay for specific parameters to be hard-coded (though they still should be configurable without touching this file).
- It should be possible to run benchmarks on both calibnet and mainnet.
- Tests should not break over time. This transaction will likely be unavailable on nodes bootstrapped with a minimal snapshot. This is a blocker for any real usage of this benchmark.
The limitations should be clearly stated in the README, not to give false impressions and allow potential users to resolve their issues more easily.
For now, let's at least group some of the parameters, especially those that appear a few times, into named constants.
} | ||
} | ||
|
||
function safeMethodName(methodName) { |
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.
Let's document the purpose of this function.
const methodTrends = {}; | ||
const methodErrors = {}; | ||
for (const method of allMethods) { | ||
const key = safeMethodName(method.name); | ||
if (!methodTrends[key]) { | ||
methodTrends[key] = new Trend(key); | ||
} | ||
if (!methodErrors[key]) { | ||
methodErrors[key] = new Rate(`_success_rate_${key}`); | ||
} | ||
} |
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.
Can you please add some comments around it? It's not clear from a quick glimpse what's the purpose of those collections.
Replaced by #2 |
No description provided.