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

Method lookupKey

kdevplatform/serialization/tests/bench_itemrepository.cpp:179–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179void 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
193void BenchItemRepository::lookupValue()
194{

Callers

nothing calls this directly

Calls 5

generateDataFunction · 0.70
insertDataFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
itemFromIndexMethod · 0.45

Tested by

no test coverage detected