Allow profiling without startup time#7648
Conversation
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.
|
Sounds like a good idea though I can't comment on the implementation. |
|
Oh the implementation is simple enough. It's the UI I'm not completely sure about - this changes So before Now, it only shows the time for The alternative is to add a Or keep |
|
I'd change it, it's not a common use-case and it makes more sense this way. |
Description
Currently, profiling a command is a bit annoying, as you need to ignore a whole bunch of extraneous information related to fish's startup.
This changes it so
fish --profileonly writes profiling information from after startup - anything after reading the config and before executing the postconfig commands (I'm open to suggestions for a different cut-off point), and introduces a different--profile-startupoption for profiling anything before.TODOs: