diff --git a/tools/taos-tools/inc/benchCsv.h b/tools/taos-tools/inc/benchCsv.h index f9f87aa341..e80f73bcda 100644 --- a/tools/taos-tools/inc/benchCsv.h +++ b/tools/taos-tools/inc/benchCsv.h @@ -57,7 +57,8 @@ typedef struct { typedef struct { CsvNamingType naming_type; size_t total_threads; - char thread_formatter[TINY_BUFF_LEN]; + char mode[MIDDLE_BUFF_LEN]; + char thread_formatter[SMALL_BUFF_LEN]; char csv_header[LARGE_BUFF_LEN]; int csv_header_length; SDataBase* db; diff --git a/tools/taos-tools/src/benchCsv.c b/tools/taos-tools/src/benchCsv.c index 61334c418d..32a48e70d0 100644 --- a/tools/taos-tools/src/benchCsv.c +++ b/tools/taos-tools/src/benchCsv.c @@ -479,18 +479,22 @@ static int csvInitWriteMeta(SDataBase* db, SSuperTable* stb, CsvWriteMeta* write switch (write_meta->naming_type) { case CSV_NAMING_I_SINGLE: { + (void)snprintf(write_meta->mode, sizeof(write_meta->mode), "interlace|no-time-slice"); break; } case CSV_NAMING_I_TIME_SLICE: { + (void)snprintf(write_meta->mode, sizeof(write_meta->mode), "interlace|time-slice"); csvCalcTimestampStep(write_meta); break; } case CSV_NAMING_B_THREAD: { + (void)snprintf(write_meta->mode, sizeof(write_meta->mode), "batch|no-time-slice"); write_meta->total_threads = MIN(g_arguments->nthreads, stb->childTblCount); csvGenThreadFormatter(write_meta); break; } case CSV_NAMING_B_THREAD_TIME_SLICE: { + (void)snprintf(write_meta->mode, sizeof(write_meta->mode), "batch|time-slice"); write_meta->total_threads = MIN(g_arguments->nthreads, stb->childTblCount); csvGenThreadFormatter(write_meta); csvCalcTimestampStep(write_meta); @@ -1056,6 +1060,8 @@ static int csvGenStbProcess(SDataBase* db, SSuperTable* stb) { goto end; } + infoPrint("export csv mode: %s.\n", write_meta->mode); + args = benchCalloc(write_meta->total_threads, sizeof(CsvThreadArgs), false); if (!args) { ret = -1;