summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib/thread
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2021-08-18 11:48:29 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2021-08-30 19:21:08 +0200
commit9004a2412ba1f9976c2c61f01223dff852208c42 (patch)
treef06abeec8b9cc66abf0e66cc9048c7a0ed02a360 /tests/benchmarks/corelib/thread
parentc2a6749af795386495b275684418d083410fa1e4 (diff)
Standardise layout and naming in corelib benchmarks
Make file names match CMake's test names (and those follow dir-name) and class names follow tst_ClassName pattern when testing ClassName. Purge comments about the qmake configs the CMakeLists.txt are generated from. Purge empty constructors and init/cleanup methods of classes. Fix petty coding style violations. Add qdir/tree/, qurl, qbench and qset benchmarks to their parent directories' lists of subdirs. Fix unused return error from qurl benchmark. Change-Id: Ifc15a3a46e71cf82ad0637753517e0df34049763 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/benchmarks/corelib/thread')
-rw-r--r--tests/benchmarks/corelib/thread/qfuture/CMakeLists.txt2
-rw-r--r--tests/benchmarks/corelib/thread/qfuture/tst_bench_qfuture.cpp (renamed from tests/benchmarks/corelib/thread/qfuture/tst_qfuture.cpp)3
-rw-r--r--tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt7
-rw-r--r--tests/benchmarks/corelib/thread/qmutex/tst_bench_qmutex.cpp (renamed from tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp)3
-rw-r--r--tests/benchmarks/corelib/thread/qreadwritelock/CMakeLists.txt7
-rw-r--r--tests/benchmarks/corelib/thread/qreadwritelock/tst_bench_qreadwritelock.cpp (renamed from tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp)2
-rw-r--r--tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt7
-rw-r--r--tests/benchmarks/corelib/thread/qthreadpool/tst_bench_qthreadpool.cpp (renamed from tests/benchmarks/corelib/thread/qthreadpool/tst_qthreadpool.cpp)3
-rw-r--r--tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt7
-rw-r--r--tests/benchmarks/corelib/thread/qthreadstorage/tst_bench_qthreadstorage.cpp (renamed from tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp)4
-rw-r--r--tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt7
-rw-r--r--tests/benchmarks/corelib/thread/qwaitcondition/tst_bench_qwaitcondition.cpp (renamed from tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp)4
12 files changed, 17 insertions, 39 deletions
diff --git a/tests/benchmarks/corelib/thread/qfuture/CMakeLists.txt b/tests/benchmarks/corelib/thread/qfuture/CMakeLists.txt
index 4a737c62b8..d53e3f6728 100644
--- a/tests/benchmarks/corelib/thread/qfuture/CMakeLists.txt
+++ b/tests/benchmarks/corelib/thread/qfuture/CMakeLists.txt
@@ -5,7 +5,7 @@
qt_internal_add_benchmark(tst_bench_qfuture
EXCEPTIONS
SOURCES
- tst_qfuture.cpp
+ tst_bench_qfuture.cpp
PUBLIC_LIBRARIES
Qt::Test
)
diff --git a/tests/benchmarks/corelib/thread/qfuture/tst_qfuture.cpp b/tests/benchmarks/corelib/thread/qfuture/tst_bench_qfuture.cpp
index c7a4ff24d9..17c2f20712 100644
--- a/tests/benchmarks/corelib/thread/qfuture/tst_qfuture.cpp
+++ b/tests/benchmarks/corelib/thread/qfuture/tst_bench_qfuture.cpp
@@ -317,4 +317,5 @@ void tst_QFuture::progressText()
}
QTEST_MAIN(tst_QFuture)
-#include "tst_qfuture.moc"
+
+#include "tst_bench_qfuture.moc"
diff --git a/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt b/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt
index 923bfba117..d056a10568 100644
--- a/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt
+++ b/tests/benchmarks/corelib/thread/qmutex/CMakeLists.txt
@@ -1,16 +1,11 @@
-# Generated from qmutex.pro.
-
#####################################################################
## tst_bench_qmutex Binary:
#####################################################################
qt_internal_add_benchmark(tst_bench_qmutex
SOURCES
- tst_qmutex.cpp
+ tst_bench_qmutex.cpp
PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::Test
)
-
-#### Keys ignored in scope 1:.:.:qmutex.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp b/tests/benchmarks/corelib/thread/qmutex/tst_bench_qmutex.cpp
index 9b14cbca5d..987612b7b2 100644
--- a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp
+++ b/tests/benchmarks/corelib/thread/qmutex/tst_bench_qmutex.cpp
@@ -450,4 +450,5 @@ void tst_QMutex::contendedQMutexLocker()
}
QTEST_MAIN(tst_QMutex)
-#include "tst_qmutex.moc"
+
+#include "tst_bench_qmutex.moc"
diff --git a/tests/benchmarks/corelib/thread/qreadwritelock/CMakeLists.txt b/tests/benchmarks/corelib/thread/qreadwritelock/CMakeLists.txt
index 79d3a2f879..901f9609bc 100644
--- a/tests/benchmarks/corelib/thread/qreadwritelock/CMakeLists.txt
+++ b/tests/benchmarks/corelib/thread/qreadwritelock/CMakeLists.txt
@@ -1,16 +1,11 @@
-# Generated from qreadwritelock.pro.
-
#####################################################################
## tst_bench_qreadwritelock Binary:
#####################################################################
qt_internal_add_benchmark(tst_bench_qreadwritelock
SOURCES
- tst_qreadwritelock.cpp
+ tst_bench_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/qreadwritelock/tst_qreadwritelock.cpp b/tests/benchmarks/corelib/thread/qreadwritelock/tst_bench_qreadwritelock.cpp
index 1018dae878..f0ec45e267 100644
--- a/tests/benchmarks/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
+++ b/tests/benchmarks/corelib/thread/qreadwritelock/tst_bench_qreadwritelock.cpp
@@ -256,4 +256,4 @@ void tst_QReadWriteLock::writeOnly()
}
QTEST_MAIN(tst_QReadWriteLock)
-#include "tst_qreadwritelock.moc"
+#include "tst_bench_qreadwritelock.moc"
diff --git a/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt b/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt
index 7b0c81891e..0d1f145e25 100644
--- a/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt
+++ b/tests/benchmarks/corelib/thread/qthreadpool/CMakeLists.txt
@@ -1,15 +1,10 @@
-# Generated from qthreadpool.pro.
-
#####################################################################
## tst_bench_qthreadpool Binary:
#####################################################################
qt_internal_add_benchmark(tst_bench_qthreadpool
SOURCES
- tst_qthreadpool.cpp
+ tst_bench_qthreadpool.cpp
PUBLIC_LIBRARIES
Qt::Test
)
-
-#### Keys ignored in scope 1:.:.:qthreadpool.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/thread/qthreadpool/tst_qthreadpool.cpp b/tests/benchmarks/corelib/thread/qthreadpool/tst_bench_qthreadpool.cpp
index 10928e3afc..a64dbd15c9 100644
--- a/tests/benchmarks/corelib/thread/qthreadpool/tst_qthreadpool.cpp
+++ b/tests/benchmarks/corelib/thread/qthreadpool/tst_bench_qthreadpool.cpp
@@ -76,4 +76,5 @@ void tst_QThreadPool::activeThreadCount()
}
QTEST_MAIN(tst_QThreadPool)
-#include "tst_qthreadpool.moc"
+
+#include "tst_bench_qthreadpool.moc"
diff --git a/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt b/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt
index 78ac072d35..7f5de4e9ab 100644
--- a/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt
+++ b/tests/benchmarks/corelib/thread/qthreadstorage/CMakeLists.txt
@@ -1,15 +1,10 @@
-# Generated from qthreadstorage.pro.
-
#####################################################################
## tst_bench_qthreadstorage Binary:
#####################################################################
qt_internal_add_benchmark(tst_bench_qthreadstorage
SOURCES
- tst_qthreadstorage.cpp
+ tst_bench_qthreadstorage.cpp
PUBLIC_LIBRARIES
Qt::Test
)
-
-#### Keys ignored in scope 1:.:.:qthreadstorage.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp b/tests/benchmarks/corelib/thread/qthreadstorage/tst_bench_qthreadstorage.cpp
index c8f9f23c76..6230cd3187 100644
--- a/tests/benchmarks/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp
+++ b/tests/benchmarks/corelib/thread/qthreadstorage/tst_bench_qthreadstorage.cpp
@@ -104,6 +104,6 @@ void tst_QThreadStorage::set()
ts.setLocalData(0);
}
-
QTEST_MAIN(tst_QThreadStorage)
-#include "tst_qthreadstorage.moc"
+
+#include "tst_bench_qthreadstorage.moc"
diff --git a/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt b/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt
index 68c6e88342..13814d7074 100644
--- a/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt
+++ b/tests/benchmarks/corelib/thread/qwaitcondition/CMakeLists.txt
@@ -1,15 +1,10 @@
-# Generated from qwaitcondition.pro.
-
#####################################################################
## tst_bench_qwaitcondition Binary:
#####################################################################
qt_internal_add_benchmark(tst_bench_qwaitcondition
SOURCES
- tst_qwaitcondition.cpp
+ tst_bench_qwaitcondition.cpp
PUBLIC_LIBRARIES
Qt::Test
)
-
-#### Keys ignored in scope 1:.:.:qwaitcondition.pro:<TRUE>:
-# TEMPLATE = "app"
diff --git a/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp b/tests/benchmarks/corelib/thread/qwaitcondition/tst_bench_qwaitcondition.cpp
index b87da463dc..19d3964c7a 100644
--- a/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
+++ b/tests/benchmarks/corelib/thread/qwaitcondition/tst_bench_qwaitcondition.cpp
@@ -124,6 +124,6 @@ void tst_QWaitCondition::oscillate_writelock()
oscillate<QReadWriteLock, QWriteLocker>(timeout);
}
-
QTEST_MAIN(tst_QWaitCondition)
-#include "tst_qwaitcondition.moc"
+
+#include "tst_bench_qwaitcondition.moc"