pash icon indicating copy to clipboard operation
pash copied to clipboard

Adding a warning/info message when nothing was parallelized successfully

Open angelhof opened this issue 1 year ago • 3 comments

It might be a good idea to add a few warning/info messages to help set user expectations when running PaSh. In particular to give some intuition to the user about why they didn't get any benefits through PaSh. Some categories that I can think of which are highly relevant are:

  1. No part of the input script was parallelized. Do you have annotations for the commands in your scripts? Are you using many custom functions?
  2. The script execution was very short (<5s) to see benefits with PaSh. Maybe try running a script that takes longer?
  3. Some fragments of the input script were parallelized, but none of them took more than 1s of execution so PaSh hasn't managed to speed things up. We could follow up all these messages with a suggestion to use -d 1 to see more about what was parallelized and what not and get some guidance into the issues.

angelhof avatar Oct 12 '24 00:10 angelhof

Hi! I’d like to take this on. Looking through the code, I think a good way to implement this would be as a method that’s called when the compilation server is done. I can send in a PR sometime in the next few days.

BolunThompson avatar Nov 06 '24 00:11 BolunThompson

Sounds great, go for it and ping me to review when you have something done :)

angelhof avatar Nov 06 '24 17:11 angelhof

Partially addressed by #731. In a separate PR we can refine this to have a new flag to print out [PaSh WARNING] messages for all commands for which we don't have annotations. This could either be another debug level (stricter than -d 1), or a new flag (e.g., --warn-missing-annotations) that is subsumed by -d 1 and prints warnings for all missing annotations.

angelhof avatar Nov 18 '24 01:11 angelhof