| 134 | } |
| 135 | |
| 136 | void BenchIndexedString::bench_kdevhash() |
| 137 | { |
| 138 | const QVector<QString> strings = generateData(); |
| 139 | QVector<QByteArray> byteArrays; |
| 140 | byteArrays.reserve(strings.size()); |
| 141 | for (const auto& string : strings) { |
| 142 | byteArrays << string.toUtf8(); |
| 143 | } |
| 144 | |
| 145 | quint64 sum = 0; |
| 146 | QBENCHMARK { |
| 147 | for (const auto& array : std::as_const(byteArrays)) { |
| 148 | sum += KDevHash() << array; |
| 149 | } |
| 150 | } |
| 151 | QVERIFY(sum > 0); |
| 152 | } |
| 153 | |
| 154 | void BenchIndexedString::bench_qSet() |
| 155 | { |
nothing calls this directly
no test coverage detected