Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new-libtaos-with-ws #29971

Open
wants to merge 129 commits into
base: 3.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
a28b439
Merge branch 'doc/contrib' into feat/internal
guanshengliang Nov 22, 2024
522e4f9
Merge branch 'doc/internal' into feat/internal
guanshengliang Nov 22, 2024
d26003a
Merge branch 'doc/internal' into feat/internal
guanshengliang Nov 22, 2024
5dc9051
Merge branch '3.0' into feat/internal
guanshengliang Nov 22, 2024
c50892b
Merge branch '3.0' into feat/internal
guanshengliang Nov 23, 2024
41c9b04
enh: rename libtaos.so to libtaosinternal.so
guanshengliang Nov 24, 2024
1fe22d7
enh: let python system-test work
guanshengliang Nov 24, 2024
f73cab6
enh: shell for libinternal.so
guanshengliang Nov 25, 2024
f8c9d70
enh: refact script
guanshengliang Nov 26, 2024
16a83a7
enh: wrapper for libtaosinternal
guanshengliang Nov 27, 2024
b73098e
enh: rename some files
guanshengliang Nov 27, 2024
55957a0
enh: let shell support internal driver
guanshengliang Nov 27, 2024
089cf4f
enh: minor changes
guanshengliang Nov 27, 2024
b385b22
Merge branch '3.0' into feat/internal3
guanshengliang Nov 27, 2024
cf19943
enh: minor changes
guanshengliang Nov 27, 2024
e3f86a1
add intenal.h
guanshengliang Nov 27, 2024
bd275ec
enh: remove unused codes
guanshengliang Nov 27, 2024
e631755
enh: minor changs
guanshengliang Nov 27, 2024
c635d1b
feat: mac os issues
guanshengliang Dec 2, 2024
b43b8c4
enh: let python test use internal connection
guanshengliang Dec 3, 2024
7f12c30
enh: let nettest work
guanshengliang Dec 3, 2024
91acf49
enh: let taosc -C work
guanshengliang Dec 3, 2024
1ea7d5f
Merge remote-tracking branch 'origin/3.0' into feat/new-libtaos-with-ws
guanshengliang Dec 3, 2024
4c865c6
Merge remote-tracking branch 'origin/3.0' into feat/new-libtaos-with-ws
guanshengliang Dec 4, 2024
d47c991
enh: test shell in mac os
guanshengliang Dec 4, 2024
0b7d416
enh: minor changes
guanshengliang Dec 4, 2024
dd0c0f7
enh: let libtaosinternal.so work in linux
guanshengliang Dec 5, 2024
739d50b
Merge remote-tracking branch 'origin/3.0' into feat/new-libtaos-with-ws
guanshengliang Dec 5, 2024
e931626
enh: update install script
guanshengliang Dec 5, 2024
32b95c3
enh: for ci
guanshengliang Dec 5, 2024
65af3d6
enh: for windows compile
guanshengliang Dec 5, 2024
b88958a
enh: minor changes
guanshengliang Dec 5, 2024
94a2b7c
Merge branch 'feat/new-libtaos-with-ws' of https://github.com/taosdat…
guanshengliang Dec 5, 2024
5f9c269
enh: compile in windows
guanshengliang Dec 6, 2024
d1a5061
enh: minor changes
guanshengliang Dec 6, 2024
7566a52
enh: taosinternal work in windows
guanshengliang Dec 6, 2024
3dc9d72
Merge branch '3.0' into feat/new-libtaos-with-ws
guanshengliang Dec 7, 2024
6fa0e93
enh: add taos_internal_static
guanshengliang Dec 7, 2024
f5970b3
enh: rollback os_for_wrapper
guanshengliang Dec 7, 2024
f591adf
Merge branch '3.0' into feat/new-libtaos-with-ws
guanshengliang Dec 10, 2024
4a660d1
Merge branch '3.0' into feat/new-libtaos-with-ws
guanshengliang Jan 10, 2025
fd1cc2a
fix: conflicts
guanshengliang Jan 10, 2025
9d5278a
Merge branch 'main' into feat/new-libtaos-with-ws
guanshengliang Jan 10, 2025
2f67d00
fix: conflicts
guanshengliang Jan 10, 2025
82463ab
fix: compile errors
guanshengliang Jan 10, 2025
85d9ebf
Merge remote-tracking branch 'origin/3.0' into feat/new-libtaos-with-ws
guanshengliang Jan 12, 2025
33fe11c
fix: conflicts
guanshengliang Jan 12, 2025
0dcb3b4
enh: rename taosinternal to taosnative
guanshengliang Jan 13, 2025
4409937
enh: rename taosinternal to taosnative
guanshengliang Jan 13, 2025
d292b2e
fix: compile error
guanshengliang Jan 13, 2025
3167e4c
enh: remove taosnative.h
guanshengliang Jan 13, 2025
4bc9bcf
fix: compile errors
guanshengliang Jan 13, 2025
32adf52
enh: set default shell options
guanshengliang Jan 13, 2025
f780e20
fix: compile errors
guanshengliang Jan 13, 2025
b946eef
fix: compile errors
guanshengliang Jan 13, 2025
f53a2a7
debug: switch taosws branch to feat/new-libtaos-with-ws
DuanKuanJun Feb 26, 2025
4b12c01
enh: taosBenchmark remove WEBSOCKET finished
DuanKuanJun Feb 28, 2025
3672d73
fix: CMakeLists.txt remove WEBSOCKET
DuanKuanJun Feb 28, 2025
0bea5fa
Merge branch '3.0' into feat/new-libtaos-with-ws
guanshengliang Feb 28, 2025
a83bf29
fix: compile errors
guanshengliang Feb 28, 2025
4ed66c5
fix: taosBenchmark delete restful code
DuanKuanJun Feb 28, 2025
3695948
Merge branch 'enh/TS-5740-3.0' into feat/new-libtaos-with-ws
DuanKuanJun Feb 28, 2025
57e7138
.gitignore remove taos-tools folder
DuanKuanJun Feb 28, 2025
89610f1
fix: remove taosdump WEBSOCKET MACRO
DuanKuanJun Feb 28, 2025
59d79e2
fix: build error for taosdump
DuanKuanJun Feb 28, 2025
e670ec0
fix: build project passed
DuanKuanJun Feb 28, 2025
e18ddb9
fix: support -Z for connect mode
DuanKuanJun Mar 2, 2025
5abffe3
fix: build error
DuanKuanJun Mar 2, 2025
89486cd
fix: build error fixed
DuanKuanJun Mar 2, 2025
a34b53d
fix: add -Z options
DuanKuanJun Mar 2, 2025
8687f08
fix: native and websocket with string
DuanKuanJun Mar 2, 2025
a70e60c
fix: -Z option core
DuanKuanJun Mar 2, 2025
66fb747
fix: build unit test
DuanKuanJun Mar 2, 2025
0f8365a
fix: build error
DuanKuanJun Mar 2, 2025
f608021
fix: add colon for array
DuanKuanJun Mar 2, 2025
aae1919
fix: unit test can not include fun
DuanKuanJun Mar 2, 2025
a96d562
fix: CTest pointer null is nullptr
DuanKuanJun Mar 2, 2025
3ed5ea4
fix: include pub.h
DuanKuanJun Mar 2, 2025
f8e8f2d
fix: taosdump add -Z --driver options
DuanKuanJun Mar 3, 2025
b1d3572
fix: taosdump support -Z with pub.h pub.c
DuanKuanJun Mar 3, 2025
cbd89ff
fix: toolsGetTimeDay move to pub.c
DuanKuanJun Mar 3, 2025
47dd7b1
fix: restore pub.c only simple fun
DuanKuanJun Mar 3, 2025
0e7dfe3
fix: add error tips
DuanKuanJun Mar 3, 2025
56756a4
fix: tmfree remove from taosdump
DuanKuanJun Mar 3, 2025
473ce8e
fix: remove double declare taos variant
DuanKuanJun Mar 3, 2025
cb02d07
fix: taos support -Z option
DuanKuanJun Mar 3, 2025
e06b01a
enh: configDir set with main fun
DuanKuanJun Mar 3, 2025
0a6397d
fix: add g_arguments.configDir
DuanKuanJun Mar 3, 2025
8406479
fix: show tips add cfgdir
DuanKuanJun Mar 3, 2025
5ead09e
fix: g_argument is pointer
DuanKuanJun Mar 3, 2025
3eecacf
fix: configDir is global var
DuanKuanJun Mar 3, 2025
21a2212
fix: declare g_configDir in benchMain.c
DuanKuanJun Mar 3, 2025
fa68c02
fix: taos version not show on websocket
DuanKuanJun Mar 3, 2025
10a6857
stmt2 websocket prepare with supertable
DuanKuanJun Mar 4, 2025
76098f6
stmt2 websocket prepare build
DuanKuanJun Mar 4, 2025
c7023c6
fix: stmt and stmt2 prepare add db name
DuanKuanJun Mar 4, 2025
57802db
fix: cmake/taosws_CMakeLists.txt.in conflicts
DuanKuanJun Mar 4, 2025
d05df49
fix: remove -R --restful test case
DuanKuanJun Mar 4, 2025
4dc48c5
fix: taosBenchmark adjust priority cmd > json > evn
DuanKuanJun Mar 4, 2025
1c33ef4
fix: add connect mode test case connMode.py
DuanKuanJun Mar 4, 2025
6a18999
fix: clear evn and add host port check
DuanKuanJun Mar 4, 2025
e6c57e2
fix: army/test.py modify start taosAdapter is default
DuanKuanJun Mar 4, 2025
9703a50
change: system-test/test.py default start taosAdapter
DuanKuanJun Mar 4, 2025
9d6956e
fix: add taosAdapter variant to system-test/test.py
DuanKuanJun Mar 4, 2025
90e4ddb
fix: -y must put behind other options
DuanKuanJun Mar 4, 2025
2b1d605
fix: remove rest sml and add -N normal case
DuanKuanJun Mar 4, 2025
d645c95
fix: add -c work cfg test case
DuanKuanJun Mar 4, 2025
c42a8b4
del: queryMain.py remove rest query
DuanKuanJun Mar 5, 2025
7130e79
fix: remove groups have a blank append bug
DuanKuanJun Mar 5, 2025
64479fb
fix: caseBase.py add db in sql query
DuanKuanJun Mar 5, 2025
6e281bc
fix: query_json.py remove rest test
DuanKuanJun Mar 5, 2025
e9d94d6
fix: taosBenchmark uniform dsn describe
DuanKuanJun Mar 5, 2025
30dd7c0
fix: add pub.h pub.c to tools public
DuanKuanJun Mar 5, 2025
effa826
fix: case remove restful interface
DuanKuanJun Mar 5, 2025
c0b85e9
fix: build error
DuanKuanJun Mar 5, 2025
07bdda1
fix: taosDriverCleanup no arg call
DuanKuanJun Mar 5, 2025
24419d9
fix: taosdump add test conn mode case taosdumpCommandline.py
DuanKuanJun Mar 5, 2025
da0f3d3
fix: modify insertFullType.json db name
DuanKuanJun Mar 5, 2025
13ec83b
fix: taosdump connMode test case taosDumpCommandline.py passed
DuanKuanJun Mar 5, 2025
5ad76a5
enh: priority cmd > env > json
DuanKuanJun Mar 6, 2025
756c1bb
fix: taosCli remove is_native variant
DuanKuanJun Mar 6, 2025
f3c432b
Merge branch '3.0' into feat/new-libtaos-with-ws
DuanKuanJun Mar 6, 2025
ee98efd
fix: password is not pointer
DuanKuanJun Mar 6, 2025
60edae7
fix: comment -o test case
DuanKuanJun Mar 6, 2025
ed3515a
fix: merge 3.0
DuanKuanJun Mar 6, 2025
51a40b2
fix: solve fun return code check
DuanKuanJun Mar 6, 2025
a9c36d1
fix: merge 3.0 and solve conflict
DuanKuanJun Mar 6, 2025
56890fb
fix: windows unresolved strcasecmp
DuanKuanJun Mar 6, 2025
ac8cf28
fix: remove coverHostToServAddr
DuanKuanJun Mar 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: taosBenchmark adjust priority cmd > json > evn
  • Loading branch information
DuanKuanJun committed Mar 4, 2025
commit 4dc48c55d746f36243e495cc7f785740456df5e7
15 changes: 9 additions & 6 deletions tools/taos-tools/src/benchJsonOpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,15 @@ static int getMetaFromCommonJsonFile(tools_cJSON *json) {
}
}

// dsn
tools_cJSON *dsn = tools_cJSON_GetObjectItem(json, "dsn");
if (tools_cJSON_IsString(dsn) && strlen(dsn->valuestring) > 0) {
if (g_arguments->dsn == NULL) {
g_arguments->dsn = dsn->valuestring;
infoPrint("set websocket true from json->dsn=%s\n", g_arguments->dsn);
}
}

tools_cJSON *host = tools_cJSON_GetObjectItem(json, "host");
if (host && host->type == tools_cJSON_String && host->valuestring != NULL) {
if(g_arguments->host && strlen(g_arguments->host) > 0) {
Expand Down Expand Up @@ -1592,12 +1601,6 @@ static int getMetaFromCommonJsonFile(tools_cJSON *json) {
static int getMetaFromInsertJsonFile(tools_cJSON *json) {
int32_t code = -1;

tools_cJSON *dsn = tools_cJSON_GetObjectItem(json, "dsn");
if (tools_cJSON_IsString(dsn)) {
g_arguments->dsn = dsn->valuestring;
infoPrint("set websocket true from json->dsn=%s\n", g_arguments->dsn);
}

// check after inserted
tools_cJSON *checkSql = tools_cJSON_GetObjectItem(json, "check_sql");
if (tools_cJSON_IsString(checkSql)) {
Expand Down
36 changes: 15 additions & 21 deletions tools/taos-tools/src/benchMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ void checkArgumentValid() {
g_arguments->host = DEFAULT_HOST;
}

// check dsn valid
if(g_arguments->dsn && g_arguments->dsn[0] == 0) {
warnPrint("dsn is not null, but empty string, so set null. dsn=%s\n", g_arguments->dsn);
g_arguments->dsn = NULL;
}
}

// apply cfg
Expand All @@ -91,12 +86,6 @@ int32_t applyConfigDir(char * cfgDir){
}

int32_t setConnMode(int8_t connMode, char *dsn) {
// check valid
if (connMode == CONN_MODE_NATIVE && dsn != NULL ) {
errorPrint("set connMode Native but found dns, conflict. dsn=%s\n", dsn);
return -1;
}

// set conn mode
char * strMode = connMode == CONN_MODE_NATIVE ? STR_NATIVE : STR_WEBSOCKET;
int32_t code = taos_options(TSDB_OPTION_DRIVER, strMode);
Expand Down Expand Up @@ -130,15 +119,11 @@ int main(int argc, char* argv[]) {
return -1;
}

// read evn
if (g_arguments->dsn != NULL) {
infoPrint("Get dsn from command. dsn=%s\n", g_arguments->dsn);
} else {
char * dsn = getenv("TDENGINE_CLOUD_DSN");
if (dsn != NULL && strlen(dsn) > 3) {
g_arguments->dsn = dsn;
infoPrint("Get dsn from getenv TDENGINE_CLOUD_DSN=%s\n", g_arguments->dsn);
}
// check valid
if(g_arguments->connMode == CONN_MODE_NATIVE && g_arguments->dsn) {
errorPrint("Setting native and setting dsn cannot be specified simultaneously in command line. dsn=%s\n", g_arguments->dsn);
exitLog();
return -1;
}

// read json config
Expand All @@ -147,12 +132,21 @@ int main(int argc, char* argv[]) {
if (readJsonConfig(g_arguments->metaFile)) {
errorPrint("failed to readJsonConfig %s\n", g_arguments->metaFile);
exitLog();
return -1;
return -1;
}
} else {
modifyArgument();
}

// read evn
if (g_arguments->dsn == NULL) {
char * dsn = getenv("TDENGINE_CLOUD_DSN");
if (dsn != NULL && strlen(dsn) > 0) {
g_arguments->dsn = dsn;
infoPrint("Get dsn from getenv TDENGINE_CLOUD_DSN=%s\n", g_arguments->dsn);
}
}

// open result file
if(g_arguments->output_file[0] == 0) {
infoPrint("%s","result_file is empty, ignore output.");
Expand Down
2 changes: 1 addition & 1 deletion tools/taos-tools/src/benchUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ SBenchConn* initBenchConnImpl() {
char * dsnc = NULL;

// set mode
if (g_arguments->dsn) {
if (g_arguments->connMode != CONN_MODE_NATIVE && g_arguments->dsn) {
dsnc = strToLowerCopy(g_arguments->dsn);
if (dsnc == NULL) {
tmfree(conn);
Expand Down