mirror of https://github.com/milvus-io/milvus.git
[skip ci]Add time record for creating index (#12311)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>pull/12308/head
parent
48b45d82e5
commit
e9be4a81ba
|
@ -65,7 +65,10 @@ def hello_milvus(host="127.0.0.1"):
|
|||
# create index and load table
|
||||
default_index = {"index_type": "IVF_FLAT", "params": {"nlist": 128}, "metric_type": "L2"}
|
||||
print(f"\nCreate index...")
|
||||
t0 = time.time()
|
||||
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...")
|
||||
t0 = time.time()
|
||||
collection.load()
|
||||
|
|
Loading…
Reference in New Issue