summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin.mock/packages/dev-build-test-install-phases/package.py
diff options
context:
space:
mode:
authorVanessasaurus <814322+vsoch@users.noreply.github.com>2021-06-22 03:01:15 -0600
committerGitHub <noreply@github.com>2021-06-22 03:01:15 -0600
commit8e249c03de44f474cc9efe9380f4fbb15121b317 (patch)
tree6e528a5f1378ba662c509ec2f76f155c93681418 /var/spack/repos/builtin.mock/packages/dev-build-test-install-phases/package.py
parent726537e01b1a41124caadb0b4dc192d306832cf7 (diff)
downloadspack-8e249c03de44f474cc9efe9380f4fbb15121b317.tar.gz
spack-8e249c03de44f474cc9efe9380f4fbb15121b317.tar.bz2
spack-8e249c03de44f474cc9efe9380f4fbb15121b317.tar.xz
spack-8e249c03de44f474cc9efe9380f4fbb15121b317.zip
adding save of build times on install (#24350)
Here we are adding an install_times.json into the spack install metadata folder. We record a total, global time, along with the times for each phase. The type of phase or install start / end is included (e.g., build or fail) Signed-off-by: vsoch <vsoch@users.noreply.github.com> Co-authored-by: vsoch <vsoch@users.noreply.github.com>
Diffstat (limited to 'var/spack/repos/builtin.mock/packages/dev-build-test-install-phases/package.py')
-rw-r--r--var/spack/repos/builtin.mock/packages/dev-build-test-install-phases/package.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/dev-build-test-install-phases/package.py b/var/spack/repos/builtin.mock/packages/dev-build-test-install-phases/package.py
new file mode 100644
index 0000000000..7957325d21
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/dev-build-test-install-phases/package.py
@@ -0,0 +1,30 @@
+# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from time import sleep
+
+
+class DevBuildTestInstallPhases(Package):
+ homepage = "example.com"
+ url = "fake.com"
+
+ version('0.0.0', sha256='0123456789abcdefgh')
+
+ phases = ['one', 'two', 'three', 'install']
+
+ def one(self, spec, prefix):
+ sleep(1)
+ print("One locomoco")
+
+ def two(self, spec, prefix):
+ sleep(2)
+ print("Two locomoco")
+
+ def three(self, spec, prefix):
+ sleep(3)
+ print("Three locomoco")
+
+ def install(self, spec, prefix):
+ print("install")