Compare commits

...

7 Commits

Author SHA1 Message Date
spiritlhl
1e88513b8e fix:修复dd依赖说明,自带依赖无需安装 2025-09-25 00:39:30 +08:00
spiritlhl
f84023d18b fix: 更新说明 2025-09-25 00:34:35 +08:00
github-actions[bot]
2cfd5af3c0 chore: update ECS_VERSION to 0.1.89 in goecs.sh 2025-09-24 16:29:31 +00:00
spiritlhl
ed66e2804a fix:已修复无admin情况下win测试内存异常数值的问题,修复对应的说明 2025-09-24 16:12:55 +00:00
spiritlhl
174bf303af fix: 更新内存测试方法为stream,并修复相关逻辑 2025-09-24 16:02:55 +00:00
spiritlhl
b75f42ffe5 fix: 流媒体解锁的DNS筛选支持更多预设地址,避免无效原生检测 2025-09-24 15:55:25 +00:00
github-actions[bot]
56b71ac53f chore: update ECS_VERSION to 0.1.88 in goecs.sh 2025-09-24 03:32:26 +00:00
9 changed files with 105 additions and 25 deletions

View File

@@ -47,15 +47,14 @@ Shell 版本:[https://github.com/spiritLHLS/ecs](https://github.com/spiritLHLS
|----------------|---------------------------| |----------------|---------------------------|
| Android(arm64) | 存在权限问题未修复非安卓系统的ARM架构无问题 | | Android(arm64) | 存在权限问题未修复非安卓系统的ARM架构无问题 |
| OpenBSD/NetBSD | 部分Goalng的官方库未支持本系统(尤其是net相关项目) | | OpenBSD/NetBSD | 部分Goalng的官方库未支持本系统(尤其是net相关项目) |
| Windows虚拟机 | 无Admin权限的mbw测试性能不准确(内存测试) |
| Windows物理机(非Admin下) | 无Admin权限的mbw测试性能不准确(内存测试) |
--- ---
## **功能** ## **功能**
- 系统基础信息查询IP基础信息并发查询[basics](https://github.com/oneclickvirt/basics)、[gostun](https://github.com/oneclickvirt/gostun) - 系统基础信息查询IP基础信息并发查询[basics](https://github.com/oneclickvirt/basics)、[gostun](https://github.com/oneclickvirt/gostun)
- CPU 测试:[cputest](https://github.com/oneclickvirt/cputest),支持 sysbench(lua/golang版本)、geekbench、winsat - CPU 测试:[cputest](https://github.com/oneclickvirt/cputest),支持 sysbench(lua/golang版本)、geekbench、winsat
- 内存测试:[memorytest](https://github.com/oneclickvirt/memorytest),支持 sysbench、dd - 内存测试:[memorytest](https://github.com/oneclickvirt/memorytest),支持 sysbench、dd、winsat、mbw、stream
- 硬盘测试:[disktest](https://github.com/oneclickvirt/disktest),支持 dd、fio、winsat - 硬盘测试:[disktest](https://github.com/oneclickvirt/disktest),支持 dd、fio、winsat
- 流媒体解锁信息并发查询:[netflix-verify](https://github.com/sjlleo/netflix-verify) 等逻辑,开发至 [CommonMediaTests](https://github.com/oneclickvirt/CommonMediaTests) - 流媒体解锁信息并发查询:[netflix-verify](https://github.com/sjlleo/netflix-verify) 等逻辑,开发至 [CommonMediaTests](https://github.com/oneclickvirt/CommonMediaTests)
- 常见流媒体测试并发查询:[UnlockTests](https://github.com/oneclickvirt/UnlockTests),逻辑借鉴 [RegionRestrictionCheck](https://github.com/lmc999/RegionRestrictionCheck) 等 - 常见流媒体测试并发查询:[UnlockTests](https://github.com/oneclickvirt/UnlockTests),逻辑借鉴 [RegionRestrictionCheck](https://github.com/lmc999/RegionRestrictionCheck) 等

View File

@@ -47,8 +47,6 @@ Shell version: [https://github.com/spiritLHLS/ecs/blob/main/README_EN.md](https:
|--------|-------------------------------------------------------------------------------------------------| |--------|-------------------------------------------------------------------------------------------------|
| Android(arm64) | Permission issues that are not fixed, no problems with ARM architecture for non-Android systems | | Android(arm64) | Permission issues that are not fixed, no problems with ARM architecture for non-Android systems |
| OpenBSD/NetBSD | Some of Goalng's official libraries do not support this system (especially net-related items) | | OpenBSD/NetBSD | Some of Goalng's official libraries do not support this system (especially net-related items) |
| Windows(Virtual Machines) | Inaccurate mbw test performance without Admin rights (memory tests) |
| Windows(Physical Machines)(not under Admin) | Inaccurate mbw test performance without Admin rights (memory tests) |
--- ---
@@ -56,7 +54,7 @@ Shell version: [https://github.com/spiritLHLS/ecs/blob/main/README_EN.md](https:
- System basic information query and concurrent IP basic information query: Self-developed [basics](https://github.com/oneclickvirt/basics), [gostun](https://github.com/oneclickvirt/gostun) - System basic information query and concurrent IP basic information query: Self-developed [basics](https://github.com/oneclickvirt/basics), [gostun](https://github.com/oneclickvirt/gostun)
- CPU test: Self-developed [cputest](https://github.com/oneclickvirt/cputest) supporting sysbench(lua/golang version), geekbench, winsat - CPU test: Self-developed [cputest](https://github.com/oneclickvirt/cputest) supporting sysbench(lua/golang version), geekbench, winsat
- Memory test: Self-developed [memorytest](https://github.com/oneclickvirt/memorytest) supporting sysbench, dd - Memory test: Self-developed [memorytest](https://github.com/oneclickvirt/memorytest) supporting sysbench, dd, winsat, mbw, stream
- Disk test: Self-developed [disktest](https://github.com/oneclickvirt/disktest) supporting dd, fio, winsat - Disk test: Self-developed [disktest](https://github.com/oneclickvirt/disktest) supporting dd, fio, winsat
- Streaming media unlock information concurrent query: Modified from [netflix-verify](https://github.com/sjlleo/netflix-verify) and more to [CommonMediaTests](https://github.com/oneclickvirt/CommonMediaTests) - Streaming media unlock information concurrent query: Modified from [netflix-verify](https://github.com/sjlleo/netflix-verify) and more to [CommonMediaTests](https://github.com/oneclickvirt/CommonMediaTests)
- Common streaming media tests concurrent query: Self-developed to [UnlockTests](https://github.com/oneclickvirt/UnlockTests), logic modified from [RegionRestrictionCheck](https://github.com/lmc999/RegionRestrictionCheck) and others - Common streaming media tests concurrent query: Self-developed to [UnlockTests](https://github.com/oneclickvirt/UnlockTests), logic modified from [RegionRestrictionCheck](https://github.com/lmc999/RegionRestrictionCheck) and others

View File

@@ -136,7 +136,8 @@ AMD的7950x单核满血性能得分在6500左右AMD的5950x单核满血性能
依赖项目:[https://github.com/oneclickvirt/memorytest](https://github.com/oneclickvirt/memorytest) 依赖项目:[https://github.com/oneclickvirt/memorytest](https://github.com/oneclickvirt/memorytest)
一般来说,只需要判断 IO 速度是否低于 `10240 MB/s (≈10 GB/s)` 一般来说,只需要判断 IO 速度是否低于 `10240 MB/s (≈10 GB/s)`
如果低于这个值,那么证明内存性能不佳,极大概率存在超售超卖问题。 如果低于这个值,那么证明内存性能不佳,极大概率存在超售超卖问题。
至于超开的原因可能是: 至于超开的原因可能是:
@@ -160,6 +161,16 @@ AMD的7950x单核满血性能得分在6500左右AMD的5950x单核满血性能
* **20 \~ 40 GB/s (20480 \~ 40960 MB/s)** → 大概率 DDR4 * **20 \~ 40 GB/s (20480 \~ 40960 MB/s)** → 大概率 DDR4
* **≈ 50 GB/s (≈ 51200 MB/s)** → 基本就是 DDR5 * **≈ 50 GB/s (≈ 51200 MB/s)** → 基本就是 DDR5
对于各种测试参数对应方法的比较:
| 参数方法 | 测试准确性 | 速度 | 适应架构 | 依赖情况 |
|----------|------------|----------|----------|----------|
| stream | 高, 结果稳定,更符合实际情况 | 快速 | 跨平台Linux/Windows/Unix | 自带依赖无需额外安装 |
| sysbench | 高, 结果较可靠 | 中等 | 跨平台Linux、Windows 部分支持) | 需环境额外安装 |
| winsat | 中等偏高, Windows 内置工具 | 中等 | 仅限 Windows | 物理机器上自带,虚拟机不可用 |
| mbw | 中等, 结果可能受缓存/调度影响 | 快速 | 跨平台(几乎所有类 Unix 系统) | 自带依赖无需额外安装 |
| dd | 低, 结果受缓存影响 | 快速 | 跨平台(几乎所有类 Unix 系统) | 自带依赖无需额外安装 |
### **硬盘测试** ### **硬盘测试**
依赖项目:[https://github.com/oneclickvirt/disktest](https://github.com/oneclickvirt/disktest) 依赖项目:[https://github.com/oneclickvirt/disktest](https://github.com/oneclickvirt/disktest)
@@ -412,6 +423,7 @@ Actually, CPU performance testing should be sufficient. Unless for scientific co
Dependency project: [https://github.com/oneclickvirt/memorytest](https://github.com/oneclickvirt/memorytest) Dependency project: [https://github.com/oneclickvirt/memorytest](https://github.com/oneclickvirt/memorytest)
Generally speaking, you only need to determine if IO speed is below `10240 MB/s (≈10 GB/s)`. Generally speaking, you only need to determine if IO speed is below `10240 MB/s (≈10 GB/s)`.
If below this value, it proves poor memory performance with high probability of overselling issues. If below this value, it proves poor memory performance with high probability of overselling issues.
Possible reasons for overselling: Possible reasons for overselling:
@@ -435,6 +447,14 @@ Based on the above table, this project's rough judgment method:
* **20 ~ 40 GB/s (20480 ~ 40960 MB/s)** → Most likely DDR4 * **20 ~ 40 GB/s (20480 ~ 40960 MB/s)** → Most likely DDR4
* **≈ 50 GB/s (≈ 51200 MB/s)** → Basically DDR5 * **≈ 50 GB/s (≈ 51200 MB/s)** → Basically DDR5
| Parameter Method | Test Accuracy | Test Speed | Architecture Compatibility | Dependency Requirements |
|----------|------------|----------|----------|----------|
| stream | High — Stable results, more realistic | Fast | Cross-platform (Linux/Windows/Unix) | Built-in dependencies, no additional installation required |
| sysbench | High — Reliable results | Medium | Cross-platform (Linux, partial Windows support) | Requires additional environment installation |
| winsat | Medium-High — Windows built-in tool | Medium | Windows only | Built-in on physical machines, unavailable on virtual machines |
| mbw | Medium — Results may be affected by cache/scheduling | Very Fast | Cross-platform (almost all Unix-like systems) | Built-in dependencies, no additional installation required |
| dd | Low — Results affected by cache | Fast | Cross-platform (almost all Unix-like systems) | Built-in dependencies, no additional installation required |
### Disk Testing ### Disk Testing
Dependency project: [https://github.com/oneclickvirt/disktest](https://github.com/oneclickvirt/disktest) Dependency project: [https://github.com/oneclickvirt/disktest](https://github.com/oneclickvirt/disktest)
@@ -633,6 +653,7 @@ AMD 7950xシングルコアフル性能スコアは6500前後、AMD 5950xシン
依存プロジェクト:[https://github.com/oneclickvirt/memorytest](https://github.com/oneclickvirt/memorytest) 依存プロジェクト:[https://github.com/oneclickvirt/memorytest](https://github.com/oneclickvirt/memorytest)
一般的に、IO速度が`10240 MB/s (≈10 GB/s)`を下回るかどうかを判断するだけで十分です。 一般的に、IO速度が`10240 MB/s (≈10 GB/s)`を下回るかどうかを判断するだけで十分です。
この値を下回る場合、メモリ性能が不良で、オーバーセリング問題が存在する可能性が極めて高いことを証明します。 この値を下回る場合、メモリ性能が不良で、オーバーセリング問題が存在する可能性が極めて高いことを証明します。
オーバーセリングの原因は以下が考えられます: オーバーセリングの原因は以下が考えられます:
@@ -656,6 +677,14 @@ AMD 7950xシングルコアフル性能スコアは6500前後、AMD 5950xシン
* **20 ~ 40 GB/s (20480 ~ 40960 MB/s)** → 高確率でDDR4 * **20 ~ 40 GB/s (20480 ~ 40960 MB/s)** → 高確率でDDR4
* **≈ 50 GB/s (≈ 51200 MB/s)** → 基本的にDDR5 * **≈ 50 GB/s (≈ 51200 MB/s)** → 基本的にDDR5
| パラメータ方法 | テスト精度 | テスト速度 | アーキテクチャ対応 | 依存関係 |
|----------|------------|----------|----------|----------|
| stream | 高 — 結果が安定し、実際の状況により適合 | 高速 | クロスプラットフォームLinux/Windows/Unix | 内蔵依存関係、追加インストール不要 |
| sysbench | 高 — 結果が信頼性高い | 中程度 | クロスプラットフォームLinux、Windows部分対応 | 環境への追加インストールが必要 |
| winsat | 中程度やや高 — Windows内蔵ツール | 中程度 | Windows限定 | 物理マシンに内蔵、仮想マシンでは利用不可 |
| mbw | 中程度 — 結果がキャッシュ/スケジューリングの影響を受ける可能性 | 非常に高速 | クロスプラットフォームほぼ全てのUnix系システム | 内蔵依存関係、追加インストール不要 |
| dd | 低 — 結果がキャッシュの影響を受ける | 高速 | クロスプラットフォームほぼ全てのUnix系システム | 内蔵依存関係、追加インストール不要 |
### ディスクテスト ### ディスクテスト
依存プロジェクト:[https://github.com/oneclickvirt/disktest](https://github.com/oneclickvirt/disktest) 依存プロジェクト:[https://github.com/oneclickvirt/disktest](https://github.com/oneclickvirt/disktest)

5
go.mod
View File

@@ -5,14 +5,14 @@ go 1.24.5
require ( require (
github.com/imroc/req/v3 v3.54.0 github.com/imroc/req/v3 v3.54.0
github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841 github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841
github.com/oneclickvirt/UnlockTests v0.0.28-20250727155204 github.com/oneclickvirt/UnlockTests v0.0.28-20250924054500
github.com/oneclickvirt/backtrace v0.0.7-20250811023541 github.com/oneclickvirt/backtrace v0.0.7-20250811023541
github.com/oneclickvirt/basics v0.0.15-20250812130523 github.com/oneclickvirt/basics v0.0.15-20250812130523
github.com/oneclickvirt/cputest v0.0.12-20250720122317 github.com/oneclickvirt/cputest v0.0.12-20250720122317
github.com/oneclickvirt/defaultset v0.0.2-20240624082446 github.com/oneclickvirt/defaultset v0.0.2-20240624082446
github.com/oneclickvirt/disktest v0.0.10-20250924030424 github.com/oneclickvirt/disktest v0.0.10-20250924030424
github.com/oneclickvirt/gostun v0.0.5-20250727155022 github.com/oneclickvirt/gostun v0.0.5-20250727155022
github.com/oneclickvirt/memorytest v0.0.9-20250808065154 github.com/oneclickvirt/memorytest v0.0.10-20250924154648
github.com/oneclickvirt/nt3 v0.0.8-20250811123903 github.com/oneclickvirt/nt3 v0.0.8-20250811123903
github.com/oneclickvirt/pingtest v0.0.8-20250728015259 github.com/oneclickvirt/pingtest v0.0.8-20250728015259
github.com/oneclickvirt/portchecker v0.0.3-20250728015900 github.com/oneclickvirt/portchecker v0.0.3-20250728015900
@@ -61,6 +61,7 @@ require (
github.com/oneclickvirt/dd v0.0.2-20250808062818 // indirect github.com/oneclickvirt/dd v0.0.2-20250808062818 // indirect
github.com/oneclickvirt/fio v0.0.2-20250808045755 // indirect github.com/oneclickvirt/fio v0.0.2-20250808045755 // indirect
github.com/oneclickvirt/mbw v0.0.1-20250808061222 // indirect github.com/oneclickvirt/mbw v0.0.1-20250808061222 // indirect
github.com/oneclickvirt/stream v0.0.2-20250924154001 // indirect
github.com/oschwald/maxminddb-golang v1.13.1 // indirect github.com/oschwald/maxminddb-golang v1.13.1 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pion/dtls/v2 v2.2.7 // indirect github.com/pion/dtls/v2 v2.2.7 // indirect

10
go.sum
View File

@@ -96,8 +96,8 @@ github.com/nxtrace/NTrace-core v1.4.2 h1:dSRP18Bn3VGf5CZBzKt8gQWW9mDkq62Np9TCF9R
github.com/nxtrace/NTrace-core v1.4.2/go.mod h1:wIDOlccuYzY3wBqU89pv2KGHT41i3JA0eRqJU/x9eX4= github.com/nxtrace/NTrace-core v1.4.2/go.mod h1:wIDOlccuYzY3wBqU89pv2KGHT41i3JA0eRqJU/x9eX4=
github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841 h1:Zef93z9UiZQwRAKnnZYALmpBKvvuVaq34MEsuWwk6nc= github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841 h1:Zef93z9UiZQwRAKnnZYALmpBKvvuVaq34MEsuWwk6nc=
github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841/go.mod h1:DAmFPRjFV5p9fEzUUSml5jJGn2f1NZJQCzTxITHDjc4= github.com/oneclickvirt/CommonMediaTests v0.0.4-20250329123841/go.mod h1:DAmFPRjFV5p9fEzUUSml5jJGn2f1NZJQCzTxITHDjc4=
github.com/oneclickvirt/UnlockTests v0.0.28-20250727155204 h1:apFaEbHGKflYMZzK17nXzEai4GG873mTd+d9hCO/KdY= github.com/oneclickvirt/UnlockTests v0.0.28-20250924054500 h1:ERFoRBYhTPWJBYhEVFWr3hm6KtSTUHuWD21jK7DhKZw=
github.com/oneclickvirt/UnlockTests v0.0.28-20250727155204/go.mod h1:oOa6wj/qECtRMxwBO6D7o0L0F0Q/5sQ747OCnFQqoGE= github.com/oneclickvirt/UnlockTests v0.0.28-20250924054500/go.mod h1:oOa6wj/qECtRMxwBO6D7o0L0F0Q/5sQ747OCnFQqoGE=
github.com/oneclickvirt/backtrace v0.0.7-20250811023541 h1:GzkzvUC6U9b6Dkz/Bl4JRPeQ7XBGoW7Qw1aWqzhF+MQ= github.com/oneclickvirt/backtrace v0.0.7-20250811023541 h1:GzkzvUC6U9b6Dkz/Bl4JRPeQ7XBGoW7Qw1aWqzhF+MQ=
github.com/oneclickvirt/backtrace v0.0.7-20250811023541/go.mod h1:/+KUtOWz48TyiTTbhVTsp3D6b5WY+4pCgvFBYtUGtns= github.com/oneclickvirt/backtrace v0.0.7-20250811023541/go.mod h1:/+KUtOWz48TyiTTbhVTsp3D6b5WY+4pCgvFBYtUGtns=
github.com/oneclickvirt/basics v0.0.15-20250812130523 h1:nPNTVq8d9N1rdshkMAbnhZxTb7L2Yt7NlIg6rY10YRQ= github.com/oneclickvirt/basics v0.0.15-20250812130523 h1:nPNTVq8d9N1rdshkMAbnhZxTb7L2Yt7NlIg6rY10YRQ=
@@ -116,8 +116,8 @@ github.com/oneclickvirt/gostun v0.0.5-20250727155022 h1:/e3gSUrOp1tg/1NTRx+P8B51
github.com/oneclickvirt/gostun v0.0.5-20250727155022/go.mod h1:pfp7MFZJK9n/KTLAVqqFcCAns4xqMykmjI+1UeF/vdE= github.com/oneclickvirt/gostun v0.0.5-20250727155022/go.mod h1:pfp7MFZJK9n/KTLAVqqFcCAns4xqMykmjI+1UeF/vdE=
github.com/oneclickvirt/mbw v0.0.1-20250808061222 h1:WGXOe6QvHiDRhPVMI0VcctjzW08kGvJf50yq5YeZCtw= github.com/oneclickvirt/mbw v0.0.1-20250808061222 h1:WGXOe6QvHiDRhPVMI0VcctjzW08kGvJf50yq5YeZCtw=
github.com/oneclickvirt/mbw v0.0.1-20250808061222/go.mod h1:0Vq6NRpyLmGUdfHfL3uDcFsuZhi7KlG+OCs5ky2757Y= github.com/oneclickvirt/mbw v0.0.1-20250808061222/go.mod h1:0Vq6NRpyLmGUdfHfL3uDcFsuZhi7KlG+OCs5ky2757Y=
github.com/oneclickvirt/memorytest v0.0.9-20250808065154 h1:mjYOvpFz2mpDU9MNjj66oIDcc2r6+zoW8veP616/+4Q= github.com/oneclickvirt/memorytest v0.0.10-20250924154648 h1:trk6oZ7xs1eVtr+6oIv5IX8LDVtEMG+E6GVzQ810BtU=
github.com/oneclickvirt/memorytest v0.0.9-20250808065154/go.mod h1:DBxiVZX7mWCe0Fy+qu57ENheLo00sLfjKzvxiICrUtU= github.com/oneclickvirt/memorytest v0.0.10-20250924154648/go.mod h1:4kiHsEWkW9r3/1ZcV5xIweU0smiKP0IRfQj74AUIiVI=
github.com/oneclickvirt/nt3 v0.0.8-20250811123903 h1:ubSPLh/DSrXj+tOgmRABgi2vrVmbmjjSne+NrVFNmNc= github.com/oneclickvirt/nt3 v0.0.8-20250811123903 h1:ubSPLh/DSrXj+tOgmRABgi2vrVmbmjjSne+NrVFNmNc=
github.com/oneclickvirt/nt3 v0.0.8-20250811123903/go.mod h1:F1v+6xInBKnbUa8gV1M40R1HOzxg+obtduNhx3CTnmA= github.com/oneclickvirt/nt3 v0.0.8-20250811123903/go.mod h1:F1v+6xInBKnbUa8gV1M40R1HOzxg+obtduNhx3CTnmA=
github.com/oneclickvirt/pingtest v0.0.8-20250728015259 h1:egoxZRZBOWN3JqBwqEsULDyRo2/dpGMeWcmV3U87zig= github.com/oneclickvirt/pingtest v0.0.8-20250728015259 h1:egoxZRZBOWN3JqBwqEsULDyRo2/dpGMeWcmV3U87zig=
@@ -128,6 +128,8 @@ github.com/oneclickvirt/security v0.0.6-20250823030124 h1:3RjpJNfKV7anN6GJs0ky2B
github.com/oneclickvirt/security v0.0.6-20250823030124/go.mod h1:RSMooIlb4H/kLrGWNvUyOgdzQKgYKVv+LzWGlsPsLW4= github.com/oneclickvirt/security v0.0.6-20250823030124/go.mod h1:RSMooIlb4H/kLrGWNvUyOgdzQKgYKVv+LzWGlsPsLW4=
github.com/oneclickvirt/speedtest v0.0.10-20250728015734 h1:HKO7/JQ74ueXA8Wo8NIvcK9DphbEG/YTfAAVz/akSiY= github.com/oneclickvirt/speedtest v0.0.10-20250728015734 h1:HKO7/JQ74ueXA8Wo8NIvcK9DphbEG/YTfAAVz/akSiY=
github.com/oneclickvirt/speedtest v0.0.10-20250728015734/go.mod h1:0W8vnMbA3iucXLXFdGfe9Ia6RPS0izRO7jvu/SnH1P8= github.com/oneclickvirt/speedtest v0.0.10-20250728015734/go.mod h1:0W8vnMbA3iucXLXFdGfe9Ia6RPS0izRO7jvu/SnH1P8=
github.com/oneclickvirt/stream v0.0.2-20250924154001 h1:GuJWdiPkoK84+y/+oHKr2Ghl3c/MzS9Z5m1nM+lMmy4=
github.com/oneclickvirt/stream v0.0.2-20250924154001/go.mod h1:oWaizaHTC2VQciBC9RfaLbAOf8qeR6n20/gY7QxriDE=
github.com/oschwald/maxminddb-golang v1.13.1 h1:G3wwjdN9JmIK2o/ermkHM+98oX5fS+k5MbwsmL4MRQE= github.com/oschwald/maxminddb-golang v1.13.1 h1:G3wwjdN9JmIK2o/ermkHM+98oX5fS+k5MbwsmL4MRQE=
github.com/oschwald/maxminddb-golang v1.13.1/go.mod h1:K4pgV9N/GcK694KSTmVSDTODk4IsCNThNdTmnaBZ/F8= github.com/oschwald/maxminddb-golang v1.13.1/go.mod h1:K4pgV9N/GcK694KSTmVSDTODk4IsCNThNdTmnaBZ/F8=
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=

View File

@@ -39,7 +39,7 @@ import (
) )
var ( var (
ecsVersion = "v0.1.88" ecsVersion = "v0.1.89"
menuMode bool menuMode bool
onlyChinaTest bool onlyChinaTest bool
input, choice string input, choice string
@@ -139,7 +139,7 @@ func parseFlags() {
goecsFlag.BoolVar(&speedTestStatus, "speed", true, "Enable/Disable speed test") goecsFlag.BoolVar(&speedTestStatus, "speed", true, "Enable/Disable speed test")
goecsFlag.StringVar(&cpuTestMethod, "cpum", "sysbench", "Set CPU test method (supported: sysbench, geekbench, winsat)") goecsFlag.StringVar(&cpuTestMethod, "cpum", "sysbench", "Set CPU test method (supported: sysbench, geekbench, winsat)")
goecsFlag.StringVar(&cpuTestThreadMode, "cput", "multi", "Set CPU test thread mode (supported: single, multi)") goecsFlag.StringVar(&cpuTestThreadMode, "cput", "multi", "Set CPU test thread mode (supported: single, multi)")
goecsFlag.StringVar(&memoryTestMethod, "memorym", "sysbench", "Set memory test method (supported: sysbench, dd, winsat)") goecsFlag.StringVar(&memoryTestMethod, "memorym", "stream", "Set memory test method (supported: stream, sysbench, dd, winsat, auto)")
goecsFlag.StringVar(&diskTestMethod, "diskm", "fio", "Set disk test method (supported: fio, dd, winsat)") goecsFlag.StringVar(&diskTestMethod, "diskm", "fio", "Set disk test method (supported: fio, dd, winsat)")
goecsFlag.StringVar(&diskTestPath, "diskp", "", "Set disk test path, e.g., -diskp /root") goecsFlag.StringVar(&diskTestPath, "diskp", "", "Set disk test path, e.g., -diskp /root")
goecsFlag.BoolVar(&diskMultiCheck, "diskmc", false, "Enable/Disable multiple disk checks, e.g., -diskmc=false") goecsFlag.BoolVar(&diskMultiCheck, "diskmc", false, "Enable/Disable multiple disk checks, e.g., -diskmc=false")

View File

@@ -152,7 +152,7 @@ goecs_check() {
os=$(uname -s 2>/dev/null || echo "Unknown") os=$(uname -s 2>/dev/null || echo "Unknown")
arch=$(uname -m 2>/dev/null || echo "Unknown") arch=$(uname -m 2>/dev/null || echo "Unknown")
check_china check_china
ECS_VERSION="0.1.87" ECS_VERSION="0.1.89"
for api in \ for api in \
"https://api.github.com/repos/oneclickvirt/ecs/releases/latest" \ "https://api.github.com/repos/oneclickvirt/ecs/releases/latest" \
"https://githubapi.spiritlhl.workers.dev/repos/oneclickvirt/ecs/releases/latest" \ "https://githubapi.spiritlhl.workers.dev/repos/oneclickvirt/ecs/releases/latest" \
@@ -164,8 +164,8 @@ goecs_check() {
sleep 1 sleep 1
done done
if [ -z "$ECS_VERSION" ]; then if [ -z "$ECS_VERSION" ]; then
_yellow "Unable to get version info, using default version 0.1.87" _yellow "Unable to get version info, using default version 0.1.89"
ECS_VERSION="0.1.87" ECS_VERSION="0.1.89"
fi fi
version_output="" version_output=""
for cmd_path in "goecs" "./goecs" "/usr/bin/goecs" "/usr/local/bin/goecs"; do for cmd_path in "goecs" "./goecs" "/usr/bin/goecs" "/usr/local/bin/goecs"; do

View File

@@ -8,27 +8,78 @@ import (
) )
func MemoryTest(language, testMethod string) (realTestMethod, res string) { func MemoryTest(language, testMethod string) (realTestMethod, res string) {
testMethod = strings.ToLower(testMethod)
if testMethod == "" {
testMethod = "auto"
}
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
if testMethod != "winsat" && testMethod != "" { switch testMethod {
case "stream":
res = memory.WinsatTest(language)
realTestMethod = "winsat"
case "dd":
res = memory.WindowsDDTest(language)
if res == "" || strings.TrimSpace(res) == "" {
res += memory.WinsatTest(language)
realTestMethod = "winsat"
} else {
realTestMethod = "dd"
}
case "sysbench":
res = memory.WinsatTest(language)
realTestMethod = "winsat"
case "auto", "winsat":
res = memory.WinsatTest(language)
realTestMethod = "winsat"
default:
res = memory.WinsatTest(language)
realTestMethod = "winsat" realTestMethod = "winsat"
} }
res += memory.WinsatTest(language)
} else { } else {
switch testMethod { switch testMethod {
case "stream":
res = memory.StreamTest(language)
if res == "" || strings.TrimSpace(res) == "" {
res += memory.DDTest(language)
realTestMethod = "dd"
} else {
realTestMethod = "stream"
}
case "dd":
res = memory.DDTest(language)
realTestMethod = "dd"
case "sysbench": case "sysbench":
res = memory.SysBenchTest(language) res = memory.SysBenchTest(language)
if res == "" { if res == "" || strings.TrimSpace(res) == "" {
res += memory.DDTest(language) res += memory.DDTest(language)
realTestMethod = "dd" realTestMethod = "dd"
} else { } else {
realTestMethod = "sysbench" realTestMethod = "sysbench"
} }
case "dd": case "auto":
res = memory.StreamTest(language)
if res == "" || strings.TrimSpace(res) == "" {
res = memory.DDTest(language)
if res == "" || strings.TrimSpace(res) == "" {
res = memory.SysBenchTest(language)
if res == "" || strings.TrimSpace(res) == "" {
realTestMethod = ""
} else {
realTestMethod = "sysbench"
}
} else {
realTestMethod = "dd"
}
} else {
realTestMethod = "stream"
}
case "winsat":
// winsat 仅 Windows 支持,非 Windows fallback 到 dd
res = memory.DDTest(language) res = memory.DDTest(language)
realTestMethod = "dd" realTestMethod = "dd"
default: default:
res += memory.DDTest(language) res = "Unsupported test method"
realTestMethod = "dd" realTestMethod = ""
} }
} }
if !strings.Contains(res, "\n") && res != "" { if !strings.Contains(res, "\n") && res != "" {

View File

@@ -6,6 +6,6 @@ import (
) )
func Test(t *testing.T) { func Test(t *testing.T) {
_, res := MemoryTest("zh", "sysbench") _, res := MemoryTest("zh", "stream")
fmt.Print(res) fmt.Print(res)
} }