You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rition/rition-testsuite/main.go

29 lines
729 B

package main
import (
"flag"
"rition-testsuite/client"
"rition-testsuite/service"
"time"
)
func main() {
// --report '127.0.0.1:22019' --disk_dev nvme0n1 --mount / --net_dev wlp0s20f3 --interval 30
centerServer := flag.String("report", "http://localhost:8000/api/metric/put", "上报中心")
interval := flag.Int("interval", 5, "上报间隔,单位为秒")
dataFile := flag.String("data", "./data/abnormal_data_22000_500_171.json", "数据文件")
flag.Parse()
config := service.Config{
ClientConfig: client.Config{
CenterServer: *centerServer,
},
ReportInterval: time.Duration(*interval) * time.Second,
DataFileLocation: *dataFile,
}
srv := service.NewService(config)
srv.Run()
//srv.Report()
}