Skip to content

Commit

Permalink
fix: taosbenchmark handle mem better (#562)
Browse files Browse the repository at this point in the history
  • Loading branch information
sangshuduo committed Feb 1, 2023
1 parent 181bcac commit a0234fe
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/3.0-coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21932-taosbenchmark-schemaless-refine'
ref: 'fix/sangshuduo/TS-2526-taosbenchmark-handle-mem-better'

- name: Change time zone
if:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-macos-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21932-taosbenchmark-schemaless-refine'
ref: 'fix/sangshuduo/TS-2526-taosbenchmark-handle-mem-better'

- name: Change time zone
if: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-macos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21932-taosbenchmark-schemaless-refine'
ref: 'fix/sangshuduo/TS-2526-taosbenchmark-handle-mem-better'

- name: Change time zone
if: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-non-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
echo "clone TDengine 3.0 on ${{ steps.setup.outputs.uname }}"
git clone --branch fix/sangshuduo/TD-21932-taosbenchmark-schemaless-refine --depth 1 https://github.com/taosdata/TDengine > /dev/null || exit 1
git clone --branch fix/sangshuduo/TS-2526-taosbenchmark-handle-mem-better --depth 1 https://github.com/taosdata/TDengine > /dev/null || exit 1
echo "build TDengine 3.0 on ${{ steps.setup.outputs.uname }}"
cd TDengine || exit 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-taosBenchmark-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21932-taosbenchmark-schemaless-refine'
ref: 'fix/sangshuduo/TS-2526-taosbenchmark-handle-mem-better'

- name: Change time zone
if: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-taosBenchmark-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21932-taosbenchmark-schemaless-refine'
ref: 'fix/sangshuduo/TS-2526-taosbenchmark-handle-mem-better'

- name: Change time zone
if: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-taosdump-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21932-taosbenchmark-schemaless-refine'
ref: 'fix/sangshuduo/TS-2526-taosbenchmark-handle-mem-better'

- name: Change time zone
if:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-taosdump-release-ws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21932-taosbenchmark-schemaless-refine'
ref: 'fix/sangshuduo/TS-2526-taosbenchmark-handle-mem-better'

- name: Change time zone
if:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-taosdump-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21932-taosbenchmark-schemaless-refine'
ref: 'fix/sangshuduo/TS-2526-taosbenchmark-handle-mem-better'

- name: Change time zone
if:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/3.0-windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
with:
repository: 'taosdata/TDengine'
path: 'TDengine'
ref: 'fix/sangshuduo/TD-21932-taosbenchmark-schemaless-refine'
ref: 'fix/sangshuduo/TS-2526-taosbenchmark-handle-mem-better'

- name: create debug directory
if: |
Expand Down
2 changes: 1 addition & 1 deletion src/benchMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ void* benchCancelHandler(void* arg) {
toolsMsleep(10);

if (g_arguments->in_prompt || INSERT_TEST != g_arguments->test_mode) {
toolsMsleep(100);
postFreeResource();
toolsMsleep(10);
exit(EXIT_SUCCESS);
}
return NULL;
Expand Down
7 changes: 4 additions & 3 deletions src/benchUtilDs.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

static dstr * ds_header(char *s)
{
if (NULL == s) return NULL;
dstr *ds = (dstr *)(s - DS_HEADER_SIZE);

if (ds->magic != MAGIC_NUMBER)
Expand All @@ -29,7 +30,7 @@ char * new_ds(size_t cap)
ds = malloc(DS_HEADER_SIZE + cap + 1);
if (ds == NULL)
{
perror("newds()->malloc()");
errorPrint("%s()->malloc()\n", __func__);
exit(1);
}

Expand All @@ -48,7 +49,7 @@ void free_ds(char **ps)

if (ds == NULL)
{
printf("freeds(): not a dynamic string");
debugPrint("%s(): not a dynamic string\n", __func__);
exit(1);
}

Expand Down Expand Up @@ -124,7 +125,7 @@ char * ds_resize(char **ps, size_t cap)
s = realloc(s - DS_HEADER_SIZE, DS_HEADER_SIZE + cap + 1);
if (s == NULL)
{
perror("resizeds()->realloc()");
errorPrint("%s()->realloc()\n", __func__);
exit(1);
}
s += DS_HEADER_SIZE;
Expand Down

0 comments on commit a0234fe

Please sign in to comment.