mirror of
https://github.com/oneclickvirt/ecs.git
synced 2025-10-05 23:37:07 +08:00
update
This commit is contained in:
@@ -177,6 +177,8 @@ Usage: goecs [options]
|
|||||||
Enable/Disable speed test (default true)
|
Enable/Disable speed test (default true)
|
||||||
-spnum int
|
-spnum int
|
||||||
Set the number of servers per operator for speed test (default 2)
|
Set the number of servers per operator for speed test (default 2)
|
||||||
|
-upload
|
||||||
|
Enable/Disable upload the result (default true)
|
||||||
-ut
|
-ut
|
||||||
Enable/Disable unlock media test (default true)
|
Enable/Disable unlock media test (default true)
|
||||||
-v Display version information
|
-v Display version information
|
||||||
|
@@ -165,6 +165,8 @@ Usage: goecs [options]
|
|||||||
Enable/Disable speed test (default true)
|
Enable/Disable speed test (default true)
|
||||||
-spnum int
|
-spnum int
|
||||||
Set the number of servers per operator for speed test (default 2)
|
Set the number of servers per operator for speed test (default 2)
|
||||||
|
-upload
|
||||||
|
Enable/Disable upload the result (default true)
|
||||||
-ut
|
-ut
|
||||||
Enable/Disable unlock media test (default true)
|
Enable/Disable unlock media test (default true)
|
||||||
-v Display version information
|
-v Display version information
|
||||||
|
20
goecs.go
20
goecs.go
@@ -37,7 +37,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ecsVersion = "v0.0.48"
|
ecsVersion = "v0.0.49"
|
||||||
menuMode bool
|
menuMode bool
|
||||||
onlyChinaTest bool
|
onlyChinaTest bool
|
||||||
input, choice string
|
input, choice string
|
||||||
@@ -252,10 +252,10 @@ func main() {
|
|||||||
securityTestStatus = false
|
securityTestStatus = false
|
||||||
}
|
}
|
||||||
var (
|
var (
|
||||||
startTime time.Time
|
startTime time.Time
|
||||||
wg1, wg2 sync.WaitGroup
|
wg1, wg2, wg3 sync.WaitGroup
|
||||||
basicInfo, securityInfo, emailInfo, mediaInfo string
|
basicInfo, securityInfo, emailInfo, mediaInfo, ptInfo string
|
||||||
output, tempOutput string
|
output, tempOutput string
|
||||||
)
|
)
|
||||||
// 启动一个goroutine来等待信号,内置计时器
|
// 启动一个goroutine来等待信号,内置计时器
|
||||||
go func() {
|
go func() {
|
||||||
@@ -308,6 +308,13 @@ func main() {
|
|||||||
disktest.DiskTest(language, diskTestMethod, diskTestPath, diskMultiCheck)
|
disktest.DiskTest(language, diskTestMethod, diskTestPath, diskMultiCheck)
|
||||||
}
|
}
|
||||||
}, tempOutput, output)
|
}, tempOutput, output)
|
||||||
|
if onlyChinaTest || pingTestStatus {
|
||||||
|
wg3.Add(1)
|
||||||
|
go func() {
|
||||||
|
defer wg3.Done()
|
||||||
|
ptInfo = pt.PingTest()
|
||||||
|
}()
|
||||||
|
}
|
||||||
if emailTestStatus {
|
if emailTestStatus {
|
||||||
wg2.Add(1)
|
wg2.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
@@ -365,7 +372,8 @@ func main() {
|
|||||||
output = utils.PrintAndCapture(func() {
|
output = utils.PrintAndCapture(func() {
|
||||||
if onlyChinaTest || pingTestStatus {
|
if onlyChinaTest || pingTestStatus {
|
||||||
utils.PrintCenteredTitle("三网ICMP的PING值检测", width)
|
utils.PrintCenteredTitle("三网ICMP的PING值检测", width)
|
||||||
pt.PingTest()
|
wg3.Wait()
|
||||||
|
fmt.Println(ptInfo)
|
||||||
}
|
}
|
||||||
}, tempOutput, output)
|
}, tempOutput, output)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user