[TD-5838]<feature> add description and split speed test and fqdn test
This commit is contained in:
parent
6b0dfd475e
commit
88eab6e357
|
@ -48,7 +48,7 @@ static struct argp_option options[] = {
|
||||||
{"check", 'k', "CHECK", 0, "Check tables."},
|
{"check", 'k', "CHECK", 0, "Check tables."},
|
||||||
{"database", 'd', "DATABASE", 0, "Database to use when connecting to the server."},
|
{"database", 'd', "DATABASE", 0, "Database to use when connecting to the server."},
|
||||||
{"timezone", 't', "TIMEZONE", 0, "Time zone of the shell, default is local."},
|
{"timezone", 't', "TIMEZONE", 0, "Time zone of the shell, default is local."},
|
||||||
{"netrole", 'n', "NETROLE", 0, "Net role when network connectivity test, default is startup, options: client|server|rpc|startup|sync."},
|
{"netrole", 'n', "NETROLE", 0, "Net role when network connectivity test, default is startup, options: client|server|rpc|startup|sync|speen|fqdn."},
|
||||||
{"pktlen", 'l', "PKTLEN", 0, "Packet length used for net test, default is 1000 bytes."},
|
{"pktlen", 'l', "PKTLEN", 0, "Packet length used for net test, default is 1000 bytes."},
|
||||||
{"pktnum", 'N', "PKTNUM", 0, "Packet numbers used for net test, default is 100."},
|
{"pktnum", 'N', "PKTNUM", 0, "Packet numbers used for net test, default is 100."},
|
||||||
{"pkttype", 'S', "PKTTYPE", 0, "Packet type used for net test, default is TCP."},
|
{"pkttype", 'S', "PKTTYPE", 0, "Packet type used for net test, default is TCP."},
|
||||||
|
|
|
@ -52,7 +52,7 @@ void printHelp() {
|
||||||
printf("%s%s\n", indent, "-t");
|
printf("%s%s\n", indent, "-t");
|
||||||
printf("%s%s%s\n", indent, indent, "Time zone of the shell, default is local.");
|
printf("%s%s%s\n", indent, indent, "Time zone of the shell, default is local.");
|
||||||
printf("%s%s\n", indent, "-n");
|
printf("%s%s\n", indent, "-n");
|
||||||
printf("%s%s%s\n", indent, indent, "Net role when network connectivity test, default is startup, options: client|server|rpc|startup|sync.");
|
printf("%s%s%s\n", indent, indent, "Net role when network connectivity test, default is startup, options: client|server|rpc|startup|sync|speed|fqdn.");
|
||||||
printf("%s%s\n", indent, "-l");
|
printf("%s%s\n", indent, "-l");
|
||||||
printf("%s%s%s\n", indent, indent, "Packet length used for net test, default is 1000 bytes.");
|
printf("%s%s%s\n", indent, indent, "Packet length used for net test, default is 1000 bytes.");
|
||||||
printf("%s%s\n", indent, "-N");
|
printf("%s%s\n", indent, "-N");
|
||||||
|
|
|
@ -639,17 +639,6 @@ static void taosNetCheckSpeed(char *host, int32_t port, int32_t pkgLen,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void taosNetTestSpeed(char *host, int32_t port, int32_t pkgLen,
|
|
||||||
int32_t pkgNum, char *pkgType) {
|
|
||||||
if (0 == strcmp("fqdn", pkgType)){
|
|
||||||
taosNetTestFqdn(host);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
taosNetCheckSpeed(host, port, pkgLen, pkgNum, pkgType);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
void taosNetTest(char *role, char *host, int32_t port, int32_t pkgLen,
|
void taosNetTest(char *role, char *host, int32_t port, int32_t pkgLen,
|
||||||
int32_t pkgNum, char *pkgType) {
|
int32_t pkgNum, char *pkgType) {
|
||||||
tscEmbedded = 1;
|
tscEmbedded = 1;
|
||||||
|
@ -679,7 +668,9 @@ void taosNetTest(char *role, char *host, int32_t port, int32_t pkgLen,
|
||||||
} else if (0 == strcmp("speed", role)) {
|
} else if (0 == strcmp("speed", role)) {
|
||||||
tscEmbedded = 0;
|
tscEmbedded = 0;
|
||||||
char type[10] = {0};
|
char type[10] = {0};
|
||||||
taosNetTestSpeed(host, port, pkgLen, pkgNum, strtolower(type, pkgType));
|
taosNetCheckSpeed(host, port, pkgLen, pkgNum, strtolower(type, pkgType));
|
||||||
|
}else if (0 == strcmp("fqdn", role)) {
|
||||||
|
taosNetTestFqdn(host);
|
||||||
}else {
|
}else {
|
||||||
taosNetTestStartup(host, port);
|
taosNetTestStartup(host, port);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue