From a5beec86f2af2e2200ac661197fb8541da4b463c Mon Sep 17 00:00:00 2001 From: del-zhenwu <56623710+del-zhenwu@users.noreply.github.com> Date: Mon, 13 Jan 2020 13:56:15 +0800 Subject: [PATCH] Change lang cn to en in reademe (#971) * Update framework * remove files * Remove files * Remove ann-acc cases && Update java-sdk cases * change cn to en * [skip ci] remove doc test * [skip ci] change cn to en --- tests/milvus_benchmark/README.md | 40 +- .../markdown-link-extractor.py | 420 ------------------ tests/milvus_doc_test/requirements.txt | 3 - 3 files changed, 18 insertions(+), 445 deletions(-) delete mode 100644 tests/milvus_doc_test/markdown-link-extractor.py delete mode 100644 tests/milvus_doc_test/requirements.txt diff --git a/tests/milvus_benchmark/README.md b/tests/milvus_benchmark/README.md index 73c2bc6083..00a63c6d9e 100644 --- a/tests/milvus_benchmark/README.md +++ b/tests/milvus_benchmark/README.md @@ -1,42 +1,38 @@ # Quick start -## 运行 +### Description: -### 运行说明: +- Test cases can be organized with `yaml ` +- Test can run with local mode or helm mode -- 用于进行大数据集的准确性、性能、以及稳定性等相关测试 -- 可以运行两种模式:基于K8S+Jenkins的测试模式,以及local模式 +### Demos: -### 运行示例: - -1. 基于K8S+Jenkins的测试方式: +1. Using jenkins + helm mode: ![](assets/Parameters.png) -2. 本地测试: +2. Local test: `python3 main.py --local --host=*.* --port=19530 --suite=suites/gpu_search_performance_random50m.yaml` -### 测试集配置文件: +### Definitions of test suites: -在进行自定义的测试集或测试参数时,需要编写测试集配置文件。 +Testers need to write test suite config if adding a customizised test into the current test framework -下面是搜索性能的测试集配置文件: +The following are the searching performance test suite: ![](assets/gpu_search_performance_random50m-yaml.png) -1. search_performance: 定义测试类型,还包括`build_performance`,`insert_performance`,`accuracy`,`stability`,`search_stability` -2. tables: 定义测试集列表 -3. 对于`search_performance`这类测试,每个table下都包含: +1. search_performance: the test type,also we have`build_performance`,`insert_performance`,`accuracy`,`stability`,`search_stability` +2. tables: list of test cases +3. The following fields are in the `table` field: - server: milvus的server_config - - table_name: 表名,当前框架仅支持单表操作 - - run_count: 搜索运行次数,并取搜索时间的最小值作为指标 - - search_params: 向量搜索参数 + - table_name: currently support one table + - run_count: search count + - search_params: params of search_vectors -## 测试结果: +## Test result: -搜索性能的结果输出: +The result of searching performance![](assets/milvus-nightly-performance-new-jenkins.png) -![](assets/milvus-nightly-performance-new-jenkins.png) - -在K8S测试模式下时,除打印上面的输出外,还会进行数据上报 \ No newline at end of file +Test result will be uploaded, and will be used to judge if the test run pass or failed diff --git a/tests/milvus_doc_test/markdown-link-extractor.py b/tests/milvus_doc_test/markdown-link-extractor.py deleted file mode 100644 index 3744089e69..0000000000 --- a/tests/milvus_doc_test/markdown-link-extractor.py +++ /dev/null @@ -1,420 +0,0 @@ -# -*- coding: utf-8 -*- -# Using Python 3.x - -import urllib.request -import urllib.error -from pathlib import Path -import requests -import json -from urllib.parse import urlparse -import markdown -import os -from os.path import join, getsize -from bs4 import BeautifulSoup -import re -from sys import platform -import argparse - - -class LinksFromMarkdown(object): - - def __init__(self, repository): - self.dictionary = repository - - def extract_links_from_markdown(self, repository): - - - if platform == "linux" or platform == "linux2": - # linux - link_file = "../link_reports/" + "extracted_links.json" - dirName = "../link_reports" - elif platform == "darwin": - # OS X - link_file = "../link_reports/" + "extracted_links.json" - dirName = "../link_reports" - elif platform == "win32": - # Windows... - link_file = "..\\link_reports\\" + "extracted_links.json" - dirName = "..\\link_reports" - - # repository = "D:\\GithubRepo\\docs-master\\docs-master" - - - try: - # Create target Directory - os.mkdir(dirName) - print("Directory ", dirName, " Created ") - except FileExistsError: - print("Directory ", dirName, " already exists") - - md_files = [] - - for root, dirs, files in os.walk(repository): - # print(root, "consumes", end=" ") - # print(sum(getsize(join(root, name)) for name in files), end=" ") - # print("bytes in", len(files), "non-directory files") - if len(files) != 0: - # print(files) - for file in files: - if file.endswith(".md") or file.endswith(".MD") or file.endswith(".mD") or file.endswith(".Md"): - md_files.append(join(root, file)) - # elif file.endswith(".png") or file.endswith(".PNG"): - # pics.append((join(root, file))) - - # print(md_files) - # print(pics) - - a_href_list = [] - - for md_file in md_files: - with open(md_file, "r", encoding="utf-8") as f: - html = markdown.markdown(f.read()) - # print(html) - soup = BeautifulSoup(html, "lxml") - a_hrefs = [(x.get('href')) for x in soup.find_all("a")] - - a_href_list.append(a_hrefs) - # print(a_hrefs) - # print(md_file) - - # Generates a dictionary that indicates each MD file and links extracted from the MD file - dictionary = dict(zip(md_files, a_href_list)) - - with open(link_file, "w+", encoding="utf-8") as f: - json.dump(dictionary, f) - - return link_file - - - # print(dictionary) - -class CheckExtractedLinksFromMarkdown(object): - - def __init__(self, link_file): - self.link_file = link_file - - def check_extracted_links(self, link_file): - - if platform == "linux" or platform == "linux2": - # linux - report_name = "../link_reports/" + "link_validation_report.html" - - elif platform == "darwin": - # OS X - report_name = "../link_reports/" + "link_validation_report.html" - - elif platform == "win32": - # Windows... - report_name = "..\\link_reports\\" + "link_validation_report.html" - - html_code = """
This markdown file does not contain any links.
""") - else: - - head_code = """Link | Status | Markdown File |
---|---|---|
Invalid Link Number """ + str(invalid_counter) +""" | """ + """This link is not string, which indicates that your MD file may not be well-formed.""" + """ | """ + key + """ |
""" + """""" + link + """""" + """ | """ + str(status_code) + """ | """ + key + """ |
""" + """""" + link + """""" + """ | """ + str( - status_code) + """ | """ + key + """ |
""" + """""" + link + """""" + """ | """ + str( - status_code) + """ The URL looks good but the anchor link does not work or is not using an anchor tag.""" + """ | """ + key + """ |
""" + """""" + link + """""" + """ | """ + str( - status_code) + """ """ + str(http_error) + """ The URL looks good but the page then returns an HTTP error. | """ + key + """ |
""" + """""" + link + """""" + """ | """ + str( - status_code) + """ """ + str(url_error) + """ The URL looks good but the page then returns a URL error. | """ + key + """ |
""" + """""" + link + """""" + """ | """ + str( - status_code) + """ | """ + key + """ |
""" + """""" + link + """""" + """ | """ + str( - timeout_error) + """ | """ + key + """ |
""" + """""" + link + """""" + """ | """ + str( - connection_error) + """ | """ + key + """ |
""" + """""" + link + """""" + """ | """ + str( - http_error) + """ | """ + key + """ |
""" + link + """ | The file link looks good. | """ + key + """ |
""" + link + """ | The file link is broken. | """ + key + """ |
""" + link + """ | The file link looks good. | """ + key + """ |
""" + link + """ | The file link is broken. | """ + key + """ |
""" + link + """ | The anchor link looks good. | """ + key + """ |
""" + link + """ | The anchor link is broken. | """ + key + """ |
The number of failed links: """ + str(fail_count) + """. The number of passed links: """ + str(pass_count) + """ Pass rate: """ + str(float(pass_count/(pass_count+fail_count))*100) + '%') - f.write("""
Click the button to sort the table by parent page:
- """) - f.write("""""") - f.write( - """Failed Links | Status Code | Parent Page |
---|
""" + """Refer to this link for detailed report.""" + """
""") - -# Create the parser -my_parser = argparse.ArgumentParser(description='Check the links for all markdown files of a folder') - -# Add the arguments -my_parser.add_argument('Path', - metavar='path', - type=str, - help='The path to the repository that contains all markdown files.') - -# Execute the parse_args() method -args = my_parser.parse_args() - -repository = args.Path - -# Get link JSON file -LinksFromMarkdown_Milvus = LinksFromMarkdown(repository) -link_file = LinksFromMarkdown_Milvus.extract_links_from_markdown(repository) - -# Generate link validation report -CheckExtractedLinksFromMarkdown_Milvus = CheckExtractedLinksFromMarkdown(link_file) -report_name = CheckExtractedLinksFromMarkdown_Milvus.check_extracted_links(link_file) - -# Generate report summary -GenerateReportSummary_Milvus = GenerateReportSummary(report_name) -GenerateReportSummary_Milvus.generate_report_summary(report_name) \ No newline at end of file diff --git a/tests/milvus_doc_test/requirements.txt b/tests/milvus_doc_test/requirements.txt deleted file mode 100644 index e099aa161a..0000000000 --- a/tests/milvus_doc_test/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -requests>=2.22.0 -markdown>=3.1.1 -beautifulsoup4>=4.8.1