Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
0c09bbb9
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0c09bbb9
编写于
8月 23, 2021
作者:
S
shenglian zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
only performance test and leave corretness test to python test cases
上级
513f284d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
2 addition
and
116 deletion
+2
-116
tests/examples/c/schemaless.c
tests/examples/c/schemaless.c
+2
-116
未找到文件。
tests/examples/c/schemaless.c
浏览文件 @
0c09bbb9
...
...
@@ -61,7 +61,7 @@ int main(int argc, char* argv[]) {
time_t
ct
=
time
(
0
);
int64_t
ts
=
ct
*
1000
;
char
*
lineFormat
=
"sta%d,t0=true,t1=127i8,t2=32767i16,t3=%di32,t4=9223372036854775807i64,t9=11.12345f32,t10=22.123456789f64,t11=
\"
binaryTagValue
\"
,t12=L
\"
ncharTagValue
\"
c0=true,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=25
5
u8,c6=32770u16,c7=2147483699u32,c8=9223372036854775899u64,c9=11.12345f32,c10=22.123456789f64,c11=
\"
binaryValue
\"
,c12=L
\"
ncharValue
\"
%lldms"
;
char
*
lineFormat
=
"sta%d,t0=true,t1=127i8,t2=32767i16,t3=%di32,t4=9223372036854775807i64,t9=11.12345f32,t10=22.123456789f64,t11=
\"
binaryTagValue
\"
,t12=L
\"
ncharTagValue
\"
c0=true,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=25
4
u8,c6=32770u16,c7=2147483699u32,c8=9223372036854775899u64,c9=11.12345f32,c10=22.123456789f64,c11=
\"
binaryValue
\"
,c12=L
\"
ncharValue
\"
%lldms"
;
char
**
lines
=
calloc
(
numSuperTables
*
numChildTables
*
numRowsPerChildTable
,
sizeof
(
char
*
));
int
l
=
0
;
...
...
@@ -75,7 +75,7 @@ int main(int argc, char* argv[]) {
}
}
}
shuffle
(
lines
,
numSuperTables
*
numChildTables
*
numRowsPerChildTable
);
//
shuffle(lines, numSuperTables * numChildTables * numRowsPerChildTable);
printf
(
"%s
\n
"
,
"begin taos_insert_lines"
);
int64_t
begin
=
getTimeInUs
();
...
...
@@ -83,119 +83,5 @@ int main(int argc, char* argv[]) {
int64_t
end
=
getTimeInUs
();
printf
(
"code: %d, %s. time used: %"
PRId64
"
\n
"
,
code
,
tstrerror
(
code
),
end
-
begin
);
char
*
lines_000_0
[]
=
{
"sta1,id=sta1_1,t0=true,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=255u8,t6=32770u16,t7=2147483699u32,t8=9223372036854775899u64,t9=11.12345f32,t10=22.123456789f64,t11=
\"
binaryTagValue
\"
,t12=L
\"
ncharTagValue
\"
c0=true,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=255u8,c6=32770u16,c7=2147483699u32,c8=9223372036854775899u64,c9=11.12345f32,c10=22.123456789f64,c11=
\"
binaryValue
\"
,c12=L
\"
ncharValue
\"
1626006833639000us"
};
code
=
taos_insert_lines
(
taos
,
lines_000_0
,
sizeof
(
lines_000_0
)
/
sizeof
(
char
*
));
if
(
0
==
code
)
{
printf
(
"taos_insert_lines() lines_000_0 should return error
\n
"
);
return
-
1
;
}
char
*
lines_000_1
[]
=
{
"sta2,id=
\"
sta2_1
\"
,t0=true,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=255u8,t6=32770u16,t7=2147483699u32,t8=9223372036854775899u64,t9=11.12345f32,t10=22.123456789f64,t11=
\"
binaryTagValue
\"
,t12=L
\"
ncharTagValue
\"
c0=true,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=255u8,c6=32770u16,c7=2147483699u32,c8=9223372036854775899u64,c9=11.12345f32,c10=22.123456789f64,c11=
\"
binaryValue
\"
,c12=L
\"
ncharValue
\"
1626006833639001"
};
code
=
taos_insert_lines
(
taos
,
lines_000_1
,
sizeof
(
lines_000_1
)
/
sizeof
(
char
*
));
if
(
0
==
code
)
{
printf
(
"taos_insert_lines() lines_000_1 should return error
\n
"
);
return
-
1
;
}
char
*
lines_000_2
[]
=
{
"sta3,id=
\"
sta3_1
\"
,t0=true,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t9=11.12345f32,t10=22.123456789f64,t11=
\"
binaryTagValue
\"
,t12=L
\"
ncharTagValue
\"
c0=true,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=255u8,c6=32770u16,c7=2147483699u32,c8=9223372036854775899u64,c9=11.12345f32,c10=22.123456789f64,c11=
\"
binaryValue
\"
,c12=L
\"
ncharValue
\"
0"
};
code
=
taos_insert_lines
(
taos
,
lines_000_2
,
sizeof
(
lines_000_2
)
/
sizeof
(
char
*
));
if
(
0
!=
code
)
{
printf
(
"taos_insert_lines() lines_000_2 return code:%d (%s)
\n
"
,
code
,
(
char
*
)
tstrerror
(
code
));
return
-
1
;
}
char
*
lines_001_0
[]
=
{
"sta4,t0=true,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t9=11.12345f32,t10=22.123456789f64,t11=
\"
binaryTagValue
\"
,t12=L
\"
ncharTagValue
\"
c0=true,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c9=11.12345f32,c10=22.123456789f64,c11=
\"
binaryValue
\"
,c12=L
\"
ncharValue
\"
1626006833639000us"
,
};
code
=
taos_insert_lines
(
taos
,
lines_001_0
,
sizeof
(
lines_001_0
)
/
sizeof
(
char
*
));
if
(
0
!=
code
)
{
printf
(
"taos_insert_lines() lines_001_0 return code:%d (%s)
\n
"
,
code
,
(
char
*
)
tstrerror
(
code
));
return
-
1
;
}
char
*
lines_001_1
[]
=
{
"sta5,id=
\"
sta5_1
\"
,t0=true,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t9=11.12345f32,t10=22.123456789f64,t11=
\"
binaryTagValue
\"
,t12=L
\"
ncharTagValue
\"
c0=true,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c9=11.12345f32,c10=22.123456789f64,c11=
\"
binaryValue
\"
,c12=L
\"
ncharValue
\"
1626006833639001"
};
code
=
taos_insert_lines
(
taos
,
lines_001_1
,
sizeof
(
lines_001_1
)
/
sizeof
(
char
*
));
if
(
0
!=
code
)
{
printf
(
"taos_insert_lines() lines_001_1 return code:%d (%s)
\n
"
,
code
,
(
char
*
)
tstrerror
(
code
));
return
-
1
;
}
char
*
lines_001_2
[]
=
{
"sta6,id=
\"
sta6_1
\"
,t0=true,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t9=11.12345f32,t10=22.123456789f64,t11=
\"
binaryTagValue
\"
,t12=L
\"
ncharTagValue
\"
c0=true,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c9=11.12345f32,c10=22.123456789f64,c11=
\"
binaryValue
\"
,c12=L
\"
ncharValue
\"
0"
};
code
=
taos_insert_lines
(
taos
,
lines_001_2
,
sizeof
(
lines_001_2
)
/
sizeof
(
char
*
));
if
(
0
!=
code
)
{
printf
(
"taos_insert_lines() lines_001_2 return code:%d (%s)
\n
"
,
code
,
(
char
*
)
tstrerror
(
code
));
return
-
1
;
}
char
*
lines_002
[]
=
{
"stb,id=
\"
stb_1
\"
,t20=t,t21=T,t22=true,t23=True,t24=TRUE,t25=f,t26=F,t27=false,t28=False,t29=FALSE,t10=33.12345,t11=
\"
binaryTagValue
\"
,t12=L
\"
ncharTagValue
\"
c20=t,c21=T,c22=true,c23=True,c24=TRUE,c25=f,c26=F,c27=false,c28=False,c29=FALSE,c10=33.12345,c11=
\"
binaryValue
\"
,c12=L
\"
ncharValue
\"
1626006833639000000ns"
,
"stc,id=
\"
stc_1
\"
,t20=t,t21=T,t22=true,t23=True,t24=TRUE,t25=f,t26=F,t27=false,t28=False,t29=FALSE,t10=33.12345,t11=
\"
binaryTagValue
\"
,t12=L
\"
ncharTagValue
\"
c20=t,c21=T,c22=true,c23=True,c24=TRUE,c25=f,c26=F,c27=false,c28=False,c29=FALSE,c10=33.12345,c11=
\"
binaryValue
\"
,c12=L
\"
ncharValue
\"
1626006833639019us"
,
"stc,id=
\"
stc_1
\"
,t20=t,t21=T,t22=true,t23=True,t24=TRUE,t25=f,t26=F,t27=false,t28=False,t29=FALSE,t10=33.12345,t11=
\"
binaryTagValue
\"
,t12=L
\"
ncharTagValue
\"
c20=t,c21=T,c22=true,c23=True,c24=TRUE,c25=f,c26=F,c27=false,c28=False,c29=FALSE,c10=33.12345,c11=
\"
binaryValue
\"
,c12=L
\"
ncharValue
\"
1626006833640ms"
,
"stc,id=
\"
stc_1
\"
,t20=t,t21=T,t22=true,t23=True,t24=TRUE,t25=f,t26=F,t27=false,t28=False,t29=FALSE,t10=33.12345,t11=
\"
binaryTagValue
\"
,t12=L
\"
ncharTagValue
\"
c20=t,c21=T,c22=true,c23=True,c24=TRUE,c25=f,c26=F,c27=false,c28=False,c29=FALSE,c10=33.12345,c11=
\"
binaryValue
\"
,c12=L
\"
ncharValue
\"
1626006834s"
};
code
=
taos_insert_lines
(
taos
,
lines_002
,
sizeof
(
lines_002
)
/
sizeof
(
char
*
));
if
(
0
!=
code
)
{
printf
(
"taos_insert_lines() lines_002 return code:%d (%s)
\n
"
,
code
,
(
char
*
)
tstrerror
(
code
));
return
-
1
;
}
//Duplicate key check;
char
*
lines_003_1
[]
=
{
"std,id=
\"
std_3_1
\"
,t1=4i64,Id=
\"
std
\"
,t2=true c1=true 1626006834s"
};
code
=
taos_insert_lines
(
taos
,
lines_003_1
,
sizeof
(
lines_003_1
)
/
sizeof
(
char
*
));
if
(
0
==
code
)
{
printf
(
"taos_insert_lines() lines_003_1 return code:%d (%s)
\n
"
,
code
,
(
char
*
)
tstrerror
(
code
));
return
-
1
;
}
char
*
lines_003_2
[]
=
{
"std,id=
\"
std_3_2
\"
,tag1=4i64,Tag2=true,tAg3=2,TaG2=
\"
dup!
\"
c1=true 1626006834s"
};
code
=
taos_insert_lines
(
taos
,
lines_003_2
,
sizeof
(
lines_003_2
)
/
sizeof
(
char
*
));
if
(
0
==
code
)
{
printf
(
"taos_insert_lines() lines_003_2 return code:%d (%s)
\n
"
,
code
,
(
char
*
)
tstrerror
(
code
));
return
-
1
;
}
char
*
lines_003_3
[]
=
{
"std,id=
\"
std_3_3
\"
,tag1=4i64 field1=true,Field2=2,FIElD1=
\"
dup!
\"
,fIeLd4=true 1626006834s"
};
code
=
taos_insert_lines
(
taos
,
lines_003_3
,
sizeof
(
lines_003_3
)
/
sizeof
(
char
*
));
if
(
0
==
code
)
{
printf
(
"taos_insert_lines() lines_003_3 return code:%d (%s)
\n
"
,
code
,
(
char
*
)
tstrerror
(
code
));
return
-
1
;
}
char
*
lines_003_4
[]
=
{
"std,id=
\"
std_3_4
\"
,tag1=4i64,dupkey=4i16,tag2=T field1=true,dUpkEy=1e3f32,field2=
\"
1234
\"
1626006834s"
};
code
=
taos_insert_lines
(
taos
,
lines_003_4
,
sizeof
(
lines_003_4
)
/
sizeof
(
char
*
));
if
(
0
==
code
)
{
printf
(
"taos_insert_lines() lines_003_4 return code:%d (%s)
\n
"
,
code
,
(
char
*
)
tstrerror
(
code
));
return
-
1
;
}
return
0
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录