summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2017-05-01 14:32:33 -0700
committerGitHub <noreply@github.com>2017-05-01 14:32:33 -0700
commit094d47bff15b67d6e04b9fedf0637f3a2767cf1a (patch)
tree4422c134cf293a307bd61594b3d5679240ae2778 /share
parentc86b53a73fca0a7d14b5a44c69034bbdd619025e (diff)
downloadspack-094d47bff15b67d6e04b9fedf0637f3a2767cf1a.tar.gz
spack-094d47bff15b67d6e04b9fedf0637f3a2767cf1a.tar.bz2
spack-094d47bff15b67d6e04b9fedf0637f3a2767cf1a.tar.xz
spack-094d47bff15b67d6e04b9fedf0637f3a2767cf1a.zip
Allow user to specify profile sort column on the command line. (#4056)
- Add -P <STAT> argument so that caller can specify a sort column for cProfile. Can specify multiple columns with commas. e.g.: spack -P cumtime,module - Add --lines option to Spack spec to control number of profile lines displayed - Sort by time by default (because it works in all Python versions) - Show sort column options in command help. - Do a short profile run in the unit tests.
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/qa/run-unit-tests3
1 files changed, 3 insertions, 0 deletions
diff --git a/share/spack/qa/run-unit-tests b/share/spack/qa/run-unit-tests
index 7e300280ff..fe2ec6f54a 100755
--- a/share/spack/qa/run-unit-tests
+++ b/share/spack/qa/run-unit-tests
@@ -20,6 +20,9 @@ cd "$SPACK_ROOT"
# Print compiler information
spack config get compilers
+# Profile and print top 20 lines for a simple call to spack spec
+${coverage_run} bin/spack -p --lines 20 spec mpileaks
+
# Run unit tests with code coverage
${coverage_run} bin/spack test "$@"
${coverage_combine}