summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2023-10-23 10:26:20 +0200
committerGitHub <noreply@github.com>2023-10-23 10:26:20 +0200
commit96548047f881e474ee715b0502001d25df366637 (patch)
tree54441fbeb4b83ec6170eaddc04d48c1fcc127bea
parenta675156c70f6506498f95da587c73e220ecc65c5 (diff)
downloadspack-96548047f881e474ee715b0502001d25df366637.tar.gz
spack-96548047f881e474ee715b0502001d25df366637.tar.bz2
spack-96548047f881e474ee715b0502001d25df366637.tar.xz
spack-96548047f881e474ee715b0502001d25df366637.zip
concretizer verbose: show progress in % too (#40654)
-rw-r--r--lib/spack/spack/environment/environment.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py
index 51ea453c39..0b36351d4e 100644
--- a/lib/spack/spack/environment/environment.py
+++ b/lib/spack/spack/environment/environment.py
@@ -1518,11 +1518,14 @@ class Environment:
tty.msg(msg)
batch = []
- for i, concrete, duration in spack.util.parallel.imap_unordered(
- _concretize_task, args, processes=num_procs, debug=tty.is_debug()
+ for j, (i, concrete, duration) in enumerate(
+ spack.util.parallel.imap_unordered(
+ _concretize_task, args, processes=num_procs, debug=tty.is_debug()
+ )
):
batch.append((i, concrete))
- tty.verbose(f"[{duration:7.2f}s] {root_specs[i]}")
+ percentage = (j + 1) / len(args) * 100
+ tty.verbose(f"{duration:6.1f}s [{percentage:3.0f}%] {root_specs[i]}")
sys.stdout.flush()
# Add specs in original order