提交 841ac534 编写于 作者: sangshuduo's avatar sangshuduo

[TD-3143] <fix>: make taosdemo works on windows. adjust debug info.

上级 808e674e
...@@ -4029,10 +4029,7 @@ send_to_server: ...@@ -4029,10 +4029,7 @@ send_to_server:
int affectedRows = queryDbExec( int affectedRows = queryDbExec(
winfo->taos, buffer, INSERT_TYPE); winfo->taos, buffer, INSERT_TYPE);
if (0 > affectedRows) { if (0 < affectedRows) {
fprintf(stderr, "queryDbExec() buffer:\n%s\naffected rows is %d", buffer, affectedRows);
goto free_and_statistics;
} else {
endTs = taosGetTimestampUs(); endTs = taosGetTimestampUs();
int64_t delay = endTs - startTs; int64_t delay = endTs - startTs;
if (delay > winfo->maxDelay) winfo->maxDelay = delay; if (delay > winfo->maxDelay) winfo->maxDelay = delay;
...@@ -4041,6 +4038,9 @@ send_to_server: ...@@ -4041,6 +4038,9 @@ send_to_server:
winfo->totalDelay += delay; winfo->totalDelay += delay;
winfo->avgDelay = (double)winfo->totalDelay / winfo->cntDelay; winfo->avgDelay = (double)winfo->totalDelay / winfo->cntDelay;
winfo->totalAffectedRows += affectedRows; winfo->totalAffectedRows += affectedRows;
} else {
fprintf(stderr, "queryDbExec() buffer:\n%s\naffected rows is %d", buffer, affectedRows);
goto free_and_statistics;
} }
int64_t currentPrintTime = taosGetTimestampMs(); int64_t currentPrintTime = taosGetTimestampMs();
...@@ -4242,7 +4242,7 @@ static void* syncWrite(void *sarg) { ...@@ -4242,7 +4242,7 @@ static void* syncWrite(void *sarg) {
verbosePrint("%s() LN%d %s\n", __func__, __LINE__, buffer); verbosePrint("%s() LN%d %s\n", __func__, __LINE__, buffer);
int affectedRows = queryDbExec(winfo->taos, buffer, 1); int affectedRows = queryDbExec(winfo->taos, buffer, 1);
if (0 <= affectedRows){ if (0 < affectedRows){
endTs = taosGetTimestampUs(); endTs = taosGetTimestampUs();
int64_t delay = endTs - startTs; int64_t delay = endTs - startTs;
if (delay > winfo->maxDelay) if (delay > winfo->maxDelay)
...@@ -4341,7 +4341,7 @@ static void* syncWriteWithStb(void *sarg) { ...@@ -4341,7 +4341,7 @@ static void* syncWriteWithStb(void *sarg) {
int sampleUsePos; int sampleUsePos;
debugPrint("%s() LN%d insertRows=%"PRId64"\n", __func__, __LINE__, superTblInfo->insertRows); verbosePrint("%s() LN%d insertRows=%"PRId64"\n", __func__, __LINE__, superTblInfo->insertRows);
for (uint32_t tID = winfo->start_table_id; tID <= winfo->end_table_id; for (uint32_t tID = winfo->start_table_id; tID <= winfo->end_table_id;
tID++) { tID++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册