32 lines
1.5 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package service
import (
"flag"
"os"
)
var (
ServerCmd = flag.NewFlagSet(os.Args[0], flag.ExitOnError)
//服务器启动配置文件
Region = ServerCmd.String("region", "ch", "服务器区域ch代表中国,ea代表欧美,kr代表韩国")
IsDebugMode = ServerCmd.Bool("debugMode", false, "开启测试模式")
flagServerConfigPath = ServerCmd.String("config", "config.yaml", "server config")
flagServerName = ServerCmd.String("server", "", "server name")
ConfigPath = ServerCmd.String("config_path", "./", "配置文件路劲,默认为./")
//临时参数使用
TempParam = ServerCmd.String("diff", "abc", "Temp param")
DBIndexParam = ServerCmd.Int("db", 0, "DBIndexParam")
ZoneParam = ServerCmd.String("zone", "8", "ZoneParam")
MaxOnlineNumParam = ServerCmd.Int("num", 0, "max online num")
TestTypeParam = ServerCmd.Int("t", 1, "test type 1登录压测 2功能压测")
IPParam = ServerCmd.String("ip", "127.0.0.1:21001", "test type 1登录压测 2功能压测")
TypeParam = ServerCmd.String("type", "", "操作类型")
LoginFreq = ServerCmd.Int("login_freq", 100, "登录频率n/s")
BenchmarkFreq = ServerCmd.Int("bench_freq", 1, "压测消息频率n/s")
BeginIndexParam = ServerCmd.Int("index", 1, "机器人开始序列号")
IsStatistic = ServerCmd.Bool("isStatistic", false, "是否开启统计模式")
// Pprof 添加是否开启pprof的参数
Pprof = ServerCmd.String("pprof", "", "开启pprof的地址和端口格式为ip:port")
)