Skip to content

Commit 9b8161e

Browse files
committed
fix memory
1 parent 57c54bd commit 9b8161e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/benchmark/bm_common.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ void BM_VecSimCommon<index_type_t>::Memory_HNSW(benchmark::State &st, unsigned s
7474
for (auto _ : st) {
7575
// Do nothing...
7676
}
77-
st.counters["memory"] = (double)VecSimIndex_StatsInfo(index).memory;
77+
st.counters["memory"] =
78+
benchmark::Counter((double)VecSimIndex_StatsInfo(index).memory,
79+
benchmark::Counter::kDefaults, benchmark::Counter::OneK::kIs1024);
7880
}
7981
template <typename index_type_t>
8082
void BM_VecSimCommon<index_type_t>::Memory_Tiered(benchmark::State &st,
@@ -84,7 +86,9 @@ void BM_VecSimCommon<index_type_t>::Memory_Tiered(benchmark::State &st,
8486
for (auto _ : st) {
8587
// Do nothing...
8688
}
87-
st.counters["memory"] = (double)VecSimIndex_StatsInfo(index).memory;
89+
st.counters["memory"] =
90+
benchmark::Counter((double)VecSimIndex_StatsInfo(index).memory,
91+
benchmark::Counter::kDefaults, benchmark::Counter::OneK::kIs1024);
8892
}
8993

9094
// TopK search BM

0 commit comments

Comments
 (0)