提交 1102a88a 编写于 作者: G gccgdb1234

bench

上级 b8dd3843
......@@ -32,6 +32,22 @@ typedef struct {
void *pRpc;
} SInfo;
void initLogEnv() {
const char *logDir = "/tmp/trans_cli";
const char* defaultLogFileNamePrefix = "taoslog";
const int32_t maxLogFileNum = 10000;
tsAsyncLog = 0;
//idxDebugFlag = 143;
strcpy(tsLogDir, (char *)logDir);
taosRemoveDir(tsLogDir);
taosMkDir(tsLogDir);
if (taosInitLog(defaultLogFileNamePrefix, maxLogFileNum) < 0) {
printf("failed to open log file in directory:%s\n", tsLogDir);
}
}
static void processResponse(void *parent, SRpcMsg *pMsg, SEpSet *pEpSet) {
SInfo *pInfo = (SInfo *)pMsg->info.ahandle;
tDebug("thread:%d, response is received, type:%d contLen:%d code:0x%x", pInfo->index, pMsg->msgType, pMsg->contLen,
......@@ -98,7 +114,7 @@ int main(int argc, char *argv[]) {
rpcInit.user = "michael";
rpcInit.connType = TAOS_CONN_CLIENT;
rpcDebugFlag = 131;
rpcDebugFlag = 135;
for (int i = 1; i < argc; ++i) {
if (strcmp(argv[i], "-p") == 0 && i < argc - 1) {
} else if (strcmp(argv[i], "-i") == 0 && i < argc - 1) {
......@@ -132,7 +148,9 @@ int main(int argc, char *argv[]) {
exit(0);
}
}
taosInitLog("client.log", 100000);
initLogEnv();
void *pRpc = rpcOpen(&rpcInit);
if (pRpc == NULL) {
......
......@@ -26,6 +26,20 @@ TdFilePtr pDataFile = NULL;
STaosQueue *qhandle = NULL;
STaosQset *qset = NULL;
void initLogEnv() {
const char *logDir = "/tmp/trans_svr";
const char* defaultLogFileNamePrefix = "taoslog";
const int32_t maxLogFileNum = 10000;
tsAsyncLog = 0;
//idxDebugFlag = 143;
strcpy(tsLogDir, logDir);
taosRemoveDir(tsLogDir);
taosMkDir(tsLogDir);
if (taosInitLog(defaultLogFileNamePrefix, maxLogFileNum) < 0) {
printf("failed to open log file in directory:%s\n", tsLogDir);
}
}
void processShellMsg() {
static int num = 0;
STaosQall *qall;
......@@ -147,9 +161,9 @@ int main(int argc, char *argv[]) {
}
}
tsAsyncLog = 0;
rpcInit.connType = TAOS_CONN_SERVER;
taosInitLog("server.log", 100000);
initLogEnv();
void *pRpc = rpcOpen(&rpcInit);
if (pRpc == NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册