summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2019-05-21 15:13:39 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2019-10-21 12:40:49 +0200
commit399f8151438408894f323927296b458f4fc0b27c (patch)
tree8f4ef1a8af4a6a8a83de13f35f7b691da34e6ae5 /tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
parent9294d023956d455f90262b80110bed01c4aeac1d (diff)
qdiriterator benchmark: test against std::filesystem
If c++17 is available and the header is available (not experimental/filesystem) then we'll try std::filesystem::recursive_directory_iterator as well. Results on my PC (Windows, VS 2019): PASS : tst_qdiriterator::posix(C:\depot\qt\main/src/corelib) RESULT : tst_qdiriterator::posix():"C:\depot\qt\main/src/corelib": 23 msecs per iteration (total: 94, iterations: 4) PASS : tst_qdiriterator::diriterator(C:\depot\qt\main/src/corelib) RESULT : tst_qdiriterator::diriterator():"C:\depot\qt\main/src/corelib": 17 msecs per iteration (total: 71, iterations: 4) PASS : tst_qdiriterator::stdRecursiveDirectoryIterator(C:\depot\qt\main/src/corelib) RESULT : tst_qdiriterator::stdRecursiveDirectoryIterator():"C:\depot\qt\main/src/corelib": 6.7 msecs per iteration (total: 54, iterations: 8) PASS : tst_qdiriterator::fsiterator(C:\depot\qt\main/src/corelib) RESULT : tst_qdiriterator::fsiterator():"C:\depot\qt\main/src/corelib": 23 msecs per iteration (total: 92, iterations: 4) And as a drive-by fix: move the 'data' function out of the private slots so it is not invoked as a test function (it doesn't cause any problems but is ultimately pointless). Change-Id: Ia160ee276423ec51e35e554a4cd63d4d940c0e6a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro')
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
index 061b22a5d1..4b28946f18 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
+++ b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
@@ -3,6 +3,8 @@ TARGET = tst_bench_qdiriterator
QT = core testlib
CONFIG += release
+# Enable c++17 support for std::filesystem
+qtConfig(c++1z): CONFIG += c++17
SOURCES += main.cpp qfilesystemiterator.cpp
HEADERS += qfilesystemiterator.h