Skip to content

Commit

Permalink
Merge pull request #736 from taosdata/fix/TS-4581
Browse files Browse the repository at this point in the history
enh: rename local variant name
  • Loading branch information
DuanKuanJun committed Apr 1, 2024
2 parents 7c995c5 + 56150b9 commit c84009b
Show file tree
Hide file tree
Showing 8 changed files with 905 additions and 375 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/commitlint.yml

This file was deleted.

3 changes: 1 addition & 2 deletions inc/bench.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ typedef unsigned __int32 uint32_t;
#define BENCH_CHINESE \
"Nchar and binary are basic unicode chinese characters, optional."
#define BENCH_NORMAL "Only create normal table without super table, optional."
#define BENCH_RANDOM "Data source is randomly generated, optional."
#define BENCH_RANDOM "Each child table generates different random data, this option need much memory. ( all memory = childs count * prepared_rand)"
#define BENCH_AGGR "Query aggregation function after insertion, optional."
#define BENCH_YES "Pass confirmation prompt to continue, optional."
#define BENCH_RANGE "Range of disordered timestamp, default is 1000."
Expand Down Expand Up @@ -1111,7 +1111,6 @@ void printVersion();
int32_t benchParseSingleOpt(int32_t key, char* arg);

void printErrCmdCodeStr(char *cmd, int32_t code, TAOS_RES *res);
void printWarnCmdCodeStr(char *cmd, int32_t code, TAOS_RES *res);

#ifndef LINUX
int32_t benchParseArgsNoArgp(int argc, char* argv[]);
Expand Down
5 changes: 0 additions & 5 deletions src/benchCommandOpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,6 @@ void modifyArgument() {
g_arguments->rest_server_ver_major =
getServerVersionRest(g_arguments->port);
}

if (g_arguments->demo_mode && TAOSC_IFACE == g_arguments->iface) {
g_arguments->mistMode = true;
g_arguments->prepared_rand = 360;
}
}

static void *queryStableAggrFunc(void *sarg) {
Expand Down
4 changes: 4 additions & 0 deletions src/benchData.c
Original file line number Diff line number Diff line change
Expand Up @@ -1661,6 +1661,10 @@ int prepareSampleData(SDataBase* database, SSuperTable* stbInfo) {
stbInfo->stbName, stbInfo->lenOfCols, g_arguments->prepared_rand);
if (stbInfo->random_data_source) {
if (g_arguments->mistMode) {
infoPrint("Each child table using different random prepare data pattern. need "
"all memory(%d M) = childs(%"PRId64") * prepared_rand(%"PRId64") * lenOfCols(%d) \n",
(int32_t)(stbInfo->childTblCount*g_arguments->prepared_rand*stbInfo->lenOfCols/1024/1024),
stbInfo->childTblCount, g_arguments->prepared_rand, stbInfo->lenOfCols);
for (int64_t child = 0; child < stbInfo->childTblCount; child++) {
SChildTable *childTbl = stbInfo->childTblArray[child];
if (STMT_IFACE == stbInfo->iface) {
Expand Down
1 change: 0 additions & 1 deletion src/benchInsert.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ static int getSuperTableFromServerTaosc(
res = taos_query(conn->taos, command);
int32_t code = taos_errno(res);
if (code != 0) {
printWarnCmdCodeStr(command, code, res);
infoPrint("stable %s does not exist, will create one\n",
stbInfo->stbName);
closeBenchConn(conn);
Expand Down
1 change: 0 additions & 1 deletion src/benchSys.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,6 @@ int32_t benchParseSingleOpt(int32_t key, char* arg) {

case 'M':
g_arguments->mistMode = true;
g_arguments->prepared_rand = 57;
break;

case 'x':
Expand Down
5 changes: 0 additions & 5 deletions src/benchUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,8 +1253,3 @@ FORCE_INLINE void printErrCmdCodeStr(char *cmd, int32_t code, TAOS_RES *res) {
taos_free_result(res);
}

FORCE_INLINE void printWarnCmdCodeStr(char *cmd, int32_t code, TAOS_RES *res) {
warnPrint("failed to run command %s, code: 0x%08x, reason: %s\n",
cmd, code, taos_errstr(res));
taos_free_result(res);
}
Loading

0 comments on commit c84009b

Please sign in to comment.