未验证 提交 e9be4a81 编写于 作者: Z zhuwenxing 提交者: GitHub

[skip ci]Add time record for creating index (#12311)

Signed-off-by: Nzhuwenxing <wenxing.zhu@zilliz.com>
上级 48b45d82
......@@ -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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册