mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-01 03:18:29 +08:00
[skip ci]Add time record for creating index (#12311)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
parent
48b45d82e5
commit
e9be4a81ba
@ -65,7 +65,10 @@ def hello_milvus(host="127.0.0.1"):
|
|||||||
# create index and load table
|
# create index and load table
|
||||||
default_index = {"index_type": "IVF_FLAT", "params": {"nlist": 128}, "metric_type": "L2"}
|
default_index = {"index_type": "IVF_FLAT", "params": {"nlist": 128}, "metric_type": "L2"}
|
||||||
print(f"\nCreate index...")
|
print(f"\nCreate index...")
|
||||||
|
t0 = time.time()
|
||||||
collection.create_index(field_name="float_vector", index_params=default_index)
|
collection.create_index(field_name="float_vector", index_params=default_index)
|
||||||
|
t1 = time.time()
|
||||||
|
print(f"\nCreate index cost {t1 - t0} seconds")
|
||||||
print(f"\nload collection...")
|
print(f"\nload collection...")
|
||||||
t0 = time.time()
|
t0 = time.time()
|
||||||
collection.load()
|
collection.load()
|
||||||
|
Loading…
Reference in New Issue
Block a user