From 24675d1a94461cc9d83760c81c164ff4fc0069c9 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 18 Aug 2022 10:43:47 +0200 Subject: [PATCH] tst_QDir_10000: add sorted_byName benchmark MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pick-to: 6.4 6.3 6.2 Change-Id: Ic30a6353c356f6613f2ef3720b99ebb3b0a7968e Reviewed-by: MÃ¥rten Nordheim --- .../corelib/io/qdir/10000/tst_bench_qdir_10000.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/benchmarks/corelib/io/qdir/10000/tst_bench_qdir_10000.cpp b/tests/benchmarks/corelib/io/qdir/10000/tst_bench_qdir_10000.cpp index 276fe230d7f..5111c491222 100644 --- a/tests/benchmarks/corelib/io/qdir/10000/tst_bench_qdir_10000.cpp +++ b/tests/benchmarks/corelib/io/qdir/10000/tst_bench_qdir_10000.cpp @@ -141,6 +141,15 @@ private slots: } } + void sorted_byName() + { + QDir testdir(QDir::tempPath() + QLatin1String("/test_speed")); + testdir.setFilter(QDir::AllEntries | QDir::System | QDir::Hidden); + QBENCHMARK { + [[maybe_unused]] auto r = testdir.entryInfoList(QDir::NoFilter, QDir::Name); + } + } + void sizeSpeedWithoutFilterLowLevel() { QDir testdir(QDir::tempPath() + QLatin1String("/test_speed"));