Skip to content

Commit 0da50c0

Browse files
committed
fix asserts
1 parent e91cb52 commit 0da50c0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/benchmark/bm_vecsim_basics.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,6 @@ void BM_VecSimBasics<index_type_t>::UpdateAtBlockSize(benchmark::State &st) {
303303
// Calculate vectors needed to reach next block boundary
304304
size_t vecs_to_blocksize =
305305
BM_VecSimGeneral::block_size - (initial_index_size % BM_VecSimGeneral::block_size);
306-
size_t initial_index_cap = index->indexMetaDataCapacity();
307-
assert(initial_index_cap == N_VECTORS + vecs_to_blocksize);
308306

309307
assert(vecs_to_blocksize < BM_VecSimGeneral::block_size);
310308
labelType initial_label_count = index->indexLabelCount();
@@ -332,7 +330,7 @@ void BM_VecSimBasics<index_type_t>::UpdateAtBlockSize(benchmark::State &st) {
332330
labelType label_to_update = curr_label - 1;
333331
size_t index_cap = index->indexMetaDataCapacity();
334332
std::cout << "index_cap after adding vectors " << index_cap << std::endl;
335-
assert(index_cap == initial_index_cap + BM_VecSimGeneral::block_size);
333+
assert(index_cap == initial_index_size + vecs_to_blocksize + BM_VecSimGeneral::block_size);
336334

337335
for (auto _ : st) {
338336
// Remove the vector directly from hnsw

0 commit comments

Comments
 (0)