-
Notifications
You must be signed in to change notification settings - Fork 332
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
Add in a more helpful usage message to allocator_tutorial. #409
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@clalancette why not turning this into a usage message, only shown if
--help
or-h
are present?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 main reason I wanted to print this at startup time is that running the binary is quite silent:
(it only prints a single debugging message). Unless you go look at the code, it isn't clear at all what this tutorial is supposed to do, or what users should expect to happen. So I thought that unconditionally printing this message would help future testers not ask the same question.
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.
Could we maybe say what the expected results would be? Like if you are using
intra
you would expect allocations to be lower?Since this is just a demo, I feel like erring on the side of more verbosity is quite alright.
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 just tested out the difference between running with 'intra' and without. I ran the tutorial for 10 seconds, using the following command:
This causes the tutorial to generate on average 4089 calls to global new and 13522 calls to allocator new.
If I instead run:
This cause the tutorial to generate on average 3910 calls to global new and 13588 calls to allocator new. So with intra-process there are fewer calls to the global one, but there are more calls to the allocator one. Also, the difference is probably in the noise, since I wasn't on a "quiet" system.
Thus, I don't think we can say too much about the allocations. I'd say we can probably go forward with this as-is.
I'll run CI on it just to make sure I didn't mess something obvious up.
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.
Related ticket: #292