提交 2220b7e9 编写于 作者: dengyihao's avatar dengyihao

update benchmark case

上级 60e148d5
...@@ -32,13 +32,12 @@ typedef struct { ...@@ -32,13 +32,12 @@ typedef struct {
void *pRpc; void *pRpc;
} SInfo; } SInfo;
void initLogEnv() { void initLogEnv() {
const char *logDir = "/tmp/trans_cli"; const char *logDir = "/tmp/trans_cli";
const char* defaultLogFileNamePrefix = "taoslog"; const char *defaultLogFileNamePrefix = "taoslog";
const int32_t maxLogFileNum = 10000; const int32_t maxLogFileNum = 10000;
tsAsyncLog = 0; tsAsyncLog = 0;
//idxDebugFlag = 143; // idxDebugFlag = 143;
strcpy(tsLogDir, (char *)logDir); strcpy(tsLogDir, (char *)logDir);
taosRemoveDir(tsLogDir); taosRemoveDir(tsLogDir);
taosMkDir(tsLogDir); taosMkDir(tsLogDir);
...@@ -72,11 +71,12 @@ static void *sendRequest(void *param) { ...@@ -72,11 +71,12 @@ static void *sendRequest(void *param) {
rpcMsg.pCont = rpcMallocCont(pInfo->msgSize); rpcMsg.pCont = rpcMallocCont(pInfo->msgSize);
rpcMsg.contLen = pInfo->msgSize; rpcMsg.contLen = pInfo->msgSize;
rpcMsg.info.ahandle = pInfo; rpcMsg.info.ahandle = pInfo;
rpcMsg.info.noResp = 1;
rpcMsg.msgType = 1; rpcMsg.msgType = 1;
tDebug("thread:%d, send request, contLen:%d num:%d", pInfo->index, pInfo->msgSize, pInfo->num); tDebug("thread:%d, send request, contLen:%d num:%d", pInfo->index, pInfo->msgSize, pInfo->num);
rpcSendRequest(pInfo->pRpc, &pInfo->epSet, &rpcMsg, NULL); rpcSendRequest(pInfo->pRpc, &pInfo->epSet, &rpcMsg, NULL);
if (pInfo->num % 20000 == 0) tInfo("thread:%d, %d requests have been sent", pInfo->index, pInfo->num); if (pInfo->num % 20000 == 0) tInfo("thread:%d, %d requests have been sent", pInfo->index, pInfo->num);
tsem_wait(&pInfo->rspSem); // tsem_wait(&pInfo->rspSem);
} }
tDebug("thread:%d, it is over", pInfo->index); tDebug("thread:%d, it is over", pInfo->index);
...@@ -112,7 +112,11 @@ int main(int argc, char *argv[]) { ...@@ -112,7 +112,11 @@ int main(int argc, char *argv[]) {
rpcInit.sessions = 100; rpcInit.sessions = 100;
rpcInit.idleTime = tsShellActivityTimer * 1000; rpcInit.idleTime = tsShellActivityTimer * 1000;
rpcInit.user = "michael"; rpcInit.user = "michael";
rpcInit.connType = TAOS_CONN_CLIENT; rpcInit.connType = TAOS_CONN_CLIENT;
rpcInit.connLimitNum = 300;
rpcInit.connLimitLock = 1;
rpcInit.supportBatch = 0;
rpcDebugFlag = 135; rpcDebugFlag = 135;
for (int i = 1; i < argc; ++i) { for (int i = 1; i < argc; ++i) {
...@@ -149,7 +153,6 @@ int main(int argc, char *argv[]) { ...@@ -149,7 +153,6 @@ int main(int argc, char *argv[]) {
} }
} }
initLogEnv(); initLogEnv();
void *pRpc = rpcOpen(&rpcInit); void *pRpc = rpcOpen(&rpcInit);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册