taosBenchmark (formerly taosdemo ) is a tool for testing the performance of TDengine products. taosBenchmark can test the performance of TDengine's insert, query, and subscription functions and simulate large amounts of data generated by many devices. taosBenchmark can be configured to generate user defined databases, supertables, subtables, and the time series data to populate these for performance benchmarking. taosBenchmark is highly configurable and some of the configurations include the time interval for inserting data, the number of working threads and the capability to insert disordered data. The installer provides taosdemo as a soft link to taosBenchmark for compatibility with past users.
...
...
@@ -334,9 +334,9 @@ The configuration parameters for specifying super table tag columns and data col
-**name** : The name of the column, if used together with count, e.g. "name": "current", "count":3, then the names of the 3 columns are current, current_2. current_3.
-**min**: The minimum value of the column/label of the data type.
-**min**: The minimum value of the column/label of the data type. The generated value will equal or large than the minimum value.
-**max**: The maximum value of the column/label of the data type.
-**max**: The maximum value of the column/label of the data type. The generated value will less than the maxium value.
-**values**: The value field of the nchar/binary column/label, which will be chosen randomly from the values.
pRes=taos_query(pConn,"create stable if not exists st1 (ts timestamp, k int) tags(a int)");
pRes=taos_query(pConn,"create stable if not exists st1 (ts timestamp, k int, j varchar(20)) tags(a varchar(20))");
if(taos_errno(pRes)!=0){
printf("failed to create super table st1, reason:%s\n",taos_errstr(pRes));
return-1;
}
taos_free_result(pRes);
pRes=taos_query(pConn,"create table if not exists tu1 using st1 tags(1)");
pRes=taos_query(pConn,"create table if not exists tu1 using st1 tags('c1')");
if(taos_errno(pRes)!=0){
printf("failed to create child table tu1, reason:%s\n",taos_errstr(pRes));
return-1;
}
taos_free_result(pRes);
pRes=taos_query(pConn,"create table if not exists tu2 using st1 tags(2)");
pRes=taos_query(pConn,"create table if not exists tu2 using st1 tags('c2')");
if(taos_errno(pRes)!=0){
printf("failed to create child table tu2, reason:%s\n",taos_errstr(pRes));
return-1;
}
taos_free_result(pRes);
pRes=taos_query(pConn,"create table if not exists tu3 using st1 tags(3)");
pRes=taos_query(pConn,"create table if not exists tu3 using st1 tags('c3')");
if(taos_errno(pRes)!=0){
printf("failed to create child table tu3, reason:%s\n",taos_errstr(pRes));
return-1;
...
...
@@ -96,7 +96,8 @@ int32_t create_stream() {
taos_free_result(pRes);
pRes=taos_query(pConn,
"create stream stream1 trigger at_once watermark 10s into outstb as select _wstart start, avg(k) from st1 partition by tbname interval(10s)");
/*"create stream stream1 trigger at_once watermark 10s into outstb as select _wstart start, avg(k) from st1 partition by tbname interval(10s)");*/
"create stream stream2 into outstb subtable(concat(concat(concat('prefix_', tname), '_suffix_'), cast(k1 as varchar(20)))) as select _wstart wstart, avg(k) from st1 partition by tbname tname, a k1 interval(10s);");
if(taos_errno(pRes)!=0){
printf("failed to create stream stream1, reason:%s\n",taos_errstr(pRes));