| 191 | } |
| 192 | |
| 193 | void BenchItemRepository::lookupValue() |
| 194 | { |
| 195 | QMutex mutex; |
| 196 | TestDataRepository repo("TestDataRepositoryLookupValue", &mutex); |
| 197 | const QVector<QString> data = generateData(); |
| 198 | QVector<uint> indices = insertData(data, repo); |
| 199 | std::shuffle(indices.begin(), indices.end(), std::default_random_engine(0)); |
| 200 | QBENCHMARK { |
| 201 | for (const QString& item : data) { |
| 202 | const QByteArray byteArray = item.toUtf8(); |
| 203 | repo.findIndex(TestDataRepositoryItemRequest(byteArray.constData(), byteArray.length())); |
| 204 | } |
| 205 | } |
| 206 | } |
| 207 |
nothing calls this directly
no test coverage detected