feat: print csv export mode
This commit is contained in:
parent
7eef6659ac
commit
cd958c9f17
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue