-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
1,396 additions
and
476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"filetype": "csvfile", | ||
"csvPath": "/root/csv/", | ||
"num_of_records_per_req": 10000, | ||
"databases": [ | ||
{ | ||
"dbinfo": { | ||
"name": "csvdb" | ||
}, | ||
"super_tables": [ | ||
{ | ||
"name": "batchTable", | ||
"childtable_count": 10, | ||
"insert_rows": 50, | ||
"childtable_prefix": "d", | ||
"timestamp_step": 10, | ||
"start_timestamp":1600000000000, | ||
"columns": [ | ||
{ "type": "bool", "name": "bc"}, | ||
{ "type": "float", "name": "fc", "min": 1}, | ||
{ "type": "double", "name": "dc", "min":10, "max":10}, | ||
{ "type": "tinyint", "name": "ti"}, | ||
{ "type": "smallint", "name": "si"}, | ||
{ "type": "int", "name": "ic", "fillNull":"false"}, | ||
{ "type": "bigint", "name": "bi"}, | ||
{ "type": "utinyint", "name": "uti"}, | ||
{ "type": "usmallint", "name": "usi", "min":100, "max":120}, | ||
{ "type": "uint", "name": "ui"}, | ||
{ "type": "ubigint", "name": "ubi"}, | ||
{ "type": "binary", "name": "bin", "len": 16}, | ||
{ "type": "nchar", "name": "nch", "len": 16} | ||
], | ||
"tags": [ | ||
{"type": "tinyint", "name": "groupid","max": 10,"min": 1}, | ||
{"type": "binary", "name": "location", "len": 16, | ||
"values": ["San Francisco", "Los Angles", "San Diego", | ||
"San Jose", "Palo Alto", "Campbell", "Mountain View", | ||
"Sunnyvale", "Santa Clara", "Cupertino"] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "interlaceTable", | ||
"childtable_count": 5, | ||
"insert_rows": 100, | ||
"interlace_rows": 10, | ||
"childtable_prefix": "e", | ||
"timestamp_step": 1000, | ||
"start_timestamp":1700000000000, | ||
"columns": [ | ||
{ "type": "bool", "name": "bc"}, | ||
{ "type": "float", "name": "fc", "min":16}, | ||
{ "type": "double", "name": "dc", "min":16}, | ||
{ "type": "tinyint", "name": "ti"}, | ||
{ "type": "smallint", "name": "si"}, | ||
{ "type": "int", "name": "ic", "fillNull":"false"}, | ||
{ "type": "bigint", "name": "bi"}, | ||
{ "type": "utinyint", "name": "uti"}, | ||
{ "type": "usmallint", "name": "usi"}, | ||
{ "type": "uint", "name": "ui"}, | ||
{ "type": "ubigint", "name": "ubi"}, | ||
{ "type": "binary", "name": "bin", "len": 32}, | ||
{ "type": "nchar", "name": "nch", "len": 64} | ||
], | ||
"tags": [ | ||
{"type": "tinyint", "name": "groupid","max": 10,"min": 1}, | ||
{"type": "binary", "name": "location", "len": 16, | ||
"values": ["San Francisco", "Los Angles", "San Diego", | ||
"San Jose", "Palo Alto", "Campbell", "Mountain View", | ||
"Sunnyvale", "Santa Clara", "Cupertino"] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"filetype": "insert", | ||
"cfgdir": "/etc/taos", | ||
"host": "127.0.0.1", | ||
"port": 6030, | ||
"user": "root", | ||
"password": "taosdata", | ||
"num_of_records_per_req": 200, | ||
"thread_count": 20, | ||
"thread_bind_vgroup": "yes", | ||
"create_table_thread_count": 1, | ||
"confirm_parameter_prompt": "no", | ||
"databases": [ | ||
{ | ||
"dbinfo": { | ||
"name": "binddb", | ||
"drop": "yes", | ||
"vgroups": 2 | ||
}, | ||
"super_tables": [ | ||
{ | ||
"name": "meters", | ||
"child_table_exists": "no", | ||
"childtable_count": 4, | ||
"insert_rows": 100, | ||
"interlace_rows": 10, | ||
"childtable_prefix": "d", | ||
"insert_mode": "taosc", | ||
"timestamp_step": 1000, | ||
"start_timestamp":1500000000000, | ||
"columns": [ | ||
{ "type": "bool", "name": "bc"}, | ||
{ "type": "float", "name": "fc", "max": 1, "min": 0 }, | ||
{ "type": "double", "name": "dc", "max": 1, "min": 0 }, | ||
{ "type": "tinyint", "name": "ti", "max": 100, "min": 0 }, | ||
{ "type": "smallint", "name": "si", "max": 100, "min": 0 }, | ||
{ "type": "int", "name": "ic", "max": 100, "min": 0 }, | ||
{ "type": "bigint", "name": "bi", "max": 100, "min": 0 }, | ||
{ "type": "utinyint", "name": "uti", "max": 100, "min": 0 }, | ||
{ "type": "usmallint", "name": "usi", "max": 100, "min": 0 }, | ||
{ "type": "uint", "name": "ui", "max": 100, "min": 0 }, | ||
{ "type": "ubigint", "name": "ubi", "max": 100, "min": 0 }, | ||
{ "type": "binary", "name": "bin", "len": 32}, | ||
{ "type": "nchar", "name": "nch", "len": 64} | ||
], | ||
"tags": [ | ||
{"type": "tinyint", "name": "groupid","max": 10,"min": 1}, | ||
{"type": "binary", "name": "location", "len": 16, | ||
"values": ["San Francisco", "Los Angles", "San Diego", | ||
"San Jose", "Palo Alto", "Campbell", "Mountain View", | ||
"Sunnyvale", "Santa Clara", "Cupertino"] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com> | ||
* | ||
* This program is free software: you can use, redistribute, and/or modify | ||
* it under the terms of the MIT license as published by the Free Software | ||
* Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef INC_BENCHCSV_H_ | ||
#define INC_BENCHCSV_H_ | ||
|
||
#include <bench.h> | ||
|
||
int csvTestProcess(); | ||
|
||
int genWithSTable(SDataBase* db, SSuperTable* stb, char* outDir); | ||
|
||
char * genTagData(char* buf, SSuperTable* stb, int64_t i, int64_t *k); | ||
|
||
char * genColumnData(char* colData, SSuperTable* stb, int64_t ts, int32_t precision, int64_t *k); | ||
|
||
int32_t genRowByField(char* buf, BArray* fields, int16_t fieldCnt, char* binanryPrefix, char* ncharPrefix, int64_t *k); | ||
|
||
void obtainCsvFile(char * outFile, SDataBase* db, SSuperTable* stb, char* outDir); | ||
|
||
int interlaceWriteCsv(SDataBase* db, SSuperTable* stb, FILE* fs, char* buf, int bufLen, int minRemain); | ||
int batchWriteCsv(SDataBase* db, SSuperTable* stb, FILE* fs, char* buf, int bufLen, int minRemain); | ||
|
||
#endif // INC_BENCHCSV_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.