MCPcopy Create free account
hub / github.com/KDE/kdevelop / lookupValue

Method lookupValue

kdevplatform/serialization/tests/bench_itemrepository.cpp:193–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193void 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

Callers

nothing calls this directly

Calls 7

generateDataFunction · 0.70
insertDataFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
findIndexMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected