Skip to content

Commit ef1597f

Browse files
authored
Measure time of all concretization steps (#266)
It is a very small and marginal change, but it might be helpful/interesting in certain situations knowing how much a concretization step took. Just as an example, this is how it looks like. ``` /usr/bin/time -f "\"%C\" took %e seconds." spack -e uenv_tools/ concretize -f ==> Concretized 1 spec: - ndag2eb squashfs@4.6.1+gzip~lz4~lzo~static~xz~zstd build_system=makefile default_compression=gzip platform=linux os=sles15 target=neoverse_v2 %c=gcc@14.2.0 [+] hcns3gf ^compiler-wrapper@1.0 build_system=generic platform=linux os=sles15 target=neoverse_v2 [e] f6ia2r5 ^gcc@14.2.0~binutils+bootstrap~graphite~mold~nvptx~piclibs~profiled~strip build_system=autotools build_type=RelWithDebInfo languages:='c,c++,fortran' platform=linux os=sles15 target=aarch64 - c3kepa7 ^gcc-runtime@14.2.0 build_system=generic platform=linux os=sles15 target=neoverse_v2 [e] 3dm7s3r ^glibc@2.31 build_system=autotools platform=linux os=sles15 target=aarch64 - mkn24at ^gmake@4.4.1~guile build_system=generic platform=linux os=sles15 target=neoverse_v2 %c=gcc@14.2.0 - isykha5 ^zlib-ng@2.2.4+compat+new_strategies+opt+pic+shared build_system=autotools platform=linux os=sles15 target=neoverse_v2 %c,cxx=gcc@14.2.0 [+] 3uhzjpc ^gnuconfig@2024-07-27 build_system=generic platform=linux os=sles15 target=neoverse_v2 "spack -e uenv_tools/ concretize -f" took 30.76 seconds. ``` Mainly - concretization command is prefixed with the `time` command along with the output format - it uses `/usr/bin/time` instead of the shell builtin, so that a custom format can be specified - additional line for the message after the concretization step with the time measured
1 parent 3324d0c commit ef1597f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

stackinator/etc/Make.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ store:
1717

1818
# Concretization
1919
%/spack.lock: %/spack.yaml %/config.yaml %/packages.yaml
20-
$(SPACK_ENV) concretize -f
20+
/usr/bin/time -f '"%C" took %e seconds.' $(SPACK_ENV) concretize -f
2121

2222
# Generate Makefiles for the environment install
2323
%/Makefile: %/spack.lock

0 commit comments

Comments
 (0)