| 177 | } |
| 178 | |
| 179 | void BenchItemRepository::lookupKey() |
| 180 | { |
| 181 | QMutex mutex; |
| 182 | TestDataRepository repo("TestDataRepositoryLookupKey", &mutex); |
| 183 | const QVector<QString> data = generateData(); |
| 184 | QVector<uint> indices = insertData(data, repo); |
| 185 | std::shuffle(indices.begin(), indices.end(), std::default_random_engine(0)); |
| 186 | QBENCHMARK { |
| 187 | for (uint index : std::as_const(indices)) { |
| 188 | repo.itemFromIndex(index); |
| 189 | } |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | void BenchItemRepository::lookupValue() |
| 194 | { |
nothing calls this directly
no test coverage detected