nuke icon indicating copy to clipboard operation
nuke copied to clipboard

Parallel target execution / Progress information in console

Open tunger opened this issue 4 years ago • 4 comments

This implements #162 and #107.

Main changes

  • Redirect Logger output to InMemoryLogger instances per thread.
  • Adds two build strategies: sequential and parallel
  • Adds progress reporters:
    • Progress bar (ShellProgressBar) when running as console (i.e. not on redirected outputs)
    • Log per target: when running parallel on redirected outputs
    • Continuous: write logs as they come (current behavior)
  • Adds BuildTimeEstimator to get sense of progress.

Usage

Opt-in to parallel build: Use ExecuteAsync in your NukeBuild class instead of Execute. Furthermore, if you provide the flag --no-parallel, it will always run sequentially.

Logger usage remains the same and is agnostic of threading from the view of the caller.

Open

  • Test performance impact of progress bar.
  • If there are lots of invoked targets, the progress bar grows from bottom of the terminal upwards, overwriting initial output.
  • ParallelExecutionPlanner can very likely be improved.
  • Commit 1b74097 is a fix for current problems on develop and can be removed afterwards.

I confirm that the pull-request:

  • [x] Follows the contribution guidelines
  • [x] Is based on my own work
  • [x] Is in compliance with my employer

tunger avatar Jun 23 '20 18:06 tunger

@matkoch please have a look at it if it is usable. It gets harder to keep it in sync with develop-branch and I consider it done from my part.

tunger avatar Jul 04 '20 14:07 tunger

I'm about to prepare the 0.25.0 release. Don't worry about develop. I will rebase this by myself. I'm planning to merge it for 0.26.0 then, but it could take some time.

matkoch avatar Jul 04 '20 14:07 matkoch

Alright, thanks. Should you need a version of this branch before I rebased it let me know and I can restore it from my local computer - in case I accidently broke something.

tunger avatar Jul 04 '20 14:07 tunger

@tunger planned for v0.26.0 ... no worries about the conflicts.

matkoch avatar Oct 27 '20 15:10 matkoch