diff options
Diffstat (limited to 'tests/benchmarks')
-rw-r--r-- | tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp b/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp index 05a1575..eca38b6 100644 --- a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp +++ b/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp @@ -128,7 +128,9 @@ private slots: void noThread_data(); void noThread(); + void constructionNative(); void uncontendedNative(); + void constructionQMutex(); void uncontendedQMutex(); void uncontendedQMutexLocker(); @@ -205,6 +207,15 @@ void tst_QMutex::noThread() QCOMPARE(int(count), N); } +void tst_QMutex::constructionNative() +{ + QBENCHMARK { + NativeMutexType mutex; + NativeMutexInitialize(&mutex); + NativeMutexDestroy(&mutex); + } +} + void tst_QMutex::uncontendedNative() { NativeMutexType mutex; @@ -216,6 +227,14 @@ void tst_QMutex::uncontendedNative() NativeMutexDestroy(&mutex); } +void tst_QMutex::constructionQMutex() +{ + QBENCHMARK { + QMutex mutex; + Q_UNUSED(mutex); + } +} + void tst_QMutex::uncontendedQMutex() { QMutex mutex; |