diff options
Diffstat (limited to 'tests/benchmarks/corelib')
74 files changed, 995 insertions, 78 deletions
diff --git a/tests/benchmarks/corelib/CMakeLists.txt b/tests/benchmarks/corelib/CMakeLists.txt new file mode 100644 index 0000000000..3414c39ef8 --- /dev/null +++ b/tests/benchmarks/corelib/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from corelib.pro. + +add_subdirectory(io) +add_subdirectory(json) +add_subdirectory(mimetypes) +add_subdirectory(kernel) +add_subdirectory(text) +add_subdirectory(thread) +add_subdirectory(time) +add_subdirectory(tools) +add_subdirectory(codecs) +add_subdirectory(plugin) diff --git a/tests/benchmarks/corelib/codecs/CMakeLists.txt b/tests/benchmarks/corelib/codecs/CMakeLists.txt new file mode 100644 index 0000000000..56f8edcc9e --- /dev/null +++ b/tests/benchmarks/corelib/codecs/CMakeLists.txt @@ -0,0 +1,3 @@ +# Generated from codecs.pro. + +add_subdirectory(qtextcodec) diff --git a/tests/benchmarks/corelib/codecs/qtextcodec/CMakeLists.txt b/tests/benchmarks/corelib/codecs/qtextcodec/CMakeLists.txt new file mode 100644 index 0000000000..ea6ed8519b --- /dev/null +++ b/tests/benchmarks/corelib/codecs/qtextcodec/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qtextcodec.pro. + +##################################################################### +## tst_bench_qtextcodec Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qtextcodec + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qtextcodec.pro:<TRUE>: +# TESTDATA = "utf-8.txt" diff --git a/tests/benchmarks/corelib/io/CMakeLists.txt b/tests/benchmarks/corelib/io/CMakeLists.txt new file mode 100644 index 0000000000..3419c4a28c --- /dev/null +++ b/tests/benchmarks/corelib/io/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from io.pro. + +add_subdirectory(qdir) +add_subdirectory(qdiriterator) +add_subdirectory(qfile) +add_subdirectory(qfileinfo) +add_subdirectory(qiodevice) +add_subdirectory(qtemporaryfile) +add_subdirectory(qtextstream) +if(QT_FEATURE_process) + add_subdirectory(qprocess) +endif() diff --git a/tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt b/tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt new file mode 100644 index 0000000000..51f603b595 --- /dev/null +++ b/tests/benchmarks/corelib/io/qdir/10000/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from 10000.pro. + +##################################################################### +## tst_bench_qdir_10000 Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qdir_10000 + SOURCES + bench_qdir_10000.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:10000.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/io/qdir/CMakeLists.txt b/tests/benchmarks/corelib/io/qdir/CMakeLists.txt new file mode 100644 index 0000000000..10185014fa --- /dev/null +++ b/tests/benchmarks/corelib/io/qdir/CMakeLists.txt @@ -0,0 +1,3 @@ +# Generated from qdir.pro. + +add_subdirectory(10000) diff --git a/tests/benchmarks/corelib/io/qdir/tree/4.6.0-list.txt b/tests/benchmarks/corelib/io/qdir/tree/4.6.0-list.txt index b915320e9e..707a597361 100644 --- a/tests/benchmarks/corelib/io/qdir/tree/4.6.0-list.txt +++ b/tests/benchmarks/corelib/io/qdir/tree/4.6.0-list.txt @@ -8150,8 +8150,6 @@ qdatetime_p.h qeasingcurve.cpp qeasingcurve.h - qharfbuzz.cpp - qharfbuzz_p.h qhash.cpp qhash.h qiterator.h diff --git a/tests/benchmarks/corelib/io/qdir/tree/CMakeLists.txt b/tests/benchmarks/corelib/io/qdir/tree/CMakeLists.txt new file mode 100644 index 0000000000..e3102a3389 --- /dev/null +++ b/tests/benchmarks/corelib/io/qdir/tree/CMakeLists.txt @@ -0,0 +1,28 @@ +# Generated from tree.pro. + +##################################################################### +## bench_qdir_tree Binary: +##################################################################### + +add_qt_benchmark(bench_qdir_tree + SOURCES + bench_qdir_tree.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +# Resources: +set(bench_qdir_tree_resource_files + "4.6.0-list.txt" +) + +add_qt_resource(bench_qdir_tree "bench_qdir_tree" + PREFIX + "/" + FILES + ${bench_qdir_tree_resource_files} +) + + +#### Keys ignored in scope 1:.:.:tree.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/io/qdiriterator/CMakeLists.txt b/tests/benchmarks/corelib/io/qdiriterator/CMakeLists.txt new file mode 100644 index 0000000000..b1e86861b6 --- /dev/null +++ b/tests/benchmarks/corelib/io/qdiriterator/CMakeLists.txt @@ -0,0 +1,21 @@ +# Generated from qdiriterator.pro. + +##################################################################### +## tst_bench_qdiriterator Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qdiriterator + SOURCES + main.cpp + qfilesystemiterator.cpp qfilesystemiterator.h + PUBLIC_LIBRARIES + Qt::Test +) + +## Scopes: +##################################################################### + +extend_target(tst_bench_qdiriterator CONDITION (QT_FEATURE_cxx17_filesystem) AND (GCC AND (QMAKE_GCC_MAJOR_VERSION LESS 9)) + LINK_OPTIONS + "-lstdc++fs" +) diff --git a/tests/benchmarks/corelib/io/qdiriterator/main.cpp b/tests/benchmarks/corelib/io/qdiriterator/main.cpp index eae752d99a..5b10a4a689 100644 --- a/tests/benchmarks/corelib/io/qdiriterator/main.cpp +++ b/tests/benchmarks/corelib/io/qdiriterator/main.cpp @@ -44,9 +44,15 @@ #include "qfilesystemiterator.h" +#if QT_CONFIG(cxx17_filesystem) +#include <filesystem> +#endif + class tst_qdiriterator : public QObject { Q_OBJECT + + void data(); private slots: void posix(); void posix_data() { data(); } @@ -54,7 +60,8 @@ private slots: void diriterator_data() { data(); } void fsiterator(); void fsiterator_data() { data(); } - void data(); + void stdRecursiveDirectoryIterator(); + void stdRecursiveDirectoryIterator_data() { data(); } }; @@ -235,6 +242,28 @@ void tst_qdiriterator::fsiterator() qDebug() << count; } +void tst_qdiriterator::stdRecursiveDirectoryIterator() +{ +#if QT_CONFIG(cxx17_filesystem) + QFETCH(QByteArray, dirpath); + + int count = 0; + + QBENCHMARK { + int c = 0; + for (auto obj : std::filesystem::recursive_directory_iterator(dirpath.data())) { + if (obj.is_directory()) + continue; + c++; + } + count = c; + } + qDebug() << count; +#else + QSKIP("Not supported."); +#endif +} + QTEST_MAIN(tst_qdiriterator) #include "main.moc" diff --git a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro index b332cda84b..0921b8424e 100644 --- a/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro +++ b/tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro @@ -1,6 +1,13 @@ CONFIG += benchmark QT = core testlib +# Enable c++17 support for std::filesystem +qtConfig(cxx17_filesystem) { + CONFIG += c++17 + gcc:lessThan(QMAKE_GCC_MAJOR_VERSION, 9): \ + QMAKE_LFLAGS += -lstdc++fs +} + TARGET = tst_bench_qdiriterator SOURCES += main.cpp qfilesystemiterator.cpp HEADERS += qfilesystemiterator.h diff --git a/tests/benchmarks/corelib/io/qfile/CMakeLists.txt b/tests/benchmarks/corelib/io/qfile/CMakeLists.txt new file mode 100644 index 0000000000..7d1e19d75a --- /dev/null +++ b/tests/benchmarks/corelib/io/qfile/CMakeLists.txt @@ -0,0 +1,24 @@ +# Generated from qfile.pro. + +##################################################################### +## tst_bench_qfile Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qfile + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qfile.pro:<TRUE>: +# TEMPLATE = "app" + +## Scopes: +##################################################################### + +extend_target(tst_bench_qfile CONDITION WIN32 + DEFINES + _CRT_SECURE_NO_WARNINGS +) diff --git a/tests/benchmarks/corelib/io/qfileinfo/CMakeLists.txt b/tests/benchmarks/corelib/io/qfileinfo/CMakeLists.txt new file mode 100644 index 0000000000..195419f52e --- /dev/null +++ b/tests/benchmarks/corelib/io/qfileinfo/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qfileinfo.pro. + +##################################################################### +## tst_bench_qfileinfo Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qfileinfo + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qfileinfo.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/io/qiodevice/CMakeLists.txt b/tests/benchmarks/corelib/io/qiodevice/CMakeLists.txt new file mode 100644 index 0000000000..7663bdb99d --- /dev/null +++ b/tests/benchmarks/corelib/io/qiodevice/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qiodevice.pro. + +##################################################################### +## tst_bench_qiodevice Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qiodevice + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qiodevice.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/io/qprocess/CMakeLists.txt b/tests/benchmarks/corelib/io/qprocess/CMakeLists.txt new file mode 100644 index 0000000000..d599539142 --- /dev/null +++ b/tests/benchmarks/corelib/io/qprocess/CMakeLists.txt @@ -0,0 +1,4 @@ +# Generated from qprocess.pro. + +add_subdirectory(testProcessLoopback) +add_subdirectory(test) diff --git a/tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt b/tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt new file mode 100644 index 0000000000..00bbe74c2d --- /dev/null +++ b/tests/benchmarks/corelib/io/qprocess/test/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from test.pro. + +##################################################################### +## tst_bench_qprocess Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qprocess + SOURCES + ../tst_bench_qprocess.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Test +) diff --git a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt new file mode 100644 index 0000000000..44b18a4826 --- /dev/null +++ b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt @@ -0,0 +1,21 @@ +# Generated from testProcessLoopback.pro. + +##################################################################### +## testProcessLoopback Binary: +##################################################################### + +add_qt_benchmark(testProcessLoopback + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/" + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Gui +) + +## Scopes: +##################################################################### + +extend_target(testProcessLoopback CONDITION WINRT + LINK_OPTIONS + "/ENTRY:mainCRTStartup" +) diff --git a/tests/benchmarks/corelib/io/qtemporaryfile/CMakeLists.txt b/tests/benchmarks/corelib/io/qtemporaryfile/CMakeLists.txt new file mode 100644 index 0000000000..82b885bb17 --- /dev/null +++ b/tests/benchmarks/corelib/io/qtemporaryfile/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qtemporaryfile.pro. + +##################################################################### +## tst_bench_qtemporaryfile Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qtemporaryfile + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qtemporaryfile.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/io/qtextstream/CMakeLists.txt b/tests/benchmarks/corelib/io/qtextstream/CMakeLists.txt new file mode 100644 index 0000000000..6dd11f1bbb --- /dev/null +++ b/tests/benchmarks/corelib/io/qtextstream/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qtextstream.pro. + +##################################################################### +## tst_bench_qtextstream Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qtextstream + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qtextstream.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/io/qurl/CMakeLists.txt b/tests/benchmarks/corelib/io/qurl/CMakeLists.txt new file mode 100644 index 0000000000..26d98b7eb4 --- /dev/null +++ b/tests/benchmarks/corelib/io/qurl/CMakeLists.txt @@ -0,0 +1,23 @@ +# Generated from qurl.pro. + +##################################################################### +## tst_qurl Binary: +##################################################################### + +add_qt_benchmark(tst_qurl + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qurl.pro:<TRUE>: +# TEMPLATE = "app" + +## Scopes: +##################################################################### + +extend_target(tst_qurl CONDITION WIN32 + DEFINES + _CRT_SECURE_NO_WARNINGS +) diff --git a/tests/benchmarks/corelib/json/CMakeLists.txt b/tests/benchmarks/corelib/json/CMakeLists.txt new file mode 100644 index 0000000000..312cae8a45 --- /dev/null +++ b/tests/benchmarks/corelib/json/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from json.pro. + +##################################################################### +## tst_bench_qtbinaryjson Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qtbinaryjson + SOURCES + tst_bench_qtbinaryjson.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:json.pro:<TRUE>: +# TESTDATA = "numbers.json" "test.json" diff --git a/tests/benchmarks/corelib/kernel/CMakeLists.txt b/tests/benchmarks/corelib/kernel/CMakeLists.txt new file mode 100644 index 0000000000..2b41ea30f7 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/CMakeLists.txt @@ -0,0 +1,11 @@ +# Generated from kernel.pro. + +add_subdirectory(events) +add_subdirectory(qmetatype) +add_subdirectory(qvariant) +add_subdirectory(qcoreapplication) +add_subdirectory(qtimer_vs_qmetaobject) +if(TARGET Qt::Widgets) + add_subdirectory(qmetaobject) + add_subdirectory(qobject) +endif() diff --git a/tests/benchmarks/corelib/kernel/events/CMakeLists.txt b/tests/benchmarks/corelib/kernel/events/CMakeLists.txt new file mode 100644 index 0000000000..1e35891126 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/events/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from events.pro. + +##################################################################### +## tst_bench_events Binary: +##################################################################### + +add_qt_benchmark(tst_bench_events + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:events.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt new file mode 100644 index 0000000000..173b3b9077 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qcoreapplication/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qcoreapplication.pro. + +##################################################################### +## tst_bench_qcoreapplication Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qcoreapplication + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qcoreapplication.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/kernel/qmetaobject/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qmetaobject/CMakeLists.txt new file mode 100644 index 0000000000..e6da0721d3 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qmetaobject/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qmetaobject.pro. + +##################################################################### +## tst_bench_qmetaobject Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qmetaobject + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qmetaobject.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt new file mode 100644 index 0000000000..00ca47aadc --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qmetatype/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qmetatype.pro. + +##################################################################### +## tst_bench_qmetatype Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qmetatype + SOURCES + tst_qmetatype.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qmetatype.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/kernel/qobject/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qobject/CMakeLists.txt new file mode 100644 index 0000000000..4644708b54 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qobject/CMakeLists.txt @@ -0,0 +1,18 @@ +# Generated from qobject.pro. + +##################################################################### +## tst_bench_qobject Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qobject + SOURCES + main.cpp + object.cpp object.h + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qobject.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/kernel/qobject/main.cpp b/tests/benchmarks/corelib/kernel/qobject/main.cpp index 04ca69ad3b..918227f74e 100644 --- a/tests/benchmarks/corelib/kernel/qobject/main.cpp +++ b/tests/benchmarks/corelib/kernel/qobject/main.cpp @@ -51,8 +51,55 @@ private slots: void connect_disconnect_benchmark_data(); void connect_disconnect_benchmark(); void receiver_destroyed_benchmark(); + + void stdAllocator(); }; +class QObjectUsingStandardAllocator : public QObject +{ + Q_OBJECT +public: + QObjectUsingStandardAllocator() + { + } +}; + +template<class T> +inline void allocator() +{ + // We need to allocate certain amount of objects otherwise the new implementation + // may re-use the previous allocation, hiding the somehow high cost of allocation. It + // also helps us to reduce the noise ratio, which is high for memory allocation. + // + // The check depends on memory allocation performance, which is quite non-deterministic. + // When a new memory is requested, the new operator, depending on implementation, is trying + // to re-use existing, already allocated for the process memory. If there is not enough, it + // asks OS to give more. Of course the first case is faster then the second. In the same + // time, from an application perspective the first is also more likely. + // + // As a result, depending on which use-case one wants to test, it may be recommended to run this + // test in separation from others, to "force" expensive code path in the memory allocation. + // + // The time based results are heavily affected by background noise. One really needs to + // prepare OS (no other tasks, CPU and RAM reservations) to run this test, or use + // instruction counting which seems to be less fragile. + + const int count = 256 * 1024; + + QScopedPointer<T> objects[count]; + QBENCHMARK_ONCE { + for (int i = 0; i < count; ++i) + objects[i].reset(new T); + for (int i = 0; i < count; ++i) + objects[i].reset(); + } +} + +void QObjectBenchmark::stdAllocator() +{ + allocator<QObjectUsingStandardAllocator>(); +} + struct Functor { void operator()(){} }; diff --git a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/.prev_CMakeLists.txt b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/.prev_CMakeLists.txt new file mode 100644 index 0000000000..4160fe7e36 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/.prev_CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from qtimer_vs_qmetaobject.pro. + +##################################################################### +## qtimer_vs_qmetaobject Binary: +##################################################################### + +add_qt_benchmark(qtimer_vs_qmetaobject + SOURCES + tst_qtimer_vs_qmetaobject.cpp + INCLUDE_DIRECTORIES + . + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qtimer_vs_qmetaobject.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/CMakeLists.txt new file mode 100644 index 0000000000..c76c4dca18 --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qtimer_vs_qmetaobject/CMakeLists.txt @@ -0,0 +1,18 @@ +# Generated from qtimer_vs_qmetaobject.pro. + +##################################################################### +## qtimer_vs_qmetaobject Binary: +##################################################################### + +add_qt_benchmark(qtimer_vs_qmetaobject + SOURCES + tst_qtimer_vs_qmetaobject.cpp + INCLUDE_DIRECTORIES + . + PUBLIC_LIBRARIES + Qt::Test + Threads::Threads # special case +) + +#### Keys ignored in scope 1:.:.:qtimer_vs_qmetaobject.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/kernel/qvariant/CMakeLists.txt b/tests/benchmarks/corelib/kernel/qvariant/CMakeLists.txt new file mode 100644 index 0000000000..5e5230566d --- /dev/null +++ b/tests/benchmarks/corelib/kernel/qvariant/CMakeLists.txt @@ -0,0 +1,21 @@ +# Generated from qvariant.pro. + +##################################################################### +## tst_bench_qvariant Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qvariant + SOURCES + tst_qvariant.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Test +) + +## Scopes: +##################################################################### + +extend_target(tst_bench_qvariant CONDITION NOT TARGET Qt::Gui + PUBLIC_LIBRARIES + # Remove: gui +) diff --git a/tests/benchmarks/corelib/mimetypes/CMakeLists.txt b/tests/benchmarks/corelib/mimetypes/CMakeLists.txt new file mode 100644 index 0000000000..c825780e69 --- /dev/null +++ b/tests/benchmarks/corelib/mimetypes/CMakeLists.txt @@ -0,0 +1,3 @@ +# Generated from mimetypes.pro. + +add_subdirectory(qmimedatabase) diff --git a/tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt b/tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt new file mode 100644 index 0000000000..7d6b6dc4f8 --- /dev/null +++ b/tests/benchmarks/corelib/mimetypes/qmimedatabase/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qmimedatabase.pro. + +##################################################################### +## tst_bench_qmimedatabase Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qmimedatabase + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/plugin/CMakeLists.txt b/tests/benchmarks/corelib/plugin/CMakeLists.txt new file mode 100644 index 0000000000..3ae12b23f5 --- /dev/null +++ b/tests/benchmarks/corelib/plugin/CMakeLists.txt @@ -0,0 +1,3 @@ +# Generated from plugin.pro. + +add_subdirectory(quuid) diff --git a/tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt b/tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt new file mode 100644 index 0000000000..2251914957 --- /dev/null +++ b/tests/benchmarks/corelib/plugin/quuid/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from quuid.pro. + +##################################################################### +## tst_bench_quuid Binary: +##################################################################### + +add_qt_benchmark(tst_bench_quuid + SOURCES + tst_quuid.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:quuid.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/text/CMakeLists.txt b/tests/benchmarks/corelib/text/CMakeLists.txt new file mode 100644 index 0000000000..8319d1bf3b --- /dev/null +++ b/tests/benchmarks/corelib/text/CMakeLists.txt @@ -0,0 +1,10 @@ +# Generated from text.pro. + +add_subdirectory(qbytearray) +add_subdirectory(qchar) +add_subdirectory(qlocale) +add_subdirectory(qstringbuilder) +add_subdirectory(qstringlist) +if(GCC) + add_subdirectory(qstring) +endif() diff --git a/tests/benchmarks/corelib/text/qbytearray/CMakeLists.txt b/tests/benchmarks/corelib/text/qbytearray/CMakeLists.txt new file mode 100644 index 0000000000..9c7fae62eb --- /dev/null +++ b/tests/benchmarks/corelib/text/qbytearray/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qbytearray.pro. + +##################################################################### +## tst_bench_qbytearray Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qbytearray + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qbytearray.pro:<TRUE>: +# TEMPLATE = "app" +# TESTDATA = "main.cpp" diff --git a/tests/benchmarks/corelib/text/qchar/CMakeLists.txt b/tests/benchmarks/corelib/text/qchar/CMakeLists.txt new file mode 100644 index 0000000000..ba99813d2b --- /dev/null +++ b/tests/benchmarks/corelib/text/qchar/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qchar.pro. + +##################################################################### +## tst_bench_qchar Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qchar + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/text/qlocale/CMakeLists.txt b/tests/benchmarks/corelib/text/qlocale/CMakeLists.txt new file mode 100644 index 0000000000..7e67472013 --- /dev/null +++ b/tests/benchmarks/corelib/text/qlocale/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qlocale.pro. + +##################################################################### +## tst_bench_qlocale Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qlocale + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/text/qregexp/CMakeLists.txt b/tests/benchmarks/corelib/text/qregexp/CMakeLists.txt new file mode 100644 index 0000000000..e1dcd5c131 --- /dev/null +++ b/tests/benchmarks/corelib/text/qregexp/CMakeLists.txt @@ -0,0 +1,46 @@ +# Generated from qregexp.pro. + +##################################################################### +## tst_bench_qregexp Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qregexp + EXCEPTIONS + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +# Resources: +set(qregexp_resource_files + "main.cpp" +) + +add_qt_resource(tst_bench_qregexp "qregexp" + PREFIX + "/" + FILES + ${qregexp_resource_files} +) + + +#### Keys ignored in scope 1:.:.:qregexp.pro:<TRUE>: +# TEMPLATE = "app" + +## Scopes: +##################################################################### + +extend_target(tst_bench_qregexp CONDITION TARGET Qt::Script AND NOT pcre + DEFINES + HAVE_JSC + PUBLIC_LIBRARIES + Qt::Script +) + +extend_target(tst_bench_qregexp CONDITION (NOT QNX) AND (EXISTS _ss_[QT_SYSROOT]/usr/include/boost/regex.hpp) + DEFINES + HAVE_BOOST + PUBLIC_LIBRARIES + boost_regex +) diff --git a/tests/benchmarks/corelib/text/qstring/CMakeLists.txt b/tests/benchmarks/corelib/text/qstring/CMakeLists.txt new file mode 100644 index 0000000000..2999cb4682 --- /dev/null +++ b/tests/benchmarks/corelib/text/qstring/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qstring.pro. + +##################################################################### +## tst_bench_qstring Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qstring + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/text/qstringbuilder/CMakeLists.txt b/tests/benchmarks/corelib/text/qstringbuilder/CMakeLists.txt new file mode 100644 index 0000000000..e326414d7a --- /dev/null +++ b/tests/benchmarks/corelib/text/qstringbuilder/CMakeLists.txt @@ -0,0 +1,18 @@ +# Generated from qstringbuilder.pro. + +##################################################################### +## tst_bench_qstringbuilder Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qstringbuilder + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test + COMPILE_OPTIONS + -g +) + +#### Keys ignored in scope 1:.:.:qstringbuilder.pro:<TRUE>: +# QMAKE_CFLAGS = "-g" +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/text/qstringlist/CMakeLists.txt b/tests/benchmarks/corelib/text/qstringlist/CMakeLists.txt new file mode 100644 index 0000000000..a341f1aaa8 --- /dev/null +++ b/tests/benchmarks/corelib/text/qstringlist/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qstringlist.pro. + +##################################################################### +## tst_bench_qstringlist Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qstringlist + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/thread/CMakeLists.txt b/tests/benchmarks/corelib/thread/CMakeLists.txt new file mode 100644 index 0000000000..dc257262a3 --- /dev/null +++ b/tests/benchmarks/corelib/thread/CMakeLists.txt @@ -0,0 +1,7 @@ +# Generated from thread.pro. + +add_subdirectory(qmutex) +add_subdirectory(qreadwritelock) +add_subdirectory(qthreadstorage) +add_subdirectory(qthreadpool) +add_subdirectory(qwaitcondition) diff --git a/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt b/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt new file mode 100644 index 0000000000..71226282ab --- /dev/null +++ b/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qmutex.pro. + +##################################################################### +## tst_bench_qmutex Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qmutex + SOURCES + tst_qmutex.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qmutex.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/thread/qreadwritelock/CMakeLists.txt b/tests/benchmarks/corelib/thread/qreadwritelock/CMakeLists.txt new file mode 100644 index 0000000000..d582dba8db --- /dev/null +++ b/tests/benchmarks/corelib/thread/qreadwritelock/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qreadwritelock.pro. + +##################################################################### +## tst_bench_qreadwritelock Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qreadwritelock + SOURCES + tst_qreadwritelock.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qreadwritelock.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt b/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt new file mode 100644 index 0000000000..00dbc9c298 --- /dev/null +++ b/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qthreadpool.pro. + +##################################################################### +## tst_bench_qthreadpool Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qthreadpool + SOURCES + tst_qthreadpool.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qthreadpool.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt b/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt new file mode 100644 index 0000000000..ed60ec4495 --- /dev/null +++ b/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qthreadstorage.pro. + +##################################################################### +## tst_bench_qthreadstorage Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qthreadstorage + SOURCES + tst_qthreadstorage.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qthreadstorage.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt b/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt new file mode 100644 index 0000000000..4de82d7cc9 --- /dev/null +++ b/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qwaitcondition.pro. + +##################################################################### +## tst_bench_qwaitcondition Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qwaitcondition + SOURCES + tst_qwaitcondition.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qwaitcondition.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/time/CMakeLists.txt b/tests/benchmarks/corelib/time/CMakeLists.txt new file mode 100644 index 0000000000..086650edb6 --- /dev/null +++ b/tests/benchmarks/corelib/time/CMakeLists.txt @@ -0,0 +1,5 @@ +# Generated from time.pro. + +add_subdirectory(qdate) +add_subdirectory(qdatetime) +add_subdirectory(qtimezone) diff --git a/tests/benchmarks/corelib/time/qdate/CMakeLists.txt b/tests/benchmarks/corelib/time/qdate/CMakeLists.txt new file mode 100644 index 0000000000..7ae18a42f5 --- /dev/null +++ b/tests/benchmarks/corelib/time/qdate/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qdate.pro. + +##################################################################### +## tst_bench_qdate Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qdate + SOURCES + tst_bench_qdate.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/time/qdatetime/CMakeLists.txt b/tests/benchmarks/corelib/time/qdatetime/CMakeLists.txt new file mode 100644 index 0000000000..b44f1a5bfc --- /dev/null +++ b/tests/benchmarks/corelib/time/qdatetime/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qdatetime.pro. + +##################################################################### +## tst_bench_qdatetime Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qdatetime + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/time/qtimezone/CMakeLists.txt b/tests/benchmarks/corelib/time/qtimezone/CMakeLists.txt new file mode 100644 index 0000000000..60e8ceba13 --- /dev/null +++ b/tests/benchmarks/corelib/time/qtimezone/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qtimezone.pro. + +##################################################################### +## tst_bench_qtimezone Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qtimezone + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/CMakeLists.txt b/tests/benchmarks/corelib/tools/CMakeLists.txt new file mode 100644 index 0000000000..6aed3d0f90 --- /dev/null +++ b/tests/benchmarks/corelib/tools/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from tools.pro. + +add_subdirectory(containers-associative) +add_subdirectory(containers-sequential) +add_subdirectory(qcontiguouscache) +add_subdirectory(qcryptographichash) +add_subdirectory(qlist) +add_subdirectory(qmap) +add_subdirectory(qrect) +add_subdirectory(qringbuffer) +add_subdirectory(qstack) +add_subdirectory(qvector) +add_subdirectory(qalgorithms) diff --git a/tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt b/tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt new file mode 100644 index 0000000000..0e2dace380 --- /dev/null +++ b/tests/benchmarks/corelib/tools/containers-associative/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from containers-associative.pro. + +##################################################################### +## tst_bench_containers-associative Binary: +##################################################################### + +add_qt_benchmark(tst_bench_containers-associative + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:containers-associative.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt b/tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt new file mode 100644 index 0000000000..40f455752e --- /dev/null +++ b/tests/benchmarks/corelib/tools/containers-sequential/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from containers-sequential.pro. + +##################################################################### +## tst_bench_containers-sequential Binary: +##################################################################### + +add_qt_benchmark(tst_bench_containers-sequential + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:containers-sequential.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt b/tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt new file mode 100644 index 0000000000..99c6a7061d --- /dev/null +++ b/tests/benchmarks/corelib/tools/qalgorithms/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qalgorithms.pro. + +##################################################################### +## tst_bench_qalgorithms Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qalgorithms + SOURCES + tst_qalgorithms.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qchar/CMakeLists.txt b/tests/benchmarks/corelib/tools/qchar/CMakeLists.txt new file mode 100644 index 0000000000..c51e2a0059 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qchar/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qchar SOURCES main.cpp) diff --git a/tests/benchmarks/corelib/tools/qcontiguouscache/CMakeLists.txt b/tests/benchmarks/corelib/tools/qcontiguouscache/CMakeLists.txt new file mode 100644 index 0000000000..126c0e7a50 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qcontiguouscache/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qcontiguouscache.pro. + +##################################################################### +## tst_bench_qcontiguouscache Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qcontiguouscache + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qcryptographichash/CMakeLists.txt b/tests/benchmarks/corelib/tools/qcryptographichash/CMakeLists.txt new file mode 100644 index 0000000000..1400027c1f --- /dev/null +++ b/tests/benchmarks/corelib/tools/qcryptographichash/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qcryptographichash.pro. + +##################################################################### +## tst_bench_qcryptographichash Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qcryptographichash + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qdatetime/CMakeLists.txt b/tests/benchmarks/corelib/tools/qdatetime/CMakeLists.txt new file mode 100644 index 0000000000..6875fdd613 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qdatetime/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qdatetime SOURCES main.cpp) diff --git a/tests/benchmarks/corelib/tools/qhash/CMakeLists.txt b/tests/benchmarks/corelib/tools/qhash/CMakeLists.txt new file mode 100644 index 0000000000..5b3a0fe5f5 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qhash/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qhash.pro. + +##################################################################### +## tst_hash Binary: +##################################################################### + +add_qt_benchmark(tst_hash + SOURCES + main.cpp + outofline.cpp + INCLUDE_DIRECTORIES + . + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qlist/CMakeLists.txt b/tests/benchmarks/corelib/tools/qlist/CMakeLists.txt new file mode 100644 index 0000000000..ba40760910 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qlist/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qlist.pro. + +##################################################################### +## tst_bench_qlist Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qlist + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qlocale/CMakeLists.txt b/tests/benchmarks/corelib/tools/qlocale/CMakeLists.txt new file mode 100644 index 0000000000..b8a23bc757 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qlocale/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qlocale SOURCES main.cpp) diff --git a/tests/benchmarks/corelib/tools/qmap/CMakeLists.txt b/tests/benchmarks/corelib/tools/qmap/CMakeLists.txt new file mode 100644 index 0000000000..a98c7d7157 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qmap/CMakeLists.txt @@ -0,0 +1,14 @@ +# Generated from qmap.pro. + +##################################################################### +## tst_bench_qmap Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qmap + SOURCES + main.cpp + INCLUDE_DIRECTORIES + . + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qrect/CMakeLists.txt b/tests/benchmarks/corelib/tools/qrect/CMakeLists.txt new file mode 100644 index 0000000000..4218092a88 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qrect/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qrect.pro. + +##################################################################### +## tst_bench_qrect Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qrect + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qrect.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/tools/qringbuffer/CMakeLists.txt b/tests/benchmarks/corelib/tools/qringbuffer/CMakeLists.txt new file mode 100644 index 0000000000..e0323b90db --- /dev/null +++ b/tests/benchmarks/corelib/tools/qringbuffer/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qringbuffer.pro. + +##################################################################### +## tst_bench_qringbuffer Binary: +##################################################################### + +add_qt_benchmark(tst_bench_qringbuffer + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Test +) + +#### Keys ignored in scope 1:.:.:qringbuffer.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/benchmarks/corelib/tools/qset/CMakeLists.txt b/tests/benchmarks/corelib/tools/qset/CMakeLists.txt new file mode 100644 index 0000000000..40ee622f89 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qset/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qset.pro. + +##################################################################### +## tst_qset Binary: +##################################################################### + +add_qt_benchmark(tst_qset + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qstack/CMakeLists.txt b/tests/benchmarks/corelib/tools/qstack/CMakeLists.txt new file mode 100644 index 0000000000..530d55b19b --- /dev/null +++ b/tests/benchmarks/corelib/tools/qstack/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from qstack.pro. + +##################################################################### +## tst_bench_stack Binary: +##################################################################### + +add_qt_benchmark(tst_bench_stack + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qstring/CMakeLists.txt b/tests/benchmarks/corelib/tools/qstring/CMakeLists.txt new file mode 100644 index 0000000000..1dd6678e8e --- /dev/null +++ b/tests/benchmarks/corelib/tools/qstring/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qstring SOURCES main.cpp) diff --git a/tests/benchmarks/corelib/tools/qtimezone/CMakeLists.txt b/tests/benchmarks/corelib/tools/qtimezone/CMakeLists.txt new file mode 100644 index 0000000000..3947ae1c5e --- /dev/null +++ b/tests/benchmarks/corelib/tools/qtimezone/CMakeLists.txt @@ -0,0 +1 @@ +add_qt_test(tst_bench_qtimezone SOURCES main.cpp) diff --git a/tests/benchmarks/corelib/tools/qvector/CMakeLists.txt b/tests/benchmarks/corelib/tools/qvector/CMakeLists.txt new file mode 100644 index 0000000000..0cc9b24236 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qvector/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qvector.pro. + +##################################################################### +## tst_bench_vector Binary: +##################################################################### + +add_qt_benchmark(tst_bench_vector + SOURCES + main.cpp + outofline.cpp + INCLUDE_DIRECTORIES + . + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Test +) diff --git a/tests/benchmarks/corelib/tools/qvector/outofline.cpp b/tests/benchmarks/corelib/tools/qvector/outofline.cpp index 76a4edaa10..7182a43008 100644 --- a/tests/benchmarks/corelib/tools/qvector/outofline.cpp +++ b/tests/benchmarks/corelib/tools/qvector/outofline.cpp @@ -54,7 +54,7 @@ QVector<double> mixedvector_fill_and_return_helper() std::vector<double> v(N); for (int i = 0; i != N; ++i) v[i] = i; - return QVector<double>::fromStdVector(v); + return QVector<double>(v.begin(), v.end()); } diff --git a/tests/benchmarks/corelib/tools/qvector/qrawvector.h b/tests/benchmarks/corelib/tools/qvector/qrawvector.h index 16a911c63a..9ad5f771bd 100644 --- a/tests/benchmarks/corelib/tools/qvector/qrawvector.h +++ b/tests/benchmarks/corelib/tools/qvector/qrawvector.h @@ -130,78 +130,9 @@ public: bool contains(const T &t) const; int count(const T &t) const; -#ifdef QT_STRICT_ITERATORS - class iterator { - public: - T *i; - typedef std::random_access_iterator_tag iterator_category; - typedef ptrdiff_t difference_type; - typedef T value_type; - typedef T *pointer; - typedef T &reference; - - inline iterator() : i(0) {} - inline iterator(T *n) : i(n) {} - inline iterator(const iterator &o): i(o.i){} - inline T &operator*() const { return *i; } - inline T *operator->() const { return i; } - inline T &operator[](int j) const { return *(i + j); } - inline bool operator==(const iterator &o) const { return i == o.i; } - inline bool operator!=(const iterator &o) const { return i != o.i; } - inline bool operator<(const iterator& other) const { return i < other.i; } - inline bool operator<=(const iterator& other) const { return i <= other.i; } - inline bool operator>(const iterator& other) const { return i > other.i; } - inline bool operator>=(const iterator& other) const { return i >= other.i; } - inline iterator &operator++() { ++i; return *this; } - inline iterator operator++(int) { T *n = i; ++i; return n; } - inline iterator &operator--() { i--; return *this; } - inline iterator operator--(int) { T *n = i; i--; return n; } - inline iterator &operator+=(int j) { i+=j; return *this; } - inline iterator &operator-=(int j) { i-=j; return *this; } - inline iterator operator+(int j) const { return iterator(i+j); } - inline iterator operator-(int j) const { return iterator(i-j); } - inline int operator-(iterator j) const { return i - j.i; } - }; - friend class iterator; - - class const_iterator { - public: - T *i; - typedef std::random_access_iterator_tag iterator_category; - typedef ptrdiff_t difference_type; - typedef T value_type; - typedef const T *pointer; - typedef const T &reference; - - inline const_iterator() : i(0) {} - inline const_iterator(T *n) : i(n) {} - inline const_iterator(const const_iterator &o): i(o.i) {} - inline explicit const_iterator(const iterator &o): i(o.i) {} - inline const T &operator*() const { return *i; } - inline const T *operator->() const { return i; } - inline const T &operator[](int j) const { return *(i + j); } - inline bool operator==(const const_iterator &o) const { return i == o.i; } - inline bool operator!=(const const_iterator &o) const { return i != o.i; } - inline bool operator<(const const_iterator& other) const { return i < other.i; } - inline bool operator<=(const const_iterator& other) const { return i <= other.i; } - inline bool operator>(const const_iterator& other) const { return i > other.i; } - inline bool operator>=(const const_iterator& other) const { return i >= other.i; } - inline const_iterator &operator++() { ++i; return *this; } - inline const_iterator operator++(int) { T *n = i; ++i; return n; } - inline const_iterator &operator--() { i--; return *this; } - inline const_iterator operator--(int) { T *n = i; i--; return n; } - inline const_iterator &operator+=(int j) { i+=j; return *this; } - inline const_iterator &operator-=(int j) { i+=j; return *this; } - inline const_iterator operator+(int j) const { return const_iterator(i+j); } - inline const_iterator operator-(int j) const { return const_iterator(i-j); } - inline int operator-(const_iterator j) const { return i - j.i; } - }; - friend class const_iterator; -#else // STL-style typedef T *iterator; typedef const T *const_iterator; -#endif inline iterator begin() { return m_begin; } inline const_iterator begin() const { return m_begin; } inline const_iterator constBegin() const { return m_begin; } @@ -280,11 +211,7 @@ private: } static Q_DECL_CONSTEXPR int alignOfTypedData() { -#ifdef Q_ALIGNOF - return Q_ALIGNOF(AlignmentDummy); -#else - return sizeof(void *); -#endif + return alignof(AlignmentDummy); } public: |