mirror of
https://github.com/oneclickvirt/ecs.git
synced 2025-09-27 03:36:12 +08:00
重构QA
This commit is contained in:
66
.github/workflows/ci.yaml_back
vendored
66
.github/workflows/ci.yaml_back
vendored
@@ -1,66 +0,0 @@
|
|||||||
name: go-ci
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
setup:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: set up
|
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: 1.23.4
|
|
||||||
id: go
|
|
||||||
- name: check out
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Cache
|
|
||||||
uses: actions/cache@v2.1.0
|
|
||||||
with:
|
|
||||||
path: ~/go/pkg/mod
|
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-go-
|
|
||||||
- name: Configure Git for Private Modules
|
|
||||||
run: |
|
|
||||||
git config --global url."https://${{ secrets.GHT }}@github.com/".insteadOf "https://github.com/"
|
|
||||||
git config --global url."git@github.com:".insteadOf "https://github.com/"
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GHT }}
|
|
||||||
env:
|
|
||||||
GOPRIVATE: github.com/oneclickvirt/security
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GHT }}
|
|
||||||
|
|
||||||
build:
|
|
||||||
needs: setup
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Configure Git for Private Modules
|
|
||||||
run: |
|
|
||||||
git config --global url."https://${{ secrets.GHT }}@github.com/".insteadOf "https://github.com/"
|
|
||||||
git config --global url."git@github.com:".insteadOf "https://github.com/"
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GHT }}
|
|
||||||
- name: build
|
|
||||||
run: go build ./...
|
|
||||||
env:
|
|
||||||
GOPRIVATE: github.com/oneclickvirt/security
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GHT }}
|
|
||||||
|
|
||||||
# test:
|
|
||||||
# needs: setup
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v3
|
|
||||||
# - name: Configure Git for Private Modules
|
|
||||||
# run: |
|
|
||||||
# git config --global url."https://${{ secrets.GHT }}@github.com/".insteadOf "https://github.com/"
|
|
||||||
# git config --global url."git@github.com:".insteadOf "https://github.com/"
|
|
||||||
# env:
|
|
||||||
# GITHUB_TOKEN: ${{ secrets.GHT }}
|
|
||||||
# - name: test
|
|
||||||
# run: go test ./goecs_test.go
|
|
||||||
# env:
|
|
||||||
# GOPRIVATE: github.com/oneclickvirt/security
|
|
||||||
# GITHUB_TOKEN: ${{ secrets.GHT }}
|
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
vendor/
|
vendor/
|
||||||
|
.idea/
|
8
.idea/.gitignore
generated
vendored
8
.idea/.gitignore
generated
vendored
@@ -1,8 +0,0 @@
|
|||||||
# Default ignored files
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
||||||
# Editor-based HTTP Client requests
|
|
||||||
/httpRequests/
|
|
||||||
# Datasource local storage ignored files
|
|
||||||
/dataSources/
|
|
||||||
/dataSources.local.xml
|
|
9
.idea/ecs.iml
generated
9
.idea/ecs.iml
generated
@@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="WEB_MODULE" version="4">
|
|
||||||
<component name="Go" enabled="true" />
|
|
||||||
<component name="NewModuleRootManager">
|
|
||||||
<content url="file://$MODULE_DIR$" />
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/ecs.iml" filepath="$PROJECT_DIR$/.idea/ecs.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
8
.idea/sshConfigs.xml
generated
8
.idea/sshConfigs.xml
generated
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="SshConfigs">
|
|
||||||
<configs>
|
|
||||||
<sshConfig authType="PASSWORD" host="49.234.158.14" id="950b8219-3ab3-47e7-ad76-6b6a5d0857b0" port="22" nameFormat="DESCRIPTIVE" username="root" useOpenSSHConfig="true" />
|
|
||||||
</configs>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@@ -1,7 +1,5 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
# 安装必要的工具
|
# 安装必要的工具
|
||||||
RUN apk add --no-cache wget curl bash
|
RUN apk add --no-cache wget curl bash
|
||||||
RUN apk add --no-cache bind-tools --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
|
RUN apk add --no-cache bind-tools --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
|
||||||
@@ -12,6 +10,5 @@ RUN curl -L https://raw.githubusercontent.com/oneclickvirt/ecs/master/goecs.sh -
|
|||||||
chmod +x goecs.sh && \
|
chmod +x goecs.sh && \
|
||||||
bash goecs.sh env && \
|
bash goecs.sh env && \
|
||||||
bash goecs.sh install
|
bash goecs.sh install
|
||||||
|
|
||||||
# 设置 goecs 为入口点
|
# 设置 goecs 为入口点
|
||||||
ENTRYPOINT ["goecs"]
|
ENTRYPOINT ["goecs"]
|
17
README.md
17
README.md
@@ -270,15 +270,14 @@ docker run --rm docker.cnb.cool/oneclickvirt/ecs:latest -menu=false -l zh
|
|||||||
|
|
||||||
#### A: 比较二者特点
|
#### A: 比较二者特点
|
||||||
|
|
||||||
```
|
| 比较项 | sysbench | geekbench |
|
||||||
sysbench geekbench
|
|------------------|----------|-----------|
|
||||||
轻量几乎所有服务器都能跑 重型小机器跑不动
|
| 适用范围 | 轻量级,几乎可在任何服务器上运行 | 重量级,小型机器无法运行 |
|
||||||
测试无联网需求,无硬件需求 测试必须联网,且必须IPV4环境并有内存大小1G的最低需求
|
| 测试要求 | 无需网络,无特殊硬件需求 | 需联网,IPV4环境,至少1G内存 |
|
||||||
LUA编写且开源,各架构系统可自行编译 仅官方二进制文件且不开源,无对应架构时无法自行编译
|
| 开源情况 | 基于LUA,开源,可自行编译各架构版本 | 官方二进制闭源代码,不支持自行编译 |
|
||||||
核心测试组件十多年不变 每次大版本更新对标的CPU,不同版本间得分互相之间难转化,你只能以对标的CPU为准
|
| 测试稳定性 | 核心测试组件10年以上未变 | 每个大版本更新测试项,分数不同版本间难以对比(每个版本对标当前最好的CPU) |
|
||||||
测试仅测试计算性能 测试涵盖多种性能测试,得分以权重计算,但实际很多测试项目实际是用不到的
|
| 测试内容 | 仅测试计算性能 | 覆盖多种性能测试,分数加权计算,但部分测试实际不常用 |
|
||||||
适合快速测试 适合全面测试
|
| 适用场景 | 适合快速测试,仅测试计算性能 | 适合综合全面的测试 |
|
||||||
```
|
|
||||||
|
|
||||||
且```goecs```测试使用何种CPU测试方式可使用参数指定,默认只是为了更多用户快速测试的需求
|
且```goecs```测试使用何种CPU测试方式可使用参数指定,默认只是为了更多用户快速测试的需求
|
||||||
|
|
||||||
|
43
README_EN.md
43
README_EN.md
@@ -1,10 +1,12 @@
|
|||||||
# ecs
|
# ecs
|
||||||
|
|
||||||
[](https://github.com/oneclickvirt/ecs/actions/workflows/main.yaml) [](https://www.spiritlhl.net/)
|
[](https://github.com/oneclickvirt/ecs/actions/workflows/main.yaml)
|
||||||
|
|
||||||
|
[](https://www.spiritlhl.net/)
|
||||||
|
|
||||||
Fusion Monster Evaluation Script - GO Refactored Version
|
Fusion Monster Evaluation Script - GO Refactored Version
|
||||||
|
|
||||||
Please report any issues via issues.
|
Please report any issues via [issues](https://github.com/oneclickvirt/ecs/issues).
|
||||||
|
|
||||||
Go version:[https://github.com/oneclickvirt/ecs](https://github.com/oneclickvirt/ecs)
|
Go version:[https://github.com/oneclickvirt/ecs](https://github.com/oneclickvirt/ecs)
|
||||||
|
|
||||||
@@ -221,3 +223,40 @@ docker run --rm spiritlhl/goecs:latest
|
|||||||
Using Docker to execute tests, hardware testing will have some bias and virtualization architecture to determine the failure.
|
Using Docker to execute tests, hardware testing will have some bias and virtualization architecture to determine the failure.
|
||||||
|
|
||||||
Recommended direct testing without using Docker testing.
|
Recommended direct testing without using Docker testing.
|
||||||
|
|
||||||
|
## QA
|
||||||
|
|
||||||
|
#### Q: Why is sysbench used by default instead of geekbench?
|
||||||
|
|
||||||
|
#### A: Compare the characteristics of the two
|
||||||
|
|
||||||
|
| Comparison | sysbench | geekbench |
|
||||||
|
|-----------------|----------|-----------|
|
||||||
|
| Scope | Lightweight, runs on almost any server | Heavyweight, will not run on small machines |
|
||||||
|
| Test Requirements | No networking, no special hardware required | Requires network, IPv4 environment, minimum 1G memory |
|
||||||
|
| Open Source | Written in LUA, open-source, can be compiled for any architecture | Official binaries only, not open-source, cannot compile for unsupported architectures |
|
||||||
|
| Test Stability | Core test components unchanged for over 10 years | Major releases update benchmark CPU, making scores difficult to compare across versions(Each version is benchmarked against the current best CPU) |
|
||||||
|
| Test Content | Only tests computing performance | Covers various performance aspects, scores are weighted, but many tests are not practically used |
|
||||||
|
| Best Use Case | Ideal for quick tests | Ideal for comprehensive tests |
|
||||||
|
|
||||||
|
And ```goecs``` test to use what kind of CPU test method can be specified using the parameter, the default is just for more users to quickly test the needs of the
|
||||||
|
|
||||||
|
#### Q: Why use Golang instead of Rust for refactoring
|
||||||
|
|
||||||
|
#### A: Because of the current trend of network-related projects to Golang language, most of the components of the open source ecological maintenance, Rust a lot of their own hand rubbing, ~ ~ I'm too lazy ~ ~ I don't have the technical force!
|
||||||
|
|
||||||
|
#### Q: Why did you choose to refactor instead of continuing to develop the Shell version?
|
||||||
|
|
||||||
|
#### A: Because there are too many weird environment problems, it's easier to solve environment problems by compiling the test binaries in advance (better generalization)
|
||||||
|
|
||||||
|
#### Q: Are there instructions for each test item?
|
||||||
|
|
||||||
|
#### A: Each test project has a corresponding maintenance repository, click to see the repository description yourself
|
||||||
|
|
||||||
|
#### Q: How do I manually terminate a test halfway through?
|
||||||
|
|
||||||
|
#### A: Press ctrl and c to terminate the program, the termination still generates the goecs.txt file and the share link in the current directory with the information that has been tested.
|
||||||
|
|
||||||
|
#### Q: How do I test in a non-Rooted environment?
|
||||||
|
|
||||||
|
#### A: Manually execute the install command, it's not a problem if you can't install it, just download the zip of the corresponding architecture from the release and unzip it, as long as you can execute the file. Or use docker if you can.
|
Reference in New Issue
Block a user