| 155 | } |
| 156 | |
| 157 | void 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 |
nothing calls this directly
no test coverage detected