adjust QMutex benchmark

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2019-05-23 20:41:47 +00:00
parent 54892bb1b4
commit ebf43e6172

View file

@ -134,9 +134,8 @@ void tst_QMutex::noThread_data()
QTest::addColumn<int>("t");
QTest::newRow("noLock") << 1;
QTest::newRow("QMutexInline") << 2;
QTest::newRow("QMutex") << 3;
QTest::newRow("QMutexLocker") << 4;
QTest::newRow("QMutex") << 2;
QTest::newRow("QMutexLocker") << 3;
}
void tst_QMutex::noThread()
@ -156,16 +155,6 @@ void tst_QMutex::noThread()
}
break;
case 2:
QBENCHMARK {
count = 0;
for (int i = 0; i < N; i++) {
mtx.lockInline();
count++;
mtx.unlockInline();
}
}
break;
case 3:
QBENCHMARK {
count = 0;
for (int i = 0; i < N; i++) {
@ -175,7 +164,7 @@ void tst_QMutex::noThread()
}
}
break;
case 4:
case 3:
QBENCHMARK {
count = 0;
for (int i = 0; i < N; i++) {