Commit graph

19 commits

Author SHA1 Message Date
David Bremner
6a20478abb perf-test: add option to run perf
Although the generation of perf data is not as slow as valgrind, it
seems simplest to re-use the machinery already there to save the logs
in a timestamped subdirectory.
2021-04-28 08:49:07 -03:00
David Bremner
1e4e8e3bf5 test: unbreak performance tests
In 8e7fb88237 Jani replaced the use of $(pwd -P) to find the
TEST_DIRECTORY in order to better support out of tree
builds. Unfortunately the performance-tests need a different value for
the variable and were thus broken.

This commit splits out the setting of this variable for the two sets
of tests.  Performance tests still don't work out of tree, because
the handling of the downloaded corpus needs to be updated.
2017-12-04 21:04:38 -04:00
Jani Nikula
2e16b05152 perf-test: use source and build paths in perf-test-lib.sh
Make a distinction between source and build directories.
2017-10-20 19:54:22 -03:00
David Bremner
0c8ce66ef4 perf-test: use 'eval' in memory_run
This allows the use of redirection in the tests
2017-03-18 13:34:32 -03:00
Tomi Ollila
02a2eeb427 test: make script exit (1) if it "fails" to source (.) a file
The files (test) scripts source (with builtin command `.`) provides
information which the scripts depend, and without the `source` to
succeed allowing script to continue may lead to dangerous situations
(e.g. rm -rf "${undefined_variable}"/*).

At the end of all source (.) lines construct ' || exit 1' was added;
In our case the script script will exit if it cannot find (or read) the
file to be sourced. Additionally script would also exits if the last
command of the sourced file exited nonzero.
2015-08-07 21:56:39 +02:00
J. Lewis Muir
d08af93c65 cli: change "setup" to "set up" where used as a verb
The word "setup" is a noun, not a verb.  Change occurrences of "setup"
where used as a verb to "set up".
2015-05-31 19:14:42 +02:00
David Bremner
8fcc3260a9 perf-test: use command line arguments for directories
It seems that between version 1.26 and 1.27 of gnu tar, directories to
be extracted read with --files-from are no longer recursively extacted.
This patch puts them on the command line instead.
2014-03-14 21:47:43 -03:00
David Bremner
2de8ce9b37 perf-test: bump version to 0.4, use manifest files
The new revision of the performance test includes manifests for each corpus,
so update the support library to use these manifests at the same time.
2013-12-10 04:00:38 +08:00
David Bremner
8d05dcfffe perf-test: initial support for talloc leak report in memory tests
As with the valgrind logs, we print a (very) brief summary and leave
the log for inspection.
2012-12-30 21:12:11 -04:00
David Bremner
098ef4af4d perf-test: initial version of memory test infrastructure.
The idea is run some code under valgrind --leak-check=full and report
a summary, leaving the user to peruse the log file if they want.

We go to some lengths to preserve the log files from accidental
overwriting; the full corpus takes about 3 hours to run under valgrind
on my machine.

The naming of the log directories may be slightly controversial; in
the unlikely event of two runs in less than a second, the log will be
overwritten. A previous version with mktemp+timestamp was dismissed as
overkill; just mktemp alone does not sort nicely.

One new test is included, to check notmuch new for memory leaks.
2012-12-25 08:49:24 -04:00
David Bremner
5c35791d7c perf-test: unpack tags.
There is only one set of tags, independant of the size of message
corpus chosen.
2012-12-15 08:17:58 -04:00
David Bremner
ceaf5ca6c0 perf-test: add caching of xapian database
The caching and uncaching seem to be necessarily manual, as timing the
initial notmuch new is one of our goals with this suite.
2012-12-15 08:17:58 -04:00
David Bremner
74a883562b perf-test: cache unpacked corpus
Unpacking is not really the expensive step (compared to the initial
notmuch new), but this is a pre-requisite to caching the database.
2012-12-15 08:17:57 -04:00
David Bremner
925ebd1fde perf-test: optionally print description for each group of tests
Output from tests is indented slightly in the same style as the
correctness tests.
2012-12-15 08:17:57 -04:00
David Bremner
a3137c61e1 perf-test: add corpus size to output, compact I/O stats
Austin suggested a while ago that the corpus size be printed in the
header. In the end it seems the corpus will be fixed per test script,
so this suggestion indeed makes sense.

The tabbing was wrapping on my usual 80 column terminal, so I joined
the input and output columns together.
2012-12-14 22:23:55 -04:00
David Bremner
e7c661d31a perf-test: add argument parsing for performance tests
This patch just sets (non-exported) variables. The variable $debug is
already used, and $corpus_size will be used in following commits.
2012-12-14 22:23:55 -04:00
David Bremner
e52597016f perf-test: propagate non-zero returns from /usr/bin/time
Unlike in the correctness tests, the most common cause of non-zero
return seems to be the user interrupting, so killing the run seems
like the friendly thing to do.
2012-12-14 22:23:54 -04:00
David Bremner
a4eabfd1b7 performance-test: add units to In and Out
Austin Read enough Fine Manuals to figure out this is in multiples of
512 bytes.
2012-11-29 09:28:46 -04:00
David Bremner
7beeb8c88a test: initial performance testing infrastructure
This is not near as fancy as as the unit tests, on the theory that
the code should typically be crashing when performance tuning.
Nonetheless, there is plenty of room for improvement.  Several more of
the pieces of the test infrastructure (e.g. the option parsing) could
be factored out into test/test-lib-common.sh
2012-11-26 08:39:21 -04:00