mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-28 22:45:26 +08:00
[skip ci] Add new func of benchmark (#11012)
Signed-off-by: wangting0128 <ting.wang@zilliz.com>
This commit is contained in:
parent
5e077fd261
commit
056c636dad
@ -21,6 +21,26 @@ def get_token(url):
|
||||
return token
|
||||
|
||||
|
||||
def get_tags(url, token):
|
||||
headers = {'Content-type': "application/json",
|
||||
"charset": "UTF-8",
|
||||
"Accept": "application/vnd.docker.distribution.manifest.v2+json",
|
||||
"Authorization": "Bearer %s" % token}
|
||||
try:
|
||||
rep = requests.get(url, headers=headers)
|
||||
data = json.loads(rep.text)
|
||||
|
||||
tags = []
|
||||
if 'tags' in data:
|
||||
tags = data["tags"]
|
||||
else:
|
||||
print("Can not get the tag list")
|
||||
return tags
|
||||
except:
|
||||
print("Can not get the tag list")
|
||||
return []
|
||||
|
||||
|
||||
def parse_server_tag(server_tag):
|
||||
""" paser server tag from server config"""
|
||||
# tag format: "8c"/"8c16m"/"8c16m1g"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user