Skip to content

Commit bb86b2f

Browse files
committed
fix
1 parent c71066a commit bb86b2f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

tests/benchmark/bm_common.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ void BM_VecSimCommon<index_type_t>::Memory(benchmark::State &st, IndexTypeIndex
7070
for (auto _ : st) {
7171
// Do nothing...
7272
}
73-
st.counters["memory"] = (double)VecSimIndex_StatsInfo(index).memory;
73+
st.counters["memory"] =
74+
benchmark::Counter((double)VecSimIndex_StatsInfo(index).memory,
75+
benchmark::Counter::kDefaults, benchmark::Counter::OneK::kIs1024);
7476
}
7577

7678
// TopK search BM

tests/benchmark/bm_vecsim_basics.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,14 +349,15 @@ void BM_VecSimBasics<index_type_t>::UpdateAtBlockSize(benchmark::State &st) {
349349
GET_INDEX(st.range(0) == INDEX_TIERED_HNSW ? INDEX_HNSW : st.range(0)),
350350
label_to_update);
351351
assert(ret == 1);
352-
// Capacity should shrink by one block after deletion ret =
353-
// VecSimIndex_AddVector(index, QUERIES[(added_vec_count - 1) % N_QUERIES].data(),
354-
BM_VecSimGeneral::mock_thread_pool->thread_pool_wait();
355352
assert(index->indexCapacity() == index_cap - BM_VecSimGeneral::block_size);
353+
// Capacity should shrink by one block after deletion
354+
ret = VecSimIndex_AddVector(index, QUERIES[(added_vec_count - 1) % N_QUERIES].data(),
355+
label_to_update);
356+
assert(ret == 1);
357+
BM_VecSimGeneral::mock_thread_pool->thread_pool_wait();
356358
assert(VecSimIndex_IndexSize(
357359
GET_INDEX(st.range(0) == INDEX_TIERED_HNSW ? INDEX_HNSW : st.range(0))) ==
358360
N_VECTORS + added_vec_count);
359-
assert(ret == 1);
360361
// Capacity should grow back to original size after addition
361362
assert(index->indexCapacity() == index_cap);
362363
}

0 commit comments

Comments
 (0)