| 116 | } |
| 117 | |
| 118 | void BenchIndexedString::bench_hashString() |
| 119 | { |
| 120 | const QVector<QString> strings = generateData(); |
| 121 | QVector<QByteArray> byteArrays; |
| 122 | byteArrays.reserve(strings.size()); |
| 123 | for (const auto& string : strings) { |
| 124 | byteArrays << string.toUtf8(); |
| 125 | } |
| 126 | |
| 127 | quint64 sum = 0; |
| 128 | QBENCHMARK { |
| 129 | for (const auto& array : std::as_const(byteArrays)) { |
| 130 | sum += IndexedString::hashString(array.constData(), array.length()); |
| 131 | } |
| 132 | } |
| 133 | QVERIFY(sum > 0); |
| 134 | } |
| 135 | |
| 136 | void BenchIndexedString::bench_kdevhash() |
| 137 | { |
nothing calls this directly
no test coverage detected