[skip ci] Update test_concurrent_vector.cpp (#8205)

Signed-off-by: yudong.cai <yudong.cai@zilliz.com>
pull/8209/head
Cai Yudong 2021-09-18 14:41:50 +08:00 committed by GitHub
parent 46c72c57c2
commit 2a946707b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -68,14 +68,12 @@ TEST(ConcurrentVector, TestMultithreads) {
ConcurrentVectorImpl<int64_t, false> c_vec(dim, 32);
std::atomic<int64_t> ack_counter = 0;
// std::mutex mutex;
auto executor = [&](int thread_id) {
std::default_random_engine e(42 + thread_id);
int64_t data = 0;
int64_t total_count = 0;
for (int i = 0; i < 10000; ++i) {
// std::lock_guard lck(mutex);
int insert_size = e() % 150;
vector<int64_t> vec(insert_size * dim);
for (auto& x : vec) {
@ -109,6 +107,7 @@ TEST(ConcurrentVector, TestMultithreads) {
}
}
}
TEST(ConcurrentVector, TestAckSingle) {
std::vector<std::tuple<int64_t, int64_t, int64_t>> raw_data;
std::default_random_engine e(42);