提交 bd115547 编写于 作者: haoranc's avatar haoranc

Merge branch 'dev/chr' of github.com:taosdata/TDengine into dev/chr

......@@ -240,6 +240,16 @@ pipeline {
node nanosecondTest.js
'''
sh '''
cd ${WKC}/src/connector/node-rest/
npm install
npm run build
npm run build:test
npm run test
'''
sh '''
cd ${WKC}/tests/examples/C#/taosdemo
mcs -out:taosdemo *.cs > /dev/null 2>&1
......
......@@ -4,7 +4,7 @@ TDengine支持多种接口写入数据,包括SQL, Prometheus, Telegraf, EMQ MQ
## <a class="anchor" id="sql"></a>SQL 写入
应用通过C/C++、JDBC、GO、C#或Python Connector 执行SQL insert语句来插入数据,用户还可以通过TAOS Shell,手动输入SQL insert语句插入数据。比如下面这条insert 就将一条记录写入到表d1001中:
应用通过C/C++, Java, Go, C#, Python, Node.js 连接器执行SQL insert语句来插入数据,用户还可以通过TAOS Shell,手动输入SQL insert语句插入数据。比如下面这条insert 就将一条记录写入到表d1001中:
```mysql
INSERT INTO d1001 VALUES (1538548685000, 10.3, 219, 0.31);
```
......
......@@ -365,9 +365,9 @@ taos -C 或 taos --dump-config
- timezone
默认值:从系统中动态获取当前的时区设置
客户端运行系统所在的时区。为应对多时区的数据写入和查询问题,TDengine 采用 Unix 时间戳(Unix Timestamp)来记录和存储时间戳。Unix 时间戳的特点决定了任一时刻不论在任何时区,产生的时间戳均一致。需要注意的是,Unix时间戳是在客户端完成转换和记录。为了确保客户端其他形式的时间转换为正确的 Unix 时间戳,需要设置正确的时区。
默认值:从系统中动态获取当前客户端运行系统所在的时区。
为应对多时区的数据写入和查询问题,TDengine 采用 Unix 时间戳(Unix Timestamp)来记录和存储时间戳。Unix 时间戳的特点决定了任一时刻不论在任何时区,产生的时间戳均一致。需要注意的是,Unix时间戳是在客户端完成转换和记录。为了确保客户端其他形式的时间转换为正确的 Unix 时间戳,需要设置正确的时区。
在Linux系统中,客户端会自动读取系统设置的时区信息。用户也可以采用多种方式在配置文件设置时区。例如:
```
......@@ -835,7 +835,7 @@ taos -n sync -P 6042 -h <fqdn of server>
-h:所要连接的服务端的 FQDN 或 ip 地址。如果不设置这一项,会使用本机 taos.cfg 文件中 FQDN 参数的设置作为默认值。
-P:所连接服务端的网络端口。默认值为 6030。
-N:诊断过程中使用的网络包总数。最小值是 1、最大值是 10000,默认值为 100。
-l:单个网络包的大小(单位:字节)。最小值是 1024、最大值是 1024*1024*1024,默认值为 1000。
-l:单个网络包的大小(单位:字节)。最小值是 1024、最大值是 1024 * 1024 * 1024,默认值为 1000。
-S:网络封包的类型。可以是 TCP 或 UDP,默认值为 TCP。
#### FQDN 解析速度诊断
......
......@@ -4,7 +4,7 @@ TDengine supports multiple ways to write data, including SQL, Prometheus, Telegr
## <a class="anchor" id="sql"></a> Data Writing via SQL
Applications insert data by executing SQL insert statements through C/C++, JDBC, GO, C#, or Python Connector, and users can manually enter SQL insert statements to insert data through TAOS Shell. For example, the following insert writes a record to table d1001:
Applications insert data by executing SQL insert statements through C/C++, Java, Go, C#, Python, Node.js Connectors, and users can manually enter SQL insert statements to insert data through TAOS Shell. For example, the following insert writes a record to table d1001:
```mysql
INSERT INTO d1001 VALUES (1538548685000, 10.3, 219, 0.31);
......
......@@ -407,7 +407,7 @@ See [video tutorials](https://www.taosdata.com/blog/2020/11/11/1963.html) for th
- python 2.7 or >= 3.4 installed
- pip or pip3 installed
### Python client installation
### Python connector installation
#### Linux
......@@ -540,7 +540,7 @@ Refer to help (taos.TDengineCursor) in python. This class corresponds to the wri
Used to generate an instance of taos.TDengineConnection.
### Python client code sample
### Python connector code sample
In tests/examples/python, we provide a sample Python program read_example. py to guide you to design your own write and query program. After installing the corresponding client, introduce the taos class through `import taos`. The steps are as follows:
......@@ -610,11 +610,11 @@ The return value is in JSON format, as follows:
```json
{
"status": "succ",
"head": ["ts","current", ],
"column_meta": [["ts",9,8],["current",6,4], ],
"head": ["ts","current",...],
"column_meta": [["ts",9,8],["current",6,4], ...],
"data": [
["2018-10-03 14:38:05.000", 10.3, ],
["2018-10-03 14:38:15.000", 12.6, ]
["2018-10-03 14:38:05.000", 10.3, ...],
["2018-10-03 14:38:15.000", 12.6, ...]
],
"rows": 2
}
......
......@@ -75,7 +75,7 @@ Note:
2. UPDATE marks the database support updating the same timestamp data;
3. Maximum length of the database name is 33;
4. Maximum length of a SQL statement is 65480 characters;
5. Database has more storage-related configuration parameters, see System Management.
5. Database has more storage-related configuration parameters, see [Server-side Configuration](https://www.taosdata.com/en/documentation/administrator#config) .
- **Show current system parameters**
......@@ -88,7 +88,7 @@ Note:
```mysql
USE db_name;
```
Use/switch database
Use/switch database (Invalid when accessing through RESTful connection)
- **Drop a database**
```mysql
......
......@@ -245,8 +245,8 @@ function install_lib() {
else
${csudo} cp -Rf ${binary_dir}/build/lib/libtaos.${verNumber}.dylib ${install_main_dir}/driver && ${csudo} chmod 777 ${install_main_dir}/driver/*
${csudo} ln -sf ${install_main_dir}/driver/libtaos.* ${lib_link_dir}/libtaos.1.dylib
${csudo} ln -sf ${lib_link_dir}/libtaos.1.dylib ${lib_link_dir}/libtaos.dylib
${csudo} ln -sf ${install_main_dir}/driver/libtaos.* ${lib_link_dir}/libtaos.1.dylib || :
${csudo} ln -sf ${lib_link_dir}/libtaos.1.dylib ${lib_link_dir}/libtaos.dylib || :
fi
install_jemalloc
......
......@@ -72,9 +72,19 @@ if [ "$verMode" == "cluster" ]; then
sed 's/verMode=edge/verMode=cluster/g' ${install_dir}/bin/remove_pro.sh >> remove_prodb_temp.sh
mv remove_prodb_temp.sh ${install_dir}/bin/remove_pro.sh
mkdir -p ${install_dir}/nginxd && cp -r ${nginx_dir}/* ${install_dir}/nginxd
cp ${nginx_dir}/png/taos.png ${install_dir}/nginxd/admin/images/taos.png
rm -rf ${install_dir}/nginxd/png
# replace the OEM name, add by yangzy@2021-09-22
sed -i -e 's/www.taosdata.com/www.hanatech.com.cn/g' $(grep -r 'www.taosdata.com' ${install_dir}/nginxd | sed -r "s/(.*\.html):\s*(.*)/\1/g")
sed -i -e 's/TAOS Data/Hanatech/g' $(grep -r 'TAOS Data' ${install_dir}/nginxd | sed -r "s/(.*\.html):\s*(.*)/\1/g")
sed -i -e 's/taosd/prodbs/g' `grep -r 'taosd' ${install_dir}/nginxd | grep -E '*\.js\s*.*' | sed -r -e 's/(.*\.js):\s*(.*)/\1/g' | sort | uniq`
sed -i -e 's/<th style="font-weight: normal">taosd<\/th>/<th style="font-weight: normal">prodbs<\/th>/g' ${install_dir}/nginxd/admin/monitor.html
sed -i -e "s/data:\['taosd', 'system'\],/data:\['prodbs', 'system'\],/g" ${install_dir}/nginxd/admin/monitor.html
sed -i -e "s/name: 'taosd',/name: 'prodbs',/g" ${install_dir}/nginxd/admin/monitor.html
sed -i "s/TDengine/ProDB/g" ${install_dir}/nginxd/admin/*.html
sed -i "s/TDengine/ProDB/g" ${install_dir}/nginxd/admin/js/*.js
......
# Created by https://www.toptal.com/developers/gitignore/api/node
# Edit at https://www.toptal.com/developers/gitignore?templates=node
### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
.env.production
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
# End of https://www.toptal.com/developers/gitignore/api/node
lib/
yarn.lock
import {TDengineRestConnection} from './src/restConnect'
export function TDRestConnection(connection = {}) {
return new TDengineRestConnection(connection)
}
import {TDengineRestConnection} from "../src/restConnect";
let conn = new TDengineRestConnection({host: '127.0.0.1', user: 'root', pass: 'taosdata', port: 6041})
let cursor = conn.cursor();
console.log(conn)
let data = {};
(async () => {
data = await cursor.query("show databases");
data.toString()
})()
此差异已折叠。
{
"name": "td-rest-connector",
"version": "1.0.0",
"description": "A Node.js connector for TDengine restful",
"module": "src/TDengineRest.js",
"main": "lib/TDengineclearRest.js",
"license": "MIT",
"scripts": {
"prepare": "npm run build",
"build": "esbuild --bundle --platform=node --outfile=lib/TDengineRest.js ./TDengineRest.js",
"build:dev": "esbuild --bundle --platform=node --outfile=dist/examples/show-database.js examples/show-database.js ",
"build:test": "esbuild test/testRestConn.js --bundle --platform=node --outfile=dist/tests/testRestConn.js ",
"test": "node dist/tests/testRestConn.js"
},
"devDependencies": {
"esbuild": "^0.12.25",
"eslint": "^7.32.0",
"assert": "^2.0.0"
},
"dependencies": {
"node-fetch": "^2.x"
}
}
# TDengine Nodejs Restful
This is the Node.js library that lets you connect to [TDengine](https://www.github.com/taosdata/tdengine) though
restful. This restful can help you access the TDengine from different platform.
## Install
To get started, just type in the following to install the connector through [npm](https://www.npmjs.com/)
```cmd
npm install td-rest-connector
```
## Usage
### Connection
```javascript
import taoRest from 'TDengineRest'
var connRest = taoRest({host:'127.0.0.1',user:'root',pass:'taosdata',port:6041})
```
query
```javascript
(async()=>{
data = await connRest.query("show databases");
data.toString();
}
)()
```
## Example
An example of using the NodeJS Restful connector to create a table with weather data and create and execute queries can be found [here](https://github.com/taosdata/TDengine/tree/master/tests/examples/node-rest/show-database.js)
## Contributing to TDengine
Please follow the [contribution guidelines](https://github.com/taosdata/TDengine/blob/master/CONTRIBUTING.md) to contribute to the project.
## License
[GNU AGPL v3.0](http://www.gnu.org/licenses/agpl-3.0.html)
import {TDengineRestCursor} from '../src/restCursor'
/**
*this class collect basic information that can be used to build
* a restful connection.
*/
export class TDengineRestConnection {
/**
* constructor,give variables some default values
* @param options
* @returns {TDengineRestConnection}
*/
constructor(options) {
this.host = 'localhost'
this.port = '6041'
this.user = 'root'
this.pass = 'taosdata'
this.path = '/rest/sqlt/'
this._initConnection(options)
return this
}
/**
* used to init the connection info using the input options
* @param options
* @private
*/
_initConnection(options) {
if (options['host']) {
this.host = options['host']
}
if (options['port']) {
this.port = options['port']
}
if (options['user']) {
this.user = options['user']
}
if (options['pass']) {
this.pass = options['pass']
}
if (options['path']) {
this.path = options['path']
}
}
/**
* cursor will return an object of TDengineRestCursor, which can send restful(http) request and get
* the response from server.
* @returns {TDengineRestCursor}
*/
cursor() {
return new TDengineRestCursor(this)
}
}
/**
* indicate the every type's type code
* @type {{"0": string, "1": string, "2": string, "3": string, "4": string, "5": string, "6": string, "7": string, "8": string, "9": string, "10": string}}
*/
export const typeCodesToName = {
0: 'Null',
1: 'Boolean',
2: 'Tiny Int',
3: 'Small Int',
4: 'Int',
5: 'Big Int',
6: 'Float',
7: 'Double',
8: 'Binary',
9: 'Timestamp',
10: 'Nchar',
}
/**
* get the type of input typecode, in fact the response of restful will send every column's typecode
* @param typecode
* @returns {*}
*/
export function getTaoType(typecode) {
return typeCodesToName[typecode];
}
\ No newline at end of file
import fetch from 'node-fetch'
import {TDengineRestResultSet} from '../src/restResult'
/**
* this class is core of restful js connector
* this class resends http request to the TDengine server
* and receive the response.
*/
export class TDengineRestCursor {
/**
* constructor,used to get the connection info
* @param connection
*/
constructor(connection) {
this._connection = null;
this.data = [];
this.http = false
if (connection != null) {
this._connection = connection
} else {
throw new Error("A TDengineRestConnection object is required to be passed to the TDengineRestCursor")
}
}
/**
* used to build an url,like http://localhost:6041/rest/sql
* @returns {string}
* @private
*/
_apiUpl() {
return (this.http ? "https" : "http") + "://" + this._connection.host + ":" + this._connection.port + this._connection.path
}
/**
* used to make an authorization token
* @returns {string}
* @private
*/
_token() {
return 'Basic ' + Buffer.from(this._connection.user + ":" + this._connection.pass).toString('base64')
}
/**
* Used fetch to send http request, and return the response as an object of TDengineRestResultSet
* @param sql
* @returns {Promise<TDengineRestResultSet>}
*/
async query(sql) {
try {
let response = await fetch(this._apiUpl(), {
method: 'POST',
body: sql,
headers: {'Authorization': this._token()}
})
// if (response.status == 'succ') {
return await new TDengineRestResultSet(await response.json())
// } else {
// throw new Error(response.desc)
// }
} catch (e) {
console.log("Request Failed " + e)
}
}
}
import {getTaoType} from '../src/restConstant'
export class TDengineRestResultSet {
constructor(result) {
this.status = '' //succ
this.column_name = {} //head
this.column_type = {} //column_meta
this.data = {}
this.affectRows = null //rows
this.code = null
this.desc = null
this._init(result)
}
//initial the resultSet with a jason parameter
/**
*
* @param jason
*/
_init(result) {
if (result.status) {
this.status = result.status
}
if (result.head) {
this.column_name = result.head
}
if (result.column_meta) {
this.column_type = result.column_meta
}
if (result.data) {
this.data = result.data
}
if (result.rows) {
this.affectRows = result.rows
}
if (result.code) {
this.code = result.code
}
if (result.desc) {
this.desc = result.desc
}
}
getStatus() {
return this.status
}
getColumn_name() {
return this.column_name
}
getColumn_type() {
let column_data = []
this.column_type.forEach(function (column) {
column[1] = getTaoType(column[1])
column_data.push(column)
})
return column_data
}
getData() {
return this.data
}
getAffectRow() {
return this.affectRows
}
getCode() {
return this.code
}
getDesc() {
return this.desc
}
toString() {
if(this.status === 'succ'){
let fields = this.column_type
let rows = this.data
this._prettyStr(fields, rows)
}else{
console.log(this.status+":"+this.desc)
}
}
_prettyStr(fields, data) {
let colName = []
let colType = []
let colSize = []
let colStr = ""
for (let i = 0; i < fields.length; i++) {
colName.push(fields[i][0])
colType.push(fields[i][1])
if ((fields[i][1]) == 8 || (fields[i][1]) == 10) {
colSize.push(Math.max(fields[i][0].length, fields[i][2])); //max(column_name.length,column_type_precision)
} else {
colSize.push(Math.max(fields[i][0].length, suggestedMinWidths[fields[i][1]]));// max(column_name.length,suggest_column_with_suggestion)
}
// console.log(colSize)
}
colName.forEach((name, i) => {
colStr += this._fillEmpty(Math.floor(colSize[i] / 2 - name.length / 2)) + name.toString() + this._fillEmpty(Math.ceil(colSize[i] / 2 - name.length / 2)) + " | "
})
let strSperator = ""
let sizeSum = colSize.reduce((a, b) => a += b, (0)) + colSize.length * 3
strSperator = this._printN("=", sizeSum)
console.log("\n" + colStr)
console.log(strSperator)
data.forEach((row) => {
let rowStr = ""
row.forEach((cell, index) => {
rowStr += cell == null ? 'null' : cell.toString();
rowStr += this._fillEmpty(colSize[index] - cell.toString().length) + " | "
})
console.log(rowStr)
})
return colStr
}
_fillEmpty(n) {
let str = "";
for (let i = 0; i < n; i++) {
str += " ";
}
return str;
}
_printN(s, n) {
let f = "";
for (let i = 0; i < n; i++) {
f += s;
}
return f;
}
}
const suggestedMinWidths = {
0: 4,
1: 4,
2: 4,
3: 6,
4: 11,
5: 12,
6: 24,
7: 24,
8: 10,
9: 25,
10: 10,
}
import {TDRestConnection} from "../TDengineRest";
import assert from "assert"
let conn = new TDRestConnection({host: '127.0.0.1', user: 'root', pass: 'taosdata', port: 6041});
let cursor = conn.cursor();
const createDB = "create database if not exists node_rest";
const dropDB = "drop database if exists node_rest";
const createTBL = "CREATE STABLE if not exists node_rest.meters (ts timestamp, current float, voltage int, phase float) TAGS (location binary(64), groupId int)";
const dropTBL = "drop table if exists node_rest.meters ";
const insert = "INSERT INTO node_rest.d1001 USING node_rest.meters TAGS (\"Beijng.Chaoyang\", 2) VALUES (now, 10.2, 219, 0.32) ";
const select = "select * from node_rest.d1001 ";
const selectStbl = "select * from node_rest.meters";
async function execute(sql) {
console.log("SQL:" + sql);
let result = await cursor.query(sql);
try {
assert.strictEqual(result.getStatus(), 'succ', new Error("response error"))
result.toString()
} catch (e) {
console.log(e)
}
}
(async () => {
await execute(createDB);
await execute(createTBL);
await execute(insert);
await execute(select);
await execute(selectStbl);
await execute(dropDB);
})()
// (async () => {
// result = await cursor.query("drop database if exists node_rest").catch(e=>console.log(e))
// result.toString()
// })()
......@@ -4271,6 +4271,10 @@ static int createSuperTable(
len += snprintf(tags + len, TSDB_MAX_TAGS_LEN - len,
"T%d %s,", tagIndex, "BIGINT UNSIGNED");
lenOfTagOfOneRow += superTbl->tags[tagIndex].dataLen + BIGINT_BUFF_LEN;
} else if (strcasecmp(dataType, "TIMESTAMP") == 0) {
len += snprintf(tags + len, TSDB_MAX_TAGS_LEN - len,
"T%d %s,", tagIndex, "TIMESTAMP");
lenOfTagOfOneRow += superTbl->tags[tagIndex].dataLen + TIMESTAMP_BUFF_LEN;
} else {
taos_close(taos);
free(command);
......@@ -12063,4 +12067,3 @@ int main(int argc, char *argv[]) {
return 0;
}
此差异已折叠。
......@@ -1005,7 +1005,7 @@ static SRpcConn *rpcProcessMsgHead(SRpcInfo *pRpc, SRecvInfo *pRecv, SRpcReqCont
// client shall send the request within tsRpcTime again for UDP, double it
if (pConn->connType != RPC_CONN_TCPS)
pConn->pIdleTimer = taosTmrStart(rpcProcessIdleTimer, tsRpcTimer*2, pConn, pRpc->tmrCtrl);
pConn->pIdleTimer = taosTmrStart(rpcProcessIdleTimer, tsRpcTimer*20, pConn, pRpc->tmrCtrl);
} else {
terrno = rpcProcessRspHead(pConn, pHead);
*ppContext = pConn->pContext;
......
......@@ -606,4 +606,4 @@ void taosDumpGlobalCfg() {
taosDumpCfg(cfg);
}
}
\ No newline at end of file
}
此差异已折叠。
......@@ -7,7 +7,7 @@ LFLAGS = '-Wl,-rpath,/usr/local/taos/driver/' -ltaos -lpthread -lm -lrt
CFLAGS = -O3 -g -Wall -Wno-deprecated -fPIC -Wno-unused-result -Wconversion \
-Wno-char-subscripts -D_REENTRANT -Wno-format -D_REENTRANT -DLINUX \
-Wno-unused-function -D_M_X64 -I/usr/local/taos/include -std=gnu99 \
-I../../../deps/cJson/inc -I../../../src/os/inc -I../../../src/inc \
-I../../../src/os/inc -I../../../src/inc \
-I../../../src/util/inc -I../../../src/common/inc
all: $(TARGET)
......@@ -38,4 +38,4 @@ clean:
rm $(ROOT)clientcfgtest-wrongjson
rm $(ROOT)clientcfgtest-wrongvalue
rm $(ROOT)clientcfgtest-taosd
......@@ -18213,4 +18213,21 @@
obj:/usr/bin/python3.8
fun:PyVectorcall_Call
fun:_PyEval_EvalFrameDefault
}
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:_buffer_get_info
fun:array_getbuffer
fun:__Pyx__GetBufferAndValidate.constprop.64
fun:__pyx_f_5numpy_6random_13bit_generator_12SeedSequence_mix_entropy
fun:__pyx_pw_5numpy_6random_13bit_generator_12SeedSequence_1__init__
obj:/usr/bin/python3.8
fun:__Pyx__PyObject_CallOneArg
fun:__Pyx_PyObject_CallOneArg
fun:__pyx_pw_5numpy_6random_13bit_generator_12BitGenerator_1__init__
obj:/usr/bin/python3.8
obj:/usr/bin/python3.8
}
\ No newline at end of file
......@@ -219,6 +219,7 @@ python3 ./test.py -f perfbenchmark/taosdemoInsert.py
#taosdemo
python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
python3 test.py -f tools/taosdemoAllTest/taosdemoTestQueryWithJson.py
python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertAllType.py
#query
python3 test.py -f query/distinctOneColTb.py
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
{
"filetype": "insert",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"thread_count": 4,
"thread_count_create_tbl": 4,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"insert_interval": 0,
"interlace_rows": 10,
"num_of_records_per_req": 1000,
"max_sql_len": 1024000,
"databases": [{
"dbinfo": {
"name": "db",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
"walLevel":1,
"cachelast":0,
"quorum":1,
"fsync":3000,
"update": 0
},
"super_tables": [{
"name": "stb0",
"child_table_exists":"no",
"childtable_count": 1000,
"childtable_prefix": "stb00_",
"auto_create_table": "no",
"batch_create_tbl_num": 1,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 100,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "INT"}, {"type": "TIMESTAMP"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 16, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 16, "count":1}],
"tags": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 16, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 16, "count":1}]
},
{
"name": "stb1",
"child_table_exists":"no",
"childtable_count": 1000,
"childtable_prefix": "stb01_",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 200,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":1}]
}]
}]
}
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -21,7 +21,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 3650,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -21,7 +21,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 3650,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 3650,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -14,7 +14,8 @@
{
"dbinfo": {
"name": "blf",
"drop": "yes"
"drop": "yes",
"keep": 36500
},
"super_tables": [
{
......
......@@ -21,7 +21,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 3650,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -21,7 +21,7 @@
"cache": 16,
"blocks": 3,
"precision": "ms",
"keep": 3650,
"keep": 36500,
"minRows": 1000,
"maxRows": 4096,
"comp":2,
......
......@@ -21,7 +21,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 3650,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -23,7 +23,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -23,7 +23,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -23,7 +23,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -14,7 +14,8 @@
{
"dbinfo": {
"name": "gdse",
"drop": "yes"
"drop": "yes",
"keep": 36500
},
"super_tables": [{
"name": "model_1174",
......
......@@ -14,7 +14,8 @@
{
"dbinfo": {
"name": "gdse",
"drop": "yes"
"drop": "yes",
"keep": 36500
},
"super_tables": [{
"name": "model_1174",
......
......@@ -14,7 +14,8 @@
{
"dbinfo": {
"name": "gdse",
"drop": "yes"
"drop": "yes",
"keep": 36500
},
"super_tables": [{
"name": "model_1174",
......
......@@ -14,7 +14,8 @@
{
"dbinfo": {
"name": "gdse",
"drop": "yes"
"drop": "yes",
"keep": 36500
},
"super_tables": [{
"name": "model_1174",
......
......@@ -14,7 +14,8 @@
{
"dbinfo": {
"name": "gdse",
"drop": "yes"
"drop": "yes",
"keep": 36500
},
"super_tables": [{
"name": "model_1174",
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
{
"filetype": "insert",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"thread_count": 4,
"thread_count_create_tbl": 4,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"insert_interval": 0,
"interlace_rows": 10,
"num_of_records_per_req": 1000,
"max_sql_len": 1024000,
"databases": [{
"dbinfo": {
"name": "db",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
"walLevel":1,
"cachelast":0,
"quorum":1,
"fsync":3000,
"update": 0
},
"super_tables": [{
"name": "stb0",
"child_table_exists":"no",
"childtable_count": 1000,
"childtable_prefix": "stb00_",
"auto_create_table": "no",
"batch_create_tbl_num": 1,
"data_source": "rand",
"insert_mode": "stmt",
"insert_rows": 100,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "INT"}, {"type": "TIMESTAMP"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 16, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 16, "count":1}],
"tags": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 16, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 16, "count":1}]
},
{
"name": "stb1",
"child_table_exists":"no",
"childtable_count": 1000,
"childtable_prefix": "stb01_",
"auto_create_table": "no",
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "stmt",
"insert_rows": 200,
"childtable_limit": 0,
"childtable_offset":0,
"multi_thread_write_one_tbl": "no",
"interlace_rows": 0,
"insert_interval":0,
"max_sql_len": 1024000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "INT"}, {"type": "DOUBLE", "count":1}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}],
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":1}]
}]
}]
}
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -21,7 +21,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 3650,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -21,7 +21,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 3650,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 3650,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
......@@ -22,7 +22,7 @@
"cache": 50,
"blocks": 8,
"precision": "ms",
"keep": 365,
"keep": 36500,
"minRows": 100,
"maxRows": 4096,
"comp":2,
......
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import sys
import os
from util.log import *
from util.cases import *
from util.sql import *
from util.dnodes import *
class TDTestCase:
def init(self, conn, logSql):
tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), logSql)
def getBuildPath(self):
selfPath = os.path.dirname(os.path.realpath(__file__))
if ("community" in selfPath):
projPath = selfPath[:selfPath.find("community")]
else:
projPath = selfPath[:selfPath.find("tests")]
for root, dirs, files in os.walk(projPath):
if ("taosd" in files):
rootRealPath = os.path.dirname(os.path.realpath(root))
if ("packaging" not in rootRealPath):
buildPath = root[:len(root)-len("/build/bin")]
break
return buildPath
def run(self):
buildPath = self.getBuildPath()
if (buildPath == ""):
tdLog.exit("taosd not found!")
else:
tdLog.info("taosd found in %s" % buildPath)
binPath = buildPath+ "/build/bin/"
# insert: create one or mutiple tables per sql and insert multiple rows per sql
os.system("%staosdemo -f tools/taosdemoAllTest/insert-allDataType.json -y " % binPath)
tdSql.execute("use db")
tdSql.query("select count (tbname) from stb0")
tdSql.checkData(0, 0, 1000)
tdSql.query("select count (tbname) from stb1")
tdSql.checkData(0, 0, 1000)
tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 100)
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 100000)
tdSql.query("select count(*) from stb01_1")
tdSql.checkData(0, 0, 200)
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 200000)
# stmt interface
os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insert-allDataType-stmt.json -y " % binPath)
tdSql.execute("use db")
tdSql.query("select count (tbname) from stb0")
tdSql.checkData(0, 0, 1000)
tdSql.query("select count (tbname) from stb1")
tdSql.checkData(0, 0, 1000)
tdSql.query("select count(*) from stb00_0")
tdSql.checkData(0, 0, 100)
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 100000)
tdSql.query("select count(*) from stb01_1")
tdSql.checkData(0, 0, 200)
tdSql.query("select count(*) from stb1")
tdSql.checkData(0, 0, 200000)
# taosdemo command line
os.system("%staosdemo -t 1000 -n 100 -T 10 -b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,NCHAR,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY -y " % binPath)
tdSql.execute("use test")
tdSql.query("select count (tbname) from meters")
tdSql.checkData(0, 0, 1000)
tdSql.query("select count(*) from meters")
tdSql.checkData(0, 0, 100000)
tdSql.query("select count(*) from d100")
tdSql.checkData(0, 0, 100)
testcaseFilename = os.path.split(__file__)[-1]
os.system("rm -rf ./insert_res.txt")
os.system("rm -rf tools/taosdemoAllTest/%s.sql" % testcaseFilename )
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
tdCases.addWindows(__file__, TDTestCase())
tdCases.addLinux(__file__, TDTestCase())
......@@ -7,7 +7,7 @@ LFLAGS = '-Wl,-rpath,/usr/local/taos/driver/' -ltaos -lpthread -lm -lrt
CFLAGS = -O0 -g -Wall -Wno-deprecated -fPIC -Wno-unused-result -Wconversion \
-Wno-char-subscripts -D_REENTRANT -Wno-format -D_REENTRANT -DLINUX \
-Wno-unused-function -D_M_X64 -I/usr/local/taos/include -std=gnu99 \
-fsanitize=address
-fsanitize=address -I../../../deps/cJson/inc
all: $(TARGET)
......@@ -16,9 +16,11 @@ exe:
gcc $(CFLAGS) ./stmtBatchTest.c -o $(ROOT)stmtBatchTest $(LFLAGS)
gcc $(CFLAGS) ./stmtTest.c -o $(ROOT)stmtTest $(LFLAGS)
gcc $(CFLAGS) ./stmt_function.c -o $(ROOT)stmt_function $(LFLAGS)
gcc $(CFLAGS) ./openTSDBTest.c -o $(ROOT)openTSDBTest $(LFLAGS)
clean:
rm $(ROOT)batchprepare
rm $(ROOT)stmtBatchTest
rm $(ROOT)stmtTest
rm $(ROOT)stmt_function
rm $(ROOT)openTSDBTest
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册