mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 10:59:32 +08:00
test: adjust index timing (#31492)
index before insert Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
parent
09281a07f4
commit
be68b84088
@ -20,6 +20,20 @@ class TestE2e(TestcaseBase):
|
||||
collection_w = self.init_collection_wrap(name=name, active_trace=True)
|
||||
tt = time.time() - t0
|
||||
assert collection_w.name == name
|
||||
|
||||
# index
|
||||
index_params = {"index_type": "IVF_SQ8", "params": {"nlist": 64}, "metric_type": "L2"}
|
||||
t0 = time.time()
|
||||
index, _ = collection_w.create_index(field_name=ct.default_float_vec_field_name,
|
||||
index_params=index_params,
|
||||
index_name=cf.gen_unique_str())
|
||||
index, _ = collection_w.create_index(field_name=ct.default_string_field_name,
|
||||
index_params={},
|
||||
index_name=cf.gen_unique_str())
|
||||
tt = time.time() - t0
|
||||
log.info(f"assert index: {tt}")
|
||||
assert len(collection_w.indexes) == 2
|
||||
|
||||
entities = collection_w.num_entities
|
||||
log.info(f"assert create collection: {tt}, init_entities: {entities}")
|
||||
|
||||
@ -40,19 +54,6 @@ class TestE2e(TestcaseBase):
|
||||
entities = collection_w.num_entities
|
||||
log.info(f"assert flush: {tt}, entities: {entities}")
|
||||
|
||||
# index
|
||||
index_params = {"index_type": "IVF_SQ8", "params": {"nlist": 64}, "metric_type": "L2"}
|
||||
t0 = time.time()
|
||||
index, _ = collection_w.create_index(field_name=ct.default_float_vec_field_name,
|
||||
index_params=index_params,
|
||||
index_name=cf.gen_unique_str())
|
||||
index, _ = collection_w.create_index(field_name=ct.default_string_field_name,
|
||||
index_params={},
|
||||
index_name=cf.gen_unique_str())
|
||||
tt = time.time() - t0
|
||||
log.info(f"assert index: {tt}")
|
||||
assert len(collection_w.indexes) == 2
|
||||
|
||||
# load
|
||||
collection_w.load()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user