qt5base-lts/tests/benchmarks/corelib
Edward Welbourne e1b3a46302 QFile benchmark: only set up and tear down the data directory once
None of the tests modify the data, so there's no risk that one test
will cause another to fail via that. We can thus avoid the repeated
cost of that set-up and teardown, which was done repeatedly for each
test function since benchmarks get run repeatedly if they're quick.

Use QTemporaryDir to manage the test data, so that it's tidied away
automagically, instead of trying to tidy up at the end of each test
(which was, of course, skipped if the test failed).

As drive-bys, fix a typo in a QFAIL()'s message, change some C casts
that silently bulldozed const away to reinterpret_cast<>s with the
const qualifier and turn some heap buffers into stack buffers to save
the need to delete [] them at the end of their tests (also skipped on
failure).

Inspired by a kindred change by Andreas Buhr and a suggestion on its
review by Friedemann Kleint.

Pick-to: 6.2 6.1 5.15
Change-Id: I6067eb35babfbac02990ef39817b0d5122f563cd
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
2021-07-19 11:31:38 +02:00
..
io QFile benchmark: only set up and tear down the data directory once 2021-07-19 11:31:38 +02:00
itemmodels Add QSortFilterProxyModel clear-filter benchmark 2021-04-25 13:25:01 +03:00
json Remove qmake project files for benchmarks 2021-02-01 21:14:01 +01:00
kernel Fix QMetaType API deprecation warning in benchmark 2021-04-26 10:59:32 +02:00
mimetypes Remove qmake project files for benchmarks 2021-02-01 21:14:01 +01:00
plugin Fix some warnings 2021-03-29 16:06:25 +02:00
text QStringList benchmark: fix the [[nodiscard]] warnings 2021-07-13 16:57:31 +02:00
thread Add basic benchmarks for QFuture 2021-06-19 08:48:14 +02:00
time Make loop variables references in date benchmark 2021-04-27 15:34:50 +02:00
tools Limit some QList benchmark data-set sizes to avoid time-outs 2021-07-15 17:06:54 +02:00
CMakeLists.txt Add QSortFilterProxyModel clear-filter benchmark 2021-04-25 13:25:01 +03:00