From 6b94643111e14f08dac759d785fef193bea8ff73 Mon Sep 17 00:00:00 2001 From: slguan Date: Wed, 15 Apr 2020 23:18:14 +0800 Subject: [PATCH] add test program --- tests/test/c/insertPerRow.c | 4 +++- tests/test/c/insertPerTable.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test/c/insertPerRow.c b/tests/test/c/insertPerRow.c index 3c9564bcd2..74ab238c3f 100644 --- a/tests/test/c/insertPerRow.c +++ b/tests/test/c/insertPerRow.c @@ -253,7 +253,7 @@ void generateRandomPoints() { void printHelp() { char indent[10] = " "; - printf("Used to test the performance of TDengine, the insert method is table-by-table\n"); + printf("Used to test the performance of TDengine\n After writing one row of data to all tables, write the next row\n"); printf("%s%s\n", indent, "-d"); printf("%s%s%s%s\n", indent, indent, "The name of the database to be created, default is ", dbName); @@ -284,6 +284,8 @@ void shellParseArgument(int argc, char *argv[]) { exit(0); } else if (strcmp(argv[i], "-d") == 0) { strcpy(dbName, argv[++i]); + } else if (strcmp(argv[i], "-c") == 0) { + strcpy(configDir, argv[++i]); } else if (strcmp(argv[i], "-s") == 0) { strcpy(stableName, argv[++i]); } else if (strcmp(argv[i], "-r") == 0) { diff --git a/tests/test/c/insertPerTable.c b/tests/test/c/insertPerTable.c index ee4e0fecbd..ca63407463 100644 --- a/tests/test/c/insertPerTable.c +++ b/tests/test/c/insertPerTable.c @@ -258,7 +258,7 @@ void generateRandomPoints() { void printHelp() { char indent[10] = " "; - printf("Used to test the performance of TDengine, the insert method is table-by-table\n"); + printf("Used to test the performance of TDengine\n After writing all the data in one table, start the next table\n"); printf("%s%s\n", indent, "-d"); printf("%s%s%s%s\n", indent, indent, "The name of the database to be created, default is ", dbName); @@ -289,6 +289,8 @@ void shellParseArgument(int argc, char *argv[]) { exit(0); } else if (strcmp(argv[i], "-d") == 0) { strcpy(dbName, argv[++i]); + } else if (strcmp(argv[i], "-c") == 0) { + strcpy(configDir, argv[++i]); } else if (strcmp(argv[i], "-s") == 0) { strcpy(stableName, argv[++i]); } else if (strcmp(argv[i], "-r") == 0) {