-
Notifications
You must be signed in to change notification settings - Fork 30
Add harnesses to profile with stackprof and vernier #316
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
Auto install the gems outside of any gems the benchmark might require. Save the file to the data dir and show a report when finished.
| BOOLS = {"true" => true, "false" => false} | ||
| def bool!(val) | ||
| case val | ||
| when TrueClass, FalseClass | ||
| val | ||
| else | ||
| BOOLS.fetch(val) { raise ArgumentError, "must be 'true' or 'false'" } | ||
| end | ||
| end |
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.
This is a good initiative. However, I feel like the code you write (in general) could use more commenting. I'll try to give some specific examples.
Can you add a comment here explaining what this method is used for?
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.
Yeah, you're right. I'm accustomed to having to read the code to figure out what it's actually doing, but I shouldn't make other people do the same :)
|
Does that seem like a good level of commenting? |
Sure this seems good. Thank you :) |
Auto install the gems outside of any gems the benchmark might require.
Save the file to the data dir and show a report when finished.
I've been using this to get allocation info:
You can then run further stackprof analysis on the file shown at the end.