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

Method removeDisk

kdevplatform/serialization/tests/bench_itemrepository.cpp:157–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157void BenchItemRepository::removeDisk()
158{
159 const QVector<QString> data = generateData();
160 QVector<uint> indices;
161 QMutex mutex;
162 {
163 TestDataRepository repo("TestDataRepositoryRemoveDisk", &mutex);
164 indices = insertData(data, repo);
165 repo.store();
166 }
167 TestDataRepository repo("TestDataRepositoryRemoveDisk", &mutex);
168 QVERIFY(repo.statistics().totalItems == static_cast<uint>(data.size()));
169 QBENCHMARK_ONCE {
170 for (uint index : std::as_const(indices)) {
171 repo.deleteItem(index);
172 }
173
174 repo.store();
175 }
176 QCOMPARE(repo.statistics().totalItems, 0u);
177}
178

Callers

nothing calls this directly

Calls 6

statisticsMethod · 0.80
generateDataFunction · 0.70
insertDataFunction · 0.70
storeMethod · 0.45
sizeMethod · 0.45
deleteItemMethod · 0.45

Tested by

no test coverage detected