mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-21 15:01:16 -03:00
Add a separate --profile-startup option to profile startup
This goes to a separate file because that makes option parsing easier and allows profiling both at the same time. The "normal" profile now contains only the profile data of the actual run, which is much more useful - you can now profile a function by running fish -C 'source /path/to/thing' --profile /tmp/thefunction.prof -c 'thefunction' and won't need to filter out extraneous information.
This commit is contained in:
@@ -272,6 +272,10 @@ static void print_profile(const std::deque<profile_item_t> &items, FILE *out) {
|
||||
}
|
||||
}
|
||||
|
||||
void parser_t::clear_profiling() {
|
||||
profile_items.clear();
|
||||
}
|
||||
|
||||
void parser_t::emit_profiling(const char *path) const {
|
||||
// Save profiling information. OK to not use CLO_EXEC here because this is called while fish is
|
||||
// exiting (and hence will not fork).
|
||||
|
||||
Reference in New Issue
Block a user